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



The information in this article applies to:

  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
  • 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:
  1. 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

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

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

    The System.EnterpriseServices dynamic link library (DLL) appears in the Selected Components box.
  6. Click OK.

MORE INFORMATION

Steps to reproduce the behavior

  1. Start Visual Studio .NET.
  2. On the File menu, point to Open, and then click Project.

    The Open Project dialog box appears.
  3. 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

  4. Click Open.
  5. On the Build menu, click Build Solution.

REFERENCES

For more information, visit the following Microsoft Web sites:

COM+ integration: How .NET Enterprise Services can help you build distributed applications
http://msdn.microsoft.com/msdnmag/issues/01/10/complus/default.aspx


Modification Type:MinorLast Reviewed:2/3/2006
Keywords:kbvs2005doesnotapply kbvs2005swept kbCOMPlusCatalog kbCompModel kbCOMServices kbprb KB834061 kbAudDeveloper