Common MSBuild Project Properties
This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, use the version selector at the top left. We recommend upgrading to Visual Studio 2019. Download it here
The following table lists frequently used properties that are defined in the Visual Studio project files or included in .targets files that MSBuild provides.
Project files in Visual Studio (.csproj,.vbproj, vcxproj, and others) contain MSBuild XML code that runs when you build a project by using the IDE. Projects typically import one or more .targets files to define their build process. For more information, see .Targets Files.
List of Common Properties and Parameters
|Property or Parameter Name||Description|
|AdditionalLibPaths||Specifies additional folders in which compilers should look for reference assemblies.|
|AddModules||Causes the compiler to make all type information from the specified files available to the project you are compiling. This property is equivalent to the
|ALToolPath||The path where AL.exe can be found. This property overrides the current version of AL.exe to enable use of a different version.|
|ApplicationIcon||The .ico icon file to pass to the compiler for embedding as a Win32 icon. The property is equivalent to the
|ApplicationManifest||Specifies the path of the file that is used to generate external User Account Control (UAC) manifest information. Applies only to Visual Studio projects targeting Windows Vista.
In most cases, the manifest is embedded. However, if you use Registration Free COM or ClickOnce deployment, then the manifest can be an external file that is installed together with your application assemblies. For more information, see the NoWin32Manifest property in this topic.
|AssemblyOriginatorKeyFile||Specifies the file that's used to sign the assembly (.snk or .pfx) and that's passed to the ResolveKeySource Task to generate the actual key that's used to sign the assembly.|
|AssemblySearchPaths||A list of locations to search during build-time reference assembly resolution. The order in which paths appear in this list is meaningful because paths listed earlier takes precedence over later entries.|
|AssemblyName||The name of the final output assembly after the project is built.|
|BaseAddress||Specifies the base address of the main output assembly. This property is equivalent to the
|BaseOutputPath||Specifies the base path for the output file. If it is set, MSBuild will use
|BaseIntermediateOutputPath||The top-level folder where all configuration-specific intermediate output folders are created. The default value is
|BuildInParallel||A boolean value that indicates whether project references are built or cleaned in parallel when Multi-Proc MSBuild is used. The default value is
|BuildProjectReferences||A boolean value that indicates whether project references are built by MSBuild. Set
|CleanFile||The name of the file that will be used as the "clean cache." The clean cache is a list of generated files to be deleted during the cleaning operation. The file is put in the intermediate output path by the build process.
This property specifies only file names that do not have path information.
|CodePage||Specifies the code page to use for all source-code files in the compilation. This property is equivalent to the
|CompilerResponseFile||An optional response file that can be passed to the compiler tasks.|
|Configuration||The configuration that you are building, either "Debug" or "Release."|
|CscToolPath||The path of csc.exe, the Visual C# compiler.|
|CustomBeforeMicrosoftCommonTargets||The name of a project file or targets file that is to be imported automatically before the common targets import.|
|DebugSymbols||A boolean value that indicates whether symbols are generated by the build.
Setting /p:DebugSymbols=false on the command line disables generation of program database (.pdb) symbol files.
|DefineConstants||Defines conditional compiler constants. Symbol/value pairs are separated by semicolons and are specified by using the following syntax:
symbol1 = value1 ; symbol2 = value2
The property is equivalent to the
|DefineDebug||A boolean value that indicates whether you want the DEBUG constant defined.|
|DefineTrace||A boolean value that indicates whether you want the TRACE constant defined.|
|DebugType||Defines the level of debug information that you want generated. Valid values are "full," "pdbonly," and "none."|
|DelaySign||A boolean value that indicates whether you want to delay-sign the assembly rather than full-sign it.|
|DisabledWarnings||Suppresses the specified warnings. Only the numeric part of the warning identifier must be specified. Multiple warnings are separated by semicolons. This parameter corresponds to the
|DisableFastUpToDateCheck||A boolean value that applies to Visual Studio only. The Visual Studio build manager uses a process called FastUpToDateCheck to determine whether a project must be rebuilt to be up to date. This process is faster than using MSBuild to determine this. Setting the DisableFastUpToDateCheck property to
|DocumentationFile||The name of the file that is generated as the XML documentation file. This name includes only the file name and has no path information.|
|ErrorReport||Specifies how the compiler task should report internal compiler errors. Valid values are "prompt," "send," or "none." This property is equivalent to the
|ExcludeDeploymentUrl||The GenerateDeploymentManifest Task adds a deploymentProvider tag to the deployment manifest if the project file includes any of the following elements:
Using ExcludeDeploymentUrl, however, you can prevent the deploymentProvider tag from being added to the deployment manifest even if any of the above URLs are specified. To do this, add the following property to your project file:
|FileAlignment||Specifies, in bytes, where to align the sections of the output file. Valid values are 512, 1024, 2048, 4096, 8192. This property is equivalent to the
|FrameworkPathOverride||Specifies the location of mscorlib.dll and microsoft.visualbasic.dll. This parameter is equivalent to the
|GenerateDocumentation||A boolean parameter that indicates whether documentation is generated by the build. If
|IntermediateOutputPath||The full intermediate output path as derived from
|KeyContainerName||The name of the strong-name key container.|
|KeyOriginatorFile||The name of the strong-name key file.|
|NoWin32Manifest||Determines whether the compiler generates the default Win32 manifest into the output assembly. The default value of
|ModuleAssemblyName||The name of the assembly that the compiled module is to be incorporated into. The property is equivalent to the
|NoLogo||A boolean value that indicates whether you want compiler logo to be turned off. This property is equivalent to the
|NoStdLib||A boolean value that indicates whether to avoid referencing the standard library (mscorlib.dll). The default value is
|NoVBRuntimeReference||A boolean value that indicates whether the Visual Basic runtime (Microsoft.VisualBasic.dll) should be included as a reference in the project.|
|NoWin32Manifest||A boolean value that indicates whether User Account Control (UAC) manifest information will be embedded in the application's executable. Applies only to Visual Studio projects targeting Windows Vista. In projects deployed using ClickOnce and Registration-Free COM, this element is ignored.
This property applies only to Visual Studio projects targeting Windows Vista. In projects deployed using ClickOnce and Registration-Free COM, this property is ignored.
You should add NoWin32Manifest only if you do not want Visual Studio to embed any manifest information in the application's executable; this process is called virtualization. To use virtualization, set
- For Visual Basic projects, remove the
- For Visual C# projects, set
|Optimize||A boolean value that when set to
|OptionCompare||Specifies how string comparisons are made. Valid values are "binary" or "text." This property is equivalent to the
|OptionExplicit||A boolean value that when set to
|OptionInfer||A boolean value that when set to
|OptionStrict||A boolean value that when set to
|OutputPath||Specifies the path to the output directory, relative to the project directory, for example, "bin\Debug".|
|OutputType||Specifies the file format of the output file. This parameter can have one of the following values:
- Library. Creates a code library. (Default value.)
- Exe. Creates a console application.
- Module. Creates a module.
- Winexe. Creates a Windows-based program.
This property is equivalent to the
|OverwriteReadOnlyFiles||A boolean value that indicates whether you want to enable the build to overwrite read-only files or trigger an error.|
|PdbFile||The file name of the .pdb file that you are emitting. This property is equivalent to the
|Platform||The operating system you are building for. Valid values are "Any CPU", "x86", and "x64".|
|RemoveIntegerChecks||A boolean value that indicates whether to disable integer overflow error checks. The default value is
|SGenUseProxyTypes||A boolean value that indicates whether proxy types should be generated by SGen.exe.
The SGen target uses this property to set the UseProxyTypes flag. This property defaults to true, and there is no UI to change this. To generate the serialization assembly for non-webservice types, add this property to the project file and set it to false before importing the Microsoft.Common.Targets or the C#/VB.targets.
|SGenToolPath||An optional tool path that indicates where to obtain SGen.exe when the current version of SGen.exe is overridden.|
|StartupObject||Specifies the class or module that contains the Main method or Sub Main procedure. This property is equivalent to the
|ProcessorArchitecture||The processor architecture that is used when assembly references are resolved. Valid values are "msil," "x86," "amd64," or "ia64."|
|RootNamespace||The root namespace to use when you name an embedded resource. This namespace is part of the embedded resource manifest name.|
|Satellite_AlgorithmId||The ID of the AL.exe hashing algorithm to use when satellite assemblies are created.|
|Satellite_BaseAddress||The base address to use when culture-specific satellite assemblies are built by using the
|Satellite_CompanyName||The company name to pass into AL.exe during satellite assembly generation.|
|Satellite_Configuration||The configuration name to pass into AL.exe during satellite assembly generation.|
|Satellite_Description||The description text to pass into AL.exe during satellite assembly generation.|
|Satellite_EvidenceFile||Embeds the specified file in the satellite assembly that has the resource name "Security.Evidence."|
|Satellite_FileVersion||Specifies a string for the File Version field in the satellite assembly.|
|Satellite_Flags||Specifies a value for the Flags field in the satellite assembly.|
|Satellite_GenerateFullPaths||Causes the build task to use absolute paths for any files reported in an error message.|
|Satellite_LinkResource||Links the specified resource files to a satellite assembly.|
|Satellite_MainEntryPoint||Specifies the fully-qualified name (that is, class.method) of the method to use as an entry point when a module is converted to an executable file during satellite assembly generation.|
|Satellite_ProductName||Specifies a string for the Product field in the satellite assembly.|
|Satellite_ProductVersion||Specifies a string for the ProductVersion field in the satellite assembly.|
|Satellite_TargetType||Specifies the file format of the satellite assembly output file as "library," "exe," or "win." The default value is "library."|
|Satellite_Title||Specifies a string for the Title field in the satellite assembly.|
|Satellite_Trademark||Specifies a string for the Trademark field in the satellite assembly.|
|Satellite_Version||Specifies the version information for the satellite assembly.|
|Satellite_Win32Icon||Inserts an .ico icon file in the satellite assembly.|
|Satellite_Win32Resource||Inserts a Win32 resource (.res file) into the satellite assembly.|
|SubsystemVersion||Specifies the minimum version of the subsystem that the generated executable file can use. This property is equivalent to the
|TargetCompactFramework||The version of the .NET Compact Framework that is required to run the application that you are building. Specifying this lets you reference certain framework assemblies that you may not be able to reference otherwise.|
|TargetFrameworkVersion||The version of the .NET Framework that is required to run the application that you are building. Specifying this lets you reference certain framework assemblies that you may not be able to reference otherwise.|
|TreatWarningsAsErrors||A boolean parameter that, if
|UseHostCompilerIfAvailable||A boolean parameter that, if
|Utf8Output||A boolean parameter that, if
|VbcToolPath||An optional path that indicates another location for vbc.exe when the current version of vbc.exe is overridden.|
|VbcVerbosity||Specifies the verbosity of the Visual Basic compiler’s output. Valid values are "Quiet," "Normal" (the default value), or "Verbose."|
|VisualStudioVersion||Specifies the version of Visual Studio under which this project should be considered to be running. If this property isn't specified, MSBuild sets it to a reasonable default value.
This property is used in several project types to specify the set of targets that are used for the build. If
|WarningsAsErrors||Specifies a list of warnings to treat as errors. This parameter is equivalent to the
|WarningsNotAsErrors||Specifies a list of warnings that are not treated as errors. This parameter is equivalent to the
|Win32Manifest||The name of the manifest file that should be embedded in the final assembly. This parameter is equivalent to the
|Win32Resource||The file name of the Win32 resource to be embedded in the final assembly. This parameter is equivalent to the