Microsoft KB Archive/834058

= Visual Studio creates a Web.config file after you change the Supported Runtimes property of a Visual Basic Web Application project =

Article ID: 834058

Article Last Modified on 11/27/2007

-

APPLIES TO


 * Microsoft Visual Basic 2005
 * Microsoft Visual Basic .NET 2003 Standard Edition

-





SYMPTOMS
Microsoft Visual Studio 2005 creates a Web.config file after you change the Supported Runtimes property of a Microsoft Visual Basic 2005 Web Application project. This behavior also occurs in Microsoft Visual Studio .NET 2003 when you are using Microsoft Visual Basic .NET 2003.



CAUSE
This behavior occurs if your Visual Basic Web Application project does not already contain a Web.config file when you change the Supported Runtimes property. Visual Studio creates a Web.config file that contains information that corresponds to the change in the Supported Runtimes property. Visual Studio creates this Web.config file even if you use the Configuration Override file feature to configure your application to use another configuration file. You cannot use the Configuration Override file feature and the Supported Runtimes property together.

Note Deployment projects ignore the Web.config file that Visual Studio creates if you change the Supported Runtimes property. Instead, deployment projects use the configuration file that you specify by using the Configuration Override file feature.



STATUS
This behavior is by design.



Steps to reproduce the behavior

 * 1) Start Visual Studio 2005 or Visual Studio .NET 2003.
 * 2) Use Visual Basic 2005 or Visual Basic .NET to create an ASP.NET Web Application project.

By default, the Web.config file is created.
 * 1) In Solution Explorer, rename the Web.config file to Debug.config.
 * 2) In Solution Explorer, right-click WebApplication1.
 * 3) Point to Add, and then click Add New Item.

Note In Visual Studio 2005, click New Item instead of Add New Item.

The Add New Item - WebApplication1 dialog box appears.
 * 1) Under Templates, click Web Configuration File.
 * 2) In the Name box, type Release.config, and then click Open.
 * 3) In Solution Explorer, right-click WebApplication1, and then click Properties.

The WebApplication1 Property Pages dialog box appears.
 * 1) In the left pane, click the Configuration Properties folder.
 * 2) In the WebApplication1 Property Pages dialog box, click Configuration Manager.

The Configuration Manager dialog box appears.
 * 1) Verify that the Active Solution Configuration box contains Debug, and then click Close.
 * 2) Under the Configuration Properties folder, click Deployment.
 * 3) In the Configuration section of the WebApplication1 Property Pages dialog box, click Debug.config in the Override file box.
 * 4) In the WebApplication1 Property Pages dialog box, click Apply, and then click Configuration Manager.

The Configuration Manager dialog box appears.
 * 1) In the Active Solution Configuration box, click Release, and then click Close.
 * 2) In the Configuration section of the WebApplication1 Property Pages dialog box, click Release.config in the Override file box.
 * 3) In the WebApplication1 Property Pages dialog box, click Apply.
 * 4) In the left pane, click the Common Properties folder.
 * 5) Under the Common Properties folder, click Build.
 * 6) In the Supported Runtimes section of the WebApplication1 Property Pages dialog box, click Change.

The .NET Framework Version dialog box appears.
 * 1) Click to select the Both Microsoft .NET Framework v1.1 and v1.0 (advanced) option, and then click Update.
 * 2) In the WebApplication1 Property Pages dialog box, click OK.

Visual Studio creates a Web.config file.

