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

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

On This Page

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.

MORE INFORMATION

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.
  3. In Solution Explorer, rename the Web.config file to Debug.config.
  4. In Solution Explorer, right-click WebApplication1.
  5. 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.
  6. Under Templates, click Web Configuration File.
  7. In the Name box, type Release.config, and then click Open.
  8. In Solution Explorer, right-click WebApplication1, and then click Properties.

    The WebApplication1 Property Pages dialog box appears.
  9. In the left pane, click the Configuration Properties folder.
  10. In the WebApplication1 Property Pages dialog box, click Configuration Manager.

    The Configuration Manager dialog box appears.
  11. Verify that the Active Solution Configuration box contains Debug, and then click Close.
  12. Under the Configuration Properties folder, click Deployment.
  13. In the Configuration section of the WebApplication1 Property Pages dialog box, click Debug.config in the Override file box.
  14. In the WebApplication1 Property Pages dialog box, click Apply, and then click Configuration Manager.

    The Configuration Manager dialog box appears.
  15. In the Active Solution Configuration box, click Release, and then click Close.
  16. In the Configuration section of the WebApplication1 Property Pages dialog box, click Release.config in the Override file box.
  17. In the WebApplication1 Property Pages dialog box, click Apply.
  18. In the left pane, click the Common Properties folder.
  19. Under the Common Properties folder, click Build.
  20. In the Supported Runtimes section of the WebApplication1 Property Pages dialog box, click Change.

    The .NET Framework Version dialog box appears.
  21. Click to select the Both Microsoft .NET Framework v1.1 and v1.0 (advanced) option, and then click Update.
  22. In the WebApplication1 Property Pages dialog box, click OK.
Visual Studio creates a Web.config file.

REFERENCES

For more information, visit the following Microsoft Developer Network (MSDN) Web sites:
Configuration files
http://msdn2.microsoft.com/en-us/library/1xtk877y(vs.71).aspx

Build, common properties, <Projectname> Property Pages dialog box
http://msdn2.microsoft.com/en-us/library/Aa301830(VS.71).aspx

Deployment, configuration properties, <Projectname> Property Pages dialog box
http://msdn2.microsoft.com/en-us/library/Aa301883(VS.71).aspx

Properties

Article ID: 834058 - Last Review: November 27, 2007 - Revision: 2.6
APPLIES TO
  • Microsoft Visual Basic 2005
  • Microsoft Visual Basic .NET 2003 Standard Edition
Keywords: 
kbvs2005swept kbvs2005applies kbxml kbweb kbideproject kbconfig kbsxs kbprb KB834058

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