Udostępnij za pośrednictwem


Web Project Settings Conversion

Because Visual Studio does not maintain project files for Web development, the conversion process must transfer relevant project and solution settings into a Visual Studio format. For example, the conversion process moves some project settings into the Web.config file, which in Microsoft Visual Studio 2005 is expanded to store more information than in earlier versions of Visual Studio .NET.

Many settings maintained in Visual Studio .NET are not applicable to Visual Studio 2005, so they are not converted. For example, project settings for Web access mode (file share or FrontPage) and for designer defaults do not apply in Visual Studio, so they are not converted. Project settings that are set to default values are also not converted; that is, Visual Studio does not make a new setting with the default value in it.

Projects with Multiple Configurations

If a project contains multiple configurations (Debug compilation, Release compilation, and so on), conversion follows this logic:

  • If the project contains only Debug and Release configurations, then the Debug configuration is converted to Visual Studio 2005.

  • If additional configurations exist, Visual Studio prompts you for the configuration settings that should be converted to Visual Studio 2005.

References

References to assemblies in the project's Bin folder do not need to be converted; Visual Studio Web sites automatically pick up references to code in the Bin folder. If the project contains a reference to an assembly in the global assembly cache, the reference is moved to the Web.config file in the following format.

<compilation>
  <assemblies>
    <add assembly="System.Messaging" />
  </assemblies>
</compilation>

Assembly references are not converted if the assembly is already referenced by default in ASP.NET (for example, System.Drawing).

In Visual Studio .NET, referenced assemblies (for example, assemblies that are referenced outside of the solution in which the Web project is located) could have the CopyLocal property set to true, which would automatically update the referenced assembly. In Visual Studio 2005, this behavior is replaced by creating a refresh file in the Bin folder. The refresh file contains the path to the external referenced assembly and has the extension .refresh appended to the assembly name.

XML Web references are converted by copying the .wsdl file to the App_WebReferences directory. The Web service proxy and reference-map files are not required in Visual Studio 2005.

Conversion of Common Settings

The following table lists Common Properties project settings and how they are treated by the Visual Studio conversion process.

Note

You can see the current values for these settings in Visual Studio. In Solution Explorer, right-click the project, click Properties, and then click Common Properties.

Setting

Conversion logic

General

Settings are not converted.

Web Settings

Settings are not converted.

Designer Defaults

Settings are not converted.

References Path

Settings are not converted.

Build (Visual Basic client projects)

  • Option Explicit

    If set to false, this setting is moved to the Web.config file:

    <compilation explicit="false">

  • Option Strict

    If set to true, this setting is moved to the Web.config file:

    <compilation strict="true" />

  • Option Compare

    If set to Text, this setting is moved to the Web.config file:

    <compiler language="vb"

    compilerOptions="optioncompare:text" />

Imports (Visual Basic client projects)

Import settings that are not already imported by default in ASP.NET are moved to the Web.config file:

<pages>

<namespaces>

<add namespace="Namespace" />

</namespaces>

</pages>

Conversion affects only the import settings for ASP.NET Web pages. For classes in the App_Code directory, you must add import settings manually.

Conversion of Configuration Settings

Configuration settings for a project differ slightly depending on what programming language the project uses. The following tables list how configuration settings are treated by the Visual Studio conversion process, broken out by language.

Note

You can see the current values for these settings in Visual Studio. In Solution Explorer, right-click the project, click Properties, and then click Configuration Properties.

Configuration Settings — All Languages

The following table lists Configuration project settings that appear in all project types, and describes how they are treated by the Visual Studio conversion process.

Setting

Conversion logic

Debugging

  • Enable ASP Debugging

    Setting is not converted.

  • Enable ASP.NET Debugging

    Setting is not converted.

  • Enable Unmanaged Debugging

    Setting is converted as-is.

  • Enable SQL Debugging

    Setting is converted as-is.

  • Start Action settings

    Settings are moved to a per-user, client-side cache.

  • Command Line Arguments

    Setting is converted as-is.

  • Working Directory

    Setting is converted as-is.

  • Always Use Internet Explorer

    Setting is not converted.

  • Enable Remote Debugging

    Setting is not converted.

  • Remote Debug Machine

    Setting is not converted.

Configuration Settings — Visual Basic .NET

The following table lists Configuration project settings that appear in a Visual Basic .NET project, and describes how they are treated by the Visual Studio conversion process.

Setting

Conversion logic

