Microsoft KB Archive/834061

= You receive a build error message when you try to build a .NET Framework SDK ObjectPooling sample program =

Article ID: 834061

Article Last Modified on 4/24/2007

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer
 * Microsoft Visual Studio .NET 2003 Professional Edition
 * Microsoft Visual Studio .NET 2003 Academic Edition
 * Microsoft Visual Studio .NET 2002 Enterprise Architect
 * Microsoft Visual Studio .NET 2002 Enterprise Developer
 * Microsoft Visual Studio .NET 2002 Professional Edition
 * Microsoft Visual Studio .NET 2002 Academic Edition

-





SYMPTOMS
In Microsoft Visual Studio .NET, when you try to build a Microsoft .NET Framework Software Development Kit (SDK) ObjectPooling sample program, you may receive the following build error:

'Public Overridable Overloads Sub Dispose' is declared in project 'System.EnterpriseServices.dll', which is not referenced by project 'OPDemo.exe'.



CAUSE
This problem occurs if the System.EnterpriseServices assembly is not available as a project reference while you compile the ObjectPooling sample program.



WORKAROUND
To work around this problem, follow these steps:  Locate and then open the ObjectPoolingVB.sln file.

Note The ObjectPoolingVB.sln file is typically located in the following folders.

Microsoft Visual Studio .NET 2003

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Technologies\ComponentServices\ObjectPooling\VB

Any other version of Microsoft Visual Studio .NET

C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Samples\Technologies\ComponentServices\ObjectPooling\VB

 In Solution Explorer, open the OPFormVB project. Right-click References, and then click Add Reference.

The Add Reference dialog box appears. Click the .NET tab, and then click System.EnterpriseServices. Click Select.

The System.EnterpriseServices dynamic link library (DLL) appears in the Selected Components box. Click OK.</li></ol>

<div class="moreinformation_section">

Steps to reproduce the behavior
<ol> Start Visual Studio .NET.</li> On the File menu, point to Open, and then click Project.

The Open Project dialog box appears.</li> On the Look in box, click ObjectPoolingVB.sln, and then select a project solution.

Note ObjectPoolingVB.sln is typically located in the following folders.

Visual Studio .NET 2003

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Samples\Technologies\ComponentServices\ObjectPooling\VB

Any other version of Visual Studio .NET

C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Samples\Technologies\ComponentServices\ObjectPooling\VB

</li> Click Open.</li> On the Build menu, click Build Solution.</li></ol>

<div class="references_section">