Microsoft KB Archive/818452

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

Article ID: 818452

Article Last Modified on 5/12/2007

-

APPLIES TO


 * Microsoft Visual Studio .NET 2003 Enterprise Architect
 * Microsoft Visual Studio .NET 2003 Enterprise Developer

-





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 &quot;Applies to&quot; section.



Steps to reproduce the problem
 Start Visual Studio .NET 2003. Create an Enterprise Template project:  On the File menu, point to New, and then click Project. The New Project dialog box appears. Under Project Types, expand Other Projects, and then click Enterprise Template Projects. Under Templates, click Enterprise Template Project.</li> In the Name box, type MyTemplate, and then click OK.</li></ol> </li> Add any existing ASP.NET Web application project to the MyTemplate project: <ol style="list-style-type: lower-alpha;"> In Solution Explorer, right-click, point to Add, and then click Existing Project. The Add Existing Project dialog box appears.</li> In the Add Existing Project dialog box, click an ASP.NET Web application project, and then click Open.</li></ol> </li> Repeat step 3 to add an existing class library DLL to the MyTemplate project.</li> Add project dependencies to the MyTemplate project: <ol style="list-style-type: lower-alpha;"> In the Solution Explorer, click .</li> On the Project menu, click Project Dependencies. The Project Dependencies dialog box appears.</li> 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.</li> Under Projects, select the project that you added in step 3.</li> In Depends on box, click to select the check box next to the class library DLL that you added in step 4.</li> Click the Build Order tab. Notice the build sequence of the projects.</li></ol> </li> Save the MyTemplate project.</li> Reopen the MyTemplate project.

Notice that the project dependencies that you set in step 5 have not been saved.</li></ol>

<div class="references_section">