Build

  • Output Path

    Setting is not converted.

  • Generate Debugging Information

    Setting is moved to the Web.config file:

    <compilation debug="true|false" />

  • Register for COM Interop

    Setting is not converted.

  • Enable build warnings (Visual Basic client projects)

    Setting is not converted. Build warnings are always enabled in Visual Studio .NET.

  • Treat compiler warnings as errors (Visual Basic client projects)

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="vb"

    compilerOptions="warnaserror+" />

  • Define DEBUG constant (Visual Basic client projects)

    Setting is moved to the Web.config file:

    <compiler

    language="vb"

    compilerOptions="define:Debug" />

  • Define TRACE constant (Visual Basic client projects)

    Setting is moved to the Web.config file:

    <compiler

    language="vb"

    compilerOptions="define:Trace" />

  • Custom constants (Visual Basic client projects)

    Setting is moved to the Web.config file:

    <compiler

    language="vb"

    compilerOptions="define:<list>" />

  • XML Documentation

    If set, this setting is moved to the Web.config file:

    <compiler language="c#"

    compilerOptions="doc:<filepath>" />

  • Conditional Compilation Constants

    Setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="d:<symbols>" />

  • Optimize Code

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="o" />

  • Check for Arithmetic Overflow/Underflow

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="checked+" />

  • Allow Unsafe Code Blocks

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="unsafe+" />

  • Warning Level

    If not set to 4, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="w:<level>" />

  • Treat Warnings As Errors

    If set to true, this setting is moved to the Web.config file:

    <compiler language="c#"

    compilerOptions="warnaserror+" />

  • Suppress Specific Warnings

    If set, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="nowarn:<warning list>" />

Optimizations (Visual Basic client projects)

  • Remove integer overflow checks

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="vb"

    compilerOptions="removeintchecks+" />

  • Enabled optimizations

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="vb"

    compilerOptions="optimize+" />

  • Enable incremental build

    Setting is not converted.

  • DLL base address

    Setting is not converted.

Configuration Settings — C#

The following table lists Configuration project settings that appear in a C# project, and describes how they are treated by the Visual Studio conversion process.

Setting

Conversion logic

Build

  • Conditional Compilation Constants

    Setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="d:<symbols>" />

  • Optimize Code

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="o" />

  • Check for Arithmetic Overflow/Underflow

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="checked+" />

  • Allow Unsafe Code Blocks

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="unsafe+" />

  • Warning Level

    If not set to 4, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="w:<level>" />

  • Treat Warnings As Errors

    If set to true, this setting is moved to the Web.config file:

    <compiler language="c#"

    compilerOptions="warnaserror+" />

  • Suppress Specific Warnings

    If set, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="nowarn:<warning list>" />

  • Output Path

    Setting is not converted.

  • XML Documentation

    If set, this setting is moved to the Web.config file:

    <compiler language="c#"

    compilerOptions="doc:<filepath>" />

  • Generate Debugging Information

    Setting is moved to the Web.config file:

    <compilation debug="true|false" />

  • Register for COM Interop

    Setting is not converted.

Advanced

  • Incremental Build

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="incr+" />

  • Base Address

    Setting is not converted.

  • File Alignment

    If not set to 4096, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="filealign:<n>" />

  • Do not Use Mscorlib

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="c#"

    compilerOptions="nostdlib+" />

Configuration Settings — J#

The following table lists Configuration project settings that appear in a Microsoft J# .NET project and describes how they are treated by the Visual Studio conversion process.

Setting

Conversion logic

Build

  • Conditional Compilation Constants

    Setting is moved to the Web.config file:

    <compiler

    language="j#"

    compilerOptions="d:<symbols>" />

  • Optimize Code

    If set to true, this setting is moved to the Web.config file:

    <compiler

    language="j#"

    compilerOptions="o" />

  • Warning Level

    If not set to 4, this setting is moved to the Web.config file:

    <compiler

    language="j#"

    compilerOptions="w:<level>" />

  • Treat Warnings As Errors

    If set to true, this setting is moved to the Web.config file:

    <compiler language="j#"

    compilerOptions="warnaserror+" />

  • Suppress Specific Warnings

    If set, this setting is moved to the Web.config file:

    <compiler

    language="j#"

    compilerOptions="nowarn:<warning list>" />

  • Output Path

    Setting is not converted.

  • Generate Debugging Information

    Setting is moved to the Web.config file:

    <compilation debug="true|false" />

  • Register for COM Interop

    Setting is not converted.

Advanced

  • Base Address

    Setting is not converted.

  • Additional Options

    If set, this setting is moved to the Web.config file:

    <compiler

    language="j#"

    compilerOptions="<list of options>" />

See Also

Concepts

Web Project Conversion from Visual Studio .NET

Web Solution and Project File Conversion