BUG: The project dependencies in your Enterprise Template project are not saved in Visual Studio .NET 2003

Article translations Article translations
Article ID: 818452 - View products that this article applies to.
Expand all | Collapse all

On This Page

SYMPTOMS

If you add project dependencies to an Enterprise Template project by using Microsoft Visual Studio 2003, the project dependencies are not saved when you close and then reopen the Enterprise Template project.

CAUSE

This problem occurs because the dependency information does not persist correctly for Enterprise Template subprojects when you close and then reopen the Enterprise Template project in Visual Studio .NET 2003.

WORKAROUND

To work around this problem, use a project reference.

If you create a project that depends on the file output of another project, and you want to set project dependencies to influence the build order of the projects, you can use a project reference.

A project reference performs the following functions:
  • References the build output of the referenced project.
  • Automatically updates the build order to make sure that the referenced project is built before the project that references it is built.

Add a project reference

  1. In Visual Studio .NET, create an Enterprise Template project.
  2. Add a Class Library project to the Enterprise Template project.
  3. Add an ASP.NET Web application project to the Enterprise Template project.
  4. Add a reference to the class library DLL to the ASP.NET Web application project. Call the methods of the class library DLL in the ASP.NET Web application project.
  5. Build the solution.
  6. On the Debug menu, click Start.
  7. Modify the class library DLL.
  8. On the Debug menu, click Start.
Notice that the class library is built first and the modifications that you made in step 7 appear in the build of the Enterprise Template project.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

Steps to reproduce the problem

  1. Start Visual Studio .NET 2003.
  2. Create an Enterprise Template project:
    1. On the File menu, point to New, and then click Project. The New Project dialog box appears.
    2. Under Project Types, expand Other Projects, and then click Enterprise Template Projects.
    3. Under Templates, click Enterprise Template Project.
    4. In the Name box, type MyTemplate, and then click OK.
  3. Add any existing ASP.NET Web application project to the MyTemplate project:
    1. In Solution Explorer, right-click MyTemplate, point to Add, and then click Existing Project. The Add Existing Project dialog box appears.
    2. In the Add Existing Project dialog box, click an ASP.NET Web application project, and then click Open.
  4. Repeat step 3 to add an existing class library DLL to the MyTemplate project.
  5. Add project dependencies to the MyTemplate project:
    1. In the Solution Explorer, click MyTemplate.
    2. On the Project menu, click Project Dependencies. The Project Dependencies dialog box appears.
    3. In the Project Dependencies dialog box, click the Dependencies tab. Notice that the projects that you added to the MyTemplate project in steps 3 and 4 appear in the Projects box.
    4. Under Projects, select the project that you added in step 3.
    5. In Depends on box, click to select the check box next to the class library DLL that you added in step 4.
    6. Click the Build Order tab. Notice the build sequence of the projects.
  6. Save the MyTemplate project.
  7. Reopen the MyTemplate project.

    Notice that the project dependencies that you set in step 5 have not been saved.

REFERENCES

For more information, visit the following Microsoft Developer Network (MSDN) Web sites:
Enterprise Template projects
http://msdn2.microsoft.com/en-us/library/aa291957(VS.71).aspx

Project Dependencies, Common Properties, Solution Property Pages dialog box
http://msdn2.microsoft.com/en-us/library/zk4ahe0t(vs.71).aspx

Project Dependencies dialog box
http://msdn2.microsoft.com/en-us/library/cb8t5a6t(vs.71).aspx

Properties

Article ID: 818452 - Last Review: May 12, 2007 - Revision: 2.2
APPLIES TO
  • Microsoft Visual Studio .NET 2003 Enterprise Architect
  • Microsoft Visual Studio .NET 2003 Enterprise Developer
Keywords: 
kbqfe kbhotfixserver kbvs2005swept kbvs2005doesnotapply kbpending kbide kbappdev kbbug KB818452

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com