Settings.props 20.1 KB
Newer Older
1
<?xml version="1.0" encoding="utf-8"?>
2
<!-- Copyright (c)  Microsoft.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information. -->
3
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
J
Jared Parsons 已提交
4

T
Tomas Matousek 已提交
5 6
  <PropertyGroup>
    <RepoRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\'))</RepoRoot>
T
Tomas Matousek 已提交
7
    <RepositoryUrl>https://github.com/dotnet/roslyn</RepositoryUrl>
8
    <RepositoryRawUrl>https://raw.githubusercontent.com/dotnet/roslyn</RepositoryRawUrl>
T
Tomas Matousek 已提交
9 10 11 12
  </PropertyGroup>

  <Import Project="Packages.props" />
  <Import Project="FixedPackages.props" />
13
  <Import Project="Tools.props" />
14
  <Import Project="Versions.props" />
J
Jared Parsons 已提交
15 16

  <PropertyGroup>
T
Tomas Matousek 已提交
17 18 19 20
    <Company>Microsoft Corporation</Company>
    <Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
    <Authors>Microsoft</Authors>

21 22 23
    <JenkinsBuild>false</JenkinsBuild>
    <JenkinsBuild Condition="'$(JENKINS_HOME)' != ''">true</JenkinsBuild>
    <DeveloperBuild>false</DeveloperBuild>
24
    <DeveloperBuild Condition="'$(OfficialBuild)' != 'true' AND '$(JenkinsBuild)' != 'true'">true</DeveloperBuild>
T
Tomas Matousek 已提交
25

26
    <NuGetToolPath>$(RepoRoot)nuget.exe</NuGetToolPath>
27 28
    <!-- Disable the implicit nuget fallback folder as it makes it hard to locate and copy ref assemblies to the test output folder -->
    <DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
29
    <ToolsetPackagesDir>$(RepoRoot)build\ToolsetPackages\</ToolsetPackagesDir>
30 31
    <VSIXExpInstallerPackageName>RoslynTools.Microsoft.VSIXExpInstaller</VSIXExpInstallerPackageName>
    <VSIXExpInstallerPackageVersion>0.2.1-beta</VSIXExpInstallerPackageVersion>
32
    <RoslynDiagnosticsNugetPackageVersion>$(MicrosoftNetRoslynDiagnosticsVersion)</RoslynDiagnosticsNugetPackageVersion>
33
    <!-- Disable analyzers if NuGet deviated from the expected restore location (e.g. by changing case on a case-sensitive file system) -->
34
    <UseRoslynAnalyzers Condition="!Exists('$(NuGetPackageRoot)\Microsoft.CodeQuality.Analyzers\$(RoslynDiagnosticsNugetPackageVersion)\analyzers\dotnet\cs\Microsoft.CodeQuality.Analyzers.dll')">False</UseRoslynAnalyzers>
35
    <RoslynDiagnosticsPropsFilePath>$(NuGetPackageRoot)/microsoft.net.roslyndiagnostics/$(RoslynDiagnosticsNugetPackageVersion)/build/Microsoft.Net.RoslynDiagnostics.props</RoslynDiagnosticsPropsFilePath>
36
    <RoslynPortableTargetFrameworks>net461;netcoreapp2.0</RoslynPortableTargetFrameworks>
A
Ashley Hauck 已提交
37
    <RoslynPortableTargetFrameworks46>net46;netcoreapp2.0</RoslynPortableTargetFrameworks46>
A
Ashley Hauck 已提交
38
    <RoslynPortableRuntimeIdentifiers>win;win-x64;linux-x64;osx-x64</RoslynPortableRuntimeIdentifiers>
39
    <RoslynDesktopRuntimeIdentifier>win</RoslynDesktopRuntimeIdentifier>
40
    <RoslynDesktopRuntimeIdentifierX86>win-x86</RoslynDesktopRuntimeIdentifierX86>
A
Ashley Hauck 已提交
41 42
    <UseSharedCompilation>true</UseSharedCompilation>

T
Tomas Matousek 已提交
43
    <UsingToolPdbConverter>true</UsingToolPdbConverter>
44
    <Features>strict, IOperation</Features>
45
    <ProduceReferenceAssembly>true</ProduceReferenceAssembly>
J
Jared Parsons 已提交
46 47
    <Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
    <SignAssembly>true</SignAssembly>
48
    <GenerateDocumentationFile>true</GenerateDocumentationFile>
49 50 51 52
    <!-- The new SDK introduced a GenerateAssemblyInfo target, which is disabled by GenerateAssemblyInfo=false.
         Otherwise, it writes to the same file (GeneratedAssemblyInfoFile) as our GenerateAssemblyInfoFile target.
         Follow-up issue to reconcile the two: https://github.com/dotnet/roslyn/issues/19645 -->
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
S
Sam Harwell 已提交
53
    <UseRoslynAnalyzers Condition="'$(UseRoslynAnalyzers)' == ''">true</UseRoslynAnalyzers>
54
    <BaseOutputPath Condition="'$(BaseOutputPath)' == ''">$(RepoRoot)Binaries\</BaseOutputPath>
55
    <OutputPath>$(BaseOutputPath)$(Configuration)\</OutputPath>
56
    <BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)' == ''">$(RepoRoot)Binaries\Obj\</BaseIntermediateOutputPath>
J
Jared Parsons 已提交
57 58
    <BaseIntermediateOutputPath>$(BaseIntermediateOutputPath)$(MSBuildProjectName)\</BaseIntermediateOutputPath>
    <IntermediateOutputPath>$(BaseIntermediateOutputPath)$(Configuration)</IntermediateOutputPath>
T
Tomas Matousek 已提交
59
    <ArtifactsSymStoreDirectory Condition="'$(DeveloperBuild)' != 'true' and '$(OS)' == 'Windows_NT'">$(BaseOutputPath)$(Configuration)\SymStore\</ArtifactsSymStoreDirectory>
J
Jared Parsons 已提交
60

A
Andy Gocke 已提交
61
    <MicrosoftCSharpRefPath>$(NuGetPackageRoot)/microsoft.csharp/$(MicrosoftCSharpVersion)/ref/netstandard1.0/</MicrosoftCSharpRefPath>
62

A
Andy Gocke 已提交
63
    <ToolsetPackagesSemaphore>$(ToolsetPackagesDir)toolsetpackages.semaphore</ToolsetPackagesSemaphore>
64 65 66 67
    <ToolsetCompilerPackageName Condition="'$(MSBuildRuntimeType)' != 'Core'">Microsoft.Net.Compilers</ToolsetCompilerPackageName>
    <ToolsetCompilerPackageName Condition="'$(MSBuildRuntimeType)' == 'Core'">Microsoft.NETCore.Compilers</ToolsetCompilerPackageName>
    <ToolsetCompilerPackageVersion Condition="'$(MSBuildRuntimeType)' != 'Core'">$(MicrosoftNetCompilersVersion)</ToolsetCompilerPackageVersion>
    <ToolsetCompilerPackageVersion Condition="'$(MSBuildRuntimeType)' == 'Core'">$(MicrosoftNETCoreCompilersVersion)</ToolsetCompilerPackageVersion>
A
Andy Gocke 已提交
68
    <ToolsetCompilerPropsFilePath>$(NuGetPackageRoot)/$(ToolsetCompilerPackageName.ToLower())/$(ToolsetCompilerPackageVersion)/build/$(ToolsetCompilerPackageName).props</ToolsetCompilerPropsFilePath>
A
Andy Gocke 已提交
69
    <TargetFrameworkRootPath>$(NuGetPackageRoot)\roslyntools.referenceassemblies\$(RoslynToolsReferenceAssembliesVersion)\tools\framework</TargetFrameworkRootPath>
J
Jared Parsons 已提交
70

J
Jared Parsons 已提交
71
    <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">15.0</VisualStudioVersion>
72
    <VisualStudioReferenceMajorVersion Condition="'$(VisualStudioReferenceMajorVersion)' == ''">$(VisualStudioVersion.Substring($([System.Convert]::ToInt32(0)), $(VisualStudioVersion.IndexOf('.'))))</VisualStudioReferenceMajorVersion>
J
Jared Parsons 已提交
73 74 75 76 77
    <VisualStudioReferenceAssemblyVersion Condition="'$(VisualStudioReferenceAssemblyVersion)' == ''">$(VisualStudioReferenceMajorVersion).0.0.0</VisualStudioReferenceAssemblyVersion>
    <VisualStudioCodename>Dev$(VisualStudioReferenceMajorVersion)</VisualStudioCodename>
    <MinimumVisualStudioVersion>$(VisualStudioVersion)</MinimumVisualStudioVersion>

    <!-- Disable AppX packaging for the Roslyn source. Not setting this to false has the side effect
78
         that any builds of portable projects end up in a sub folder of $(OutputPath). Search for this flag in
J
Jared Parsons 已提交
79 80 81 82
         Microsoft.Common.CurrentVersion.targets to see how it is consumed -->
    <WindowsAppContainer>false</WindowsAppContainer>

    <MSBuildAssemblyNameFragment>Core</MSBuildAssemblyNameFragment>
83

84
    <!-- To copy .dll.config and .exe.config files of the referenced projects to the output dir
85 86
         (see https://github.com/Microsoft/msbuild/issues/1307) -->
    <AllowedReferenceRelatedFileExtensions>$(AllowedReferenceRelatedFileExtensions);.dll.config;.exe.config</AllowedReferenceRelatedFileExtensions>
J
Jared Parsons 已提交
87

88 89 90 91
    <!-- This controls the places MSBuild will consult to resolve assembly references.  This is 
         kept as minimal as possible to make our build reliable from machine to machine.  Global
         locations such as GAC, AssemblyFoldersEx, etc ... are deliberately removed from this 
         list as they will not be the same from machine to machine -->
J
Jared Parsons 已提交
92 93 94 95
    <AssemblySearchPaths>
      {TargetFrameworkDirectory};
      {RawFileName};
    </AssemblySearchPaths>
J
Jared Parsons 已提交
96

J
Jared Parsons 已提交
97 98 99
    <!-- https://github.com/dotnet/roslyn/issues/21183 -->
    <ImplicitlyExpandNETStandardFacades>false</ImplicitlyExpandNETStandardFacades>

J
Jared Parsons 已提交
100
    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
101

K
Kevin Halverson 已提交
102 103
    <!-- Live Unit Testing does not currently support PackageReference style restore unless the Sdk="Microsoft.NET.Sdk" attribute is used on projects.
         Removal of this work-around tracked by:  https://github.com/dotnet/roslyn/issues/20427 -->
104
    <ProjectAssetsFile Condition="'$(BuildingForLiveUnitTesting)' == 'true'">$(LiveUnitTestingOriginalBaseIntermediateOutputPath)project.assets.json</ProjectAssetsFile>
105 106 107

    <!-- https://github.com/dotnet/roslyn/issues/21272 -->
    <GenerateResourceMSBuildRuntime Condition="'$(TargetFramework)' == 'netcoreapp2.0'">CurrentRuntime</GenerateResourceMSBuildRuntime>
A
Ashley Hauck 已提交
108 109

    <!--
T
Tomas Matousek 已提交
110 111 112 113
      Official build:
       - Build standalone Portable PDBs to reduce the size of the binaries.
       - Convert Portable PDBs to Windows PDBs and publish the converted PDBs to Symbol Store to allow WinDBG, 
         Watson and other tools to find symbol format they understand.
A
Ashley Hauck 已提交
114

T
Tomas Matousek 已提交
115 116
      Jenkins build:
       - Embed PDBs to make it easier to debug Jenkins crash dumps.
A
Ashley Hauck 已提交
117

T
Tomas Matousek 已提交
118 119 120 121 122
      Developer build:
       - Embed PDBs to be consistent with Jenkins builds.
    -->
    <RoslynDebugType Condition="'$(OfficialBuild)' == 'true'">portable</RoslynDebugType>
    <RoslynDebugType Condition="'$(OfficialBuild)' != 'true'">embedded</RoslynDebugType>
T
Tomas Matousek 已提交
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138

    <!-- 
      The source root path used for deterministic normalization of source paths.
      
      If set the value is used in PathMap to instruct the compiler to normalize source paths 
      emitted to the binary and PDB and as a root for Source Link mapping.
      If set must end with a directory separator.
      
      If unset the PathMap need to be set explicitly to facilitate full determinism.
      
      The path can't be just a single '/' due to bug in Roslyn compilers:
      https://github.com/dotnet/roslyn/issues/22815
    -->
    <DeterministicSourceRoot Condition="'$(DeveloperBuild)' != 'true'">/_/</DeterministicSourceRoot>

    <EnableSourceLink Condition="'$(DeveloperBuild)' != 'true'">true</EnableSourceLink>
139
    <EnableDefaultNoneItems>false</EnableDefaultNoneItems>
140 141 142 143 144 145 146

    <!-- 
      Goal is to remove these in a future change and make it simpler to adopt new SDK 
      drops

      https://github.com/dotnet/roslyn/issues/23547
    -->
J
Jared Parsons 已提交
147 148
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
T
Tom Meschter 已提交
149 150 151 152 153 154 155 156 157 158

    <!-- It is only intended to automatically run update during dev cycle. However, It will fail the build on CI if the XLF file is not updated.
         XLF file should be checked in and loc team will update the XLF it with translated version.
    -->
    <UpdateXlfOnBuild Condition="'$(DeveloperBuild)' == 'true'">true</UpdateXlfOnBuild>

    <!-- Even when we're using the "desktop" version of MSBuild we always want to use the "Core" approach for generating satellite assemblies.
         This avoids a couple of issues in al.exe (see https://github.com/dotnet/roslyn/issues/23190 and https://github.com/dotnet/roslyn/issues/23191
         for details on those issues). -->
    <GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
159 160 161

    <CustomBeforeMicrosoftCommonTargets>$(MSBuildThisFileDirectory)\BeforeCommonTargets.targets</CustomBeforeMicrosoftCommonTargets>
    <CustomAfterMicrosoftCommonTargets>$(MSBuildThisFileDirectory)\AfterCommonTargets.targets</CustomAfterMicrosoftCommonTargets>
J
Jared Parsons 已提交
162 163 164 165 166
  </PropertyGroup>

  <!-- Windows specific settings -->
  <PropertyGroup Condition="'$(OS)' == 'Windows_NT'">

167
    <!-- Presently our code can build on machines with Dev14 or Dev15 but only successfully deploy
168
         in the Dev15 environment.  -->
169 170
    <IsDev15RC Condition="Exists('$(MSBuildBinPath)\..\..\..\Common7\IDE\Microsoft.VisualStudio.ExtensionEngine.dll')">true</IsDev15RC>
    <IsDev15RC Condition="Exists('$(MSBuildBinPath)\..\..\..\..\Common7\IDE\Microsoft.VisualStudio.ExtensionEngine.dll')">true</IsDev15RC>
171
    <DeployExtension Condition="'$(IsDev15RC)' != 'true' OR '$(VisualStudioVersion)' != '15.0'">false</DeployExtension>
J
Jared Parsons 已提交
172
    <VisualStudioBuildToolsVersion>$(MicrosoftVSSDKBuildToolsVersion)</VisualStudioBuildToolsVersion>
J
Jared Parsons 已提交
173 174 175

    <!-- For the moment our Dev14 VSI suites must continue to use the Dev14 SDK. -->
    <VisualStudioBuildToolsVersion Condition="'$(IsDev14VsiBuild)' == 'true'">14.3.25420</VisualStudioBuildToolsVersion>
J
Jared Parsons 已提交
176 177 178 179 180 181 182
  </PropertyGroup>

  <PropertyGroup Condition="'$(DevEnvDir)' == ''">
    <DevEnvDir>$([System.Environment]::ExpandEnvironmentVariables("%VS$(VisualStudioReferenceMajorVersion)0COMNTOOLS%"))</DevEnvDir>
    <DevEnvDir>$(DevEnvDir)\..\IDE</DevEnvDir>
    <DevEnvDir>$([System.IO.Path]::GetFullPath('$(DevEnvDir)'))</DevEnvDir>
  </PropertyGroup>
183

J
Jared Parsons 已提交
184 185 186 187 188
  <PropertyGroup Condition="'$(BootstrapBuildPath)' != ''">
    <CSharpCoreTargetsPath>$(BootstrapBuildPath)\Microsoft.CSharp.Core.targets</CSharpCoreTargetsPath>
    <VisualBasicCoreTargetsPath>$(BootstrapBuildPath)\Microsoft.VisualBasic.Core.targets</VisualBasicCoreTargetsPath>
  </PropertyGroup>

189 190 191 192 193 194 195 196 197 198
  <!-- During bootstrap builds it's important to load our bootstrap tasks before doing any
       other imports (which could load a same named DLL) -->
  <UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Csc"
             AssemblyFile="$(BootstrapBuildPath)\Microsoft.Build.Tasks.CodeAnalysis.dll"
             Condition="'$(BootstrapBuildPath)' != ''" />
  <UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.Vbc"
             AssemblyFile="$(BootstrapBuildPath)\Microsoft.Build.Tasks.CodeAnalysis.dll"
             Condition="'$(BootstrapBuildPath)' != ''" />
  <UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.ValidateBootstrap"
             AssemblyFile="$(BootstrapBuildPath)\Microsoft.Build.Tasks.CodeAnalysis.dll"
199 200 201
             Condition="'$(BootstrapBuildPath)' != ''" />
  <UsingTask TaskName="Microsoft.CodeAnalysis.BuildTasks.CopyRefAssembly"
             AssemblyFile="$(BootstrapBuildPath)\Microsoft.Build.Tasks.CodeAnalysis.dll"
202
             Condition="'$(BootstrapBuildPath)' != ''" />
203
  <UsingTask TaskName="Roslyn.MSBuild.Util.FindNuGetAssetsForVsix"
J
Jared Parsons 已提交
204 205 206 207
             AssemblyFile="$(NuGetPackageRoot)\Roslyn.Build.Util\$(RoslynBuildUtilVersion)\lib\net46\Roslyn.MSBuild.Util.dll"
             Condition="'$(OS)' == 'Windows_NT'" />
  <UsingTask TaskName="Roslyn.MSBuild.Util.ValidateBuildEnvironment"
             AssemblyFile="$(NuGetPackageRoot)\Roslyn.Build.Util\$(RoslynBuildUtilVersion)\lib\net46\Roslyn.MSBuild.Util.dll"
208
             Condition="'$(OS)' == 'Windows_NT'" />
209 210 211 212

  <Import Project="$(RoslynDiagnosticsPropsFilePath)" Condition="'$(UseRoslynAnalyzers)' == 'true' AND Exists('$(RoslynDiagnosticsPropsFilePath)')" />

  <ImportGroup Label="WindowsImports" Condition="'$(OS)' == 'Windows_NT'">
213 214 215
    <Import 
      Project="$(NuGetPackageRoot)\Microsoft.VSSDK.BuildTools\$(VisualStudioBuildToolsVersion)\build\Microsoft.VsSDK.BuildTools.props"
      Condition="Exists('$(NuGetPackageRoot)\Microsoft.VSSDK.BuildTools\$(VisualStudioBuildToolsVersion)\build\Microsoft.VsSDK.BuildTools.props')" />
216 217
  </ImportGroup>

J
Jared Parsons 已提交
218 219 220 221 222
  <!-- 
    Temporarirly disable Toolset builds on Unix 

    https://github.com/dotnet/roslyn/issues/21725
   -->
223
  <Import Project="$(ToolsetCompilerPropsFilePath)" Condition="Exists('$(ToolsetCompilerPropsFilePath)') AND '$(BootstrapBuildPath)' == '' AND '$(OS)' == 'Windows_NT'" />
224

J
Jared Parsons 已提交
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249
  <!--
      When building WPF projects MSBuild will create a temporary project with an extension of
      tmp_proj.  In that case the SDK is unable to determine the target language and cannot pick
      the correct import. Need to set it explicitly here.
      See https://github.com/dotnet/project-system/issues/1467
    -->
  <Choose>
    <When Condition="'$(MSBuildProjectExtension)' != '.csproj' and '$(MSBuildProjectExtension)' != '.vbproj' and '$(MSBuildProjectExtension)' != '.shproj'">
      <Choose>
        <When Condition="$(AssemblyName.Contains('Basic'))">
          <PropertyGroup>
            <Language>VB</Language>
            <LanguageTargets>$(MSBuildToolsPath)\Microsoft.VisualBasic.targets</LanguageTargets>
          </PropertyGroup>
        </When>
        <Otherwise>
          <PropertyGroup>
            <Language>C#</Language>
            <LanguageTargets>$(MSBuildToolsPath)\Microsoft.CSharp.targets</LanguageTargets>
          </PropertyGroup>
        </Otherwise>
      </Choose>
    </When>
  </Choose>

250 251 252 253 254 255 256
  <!-- 
    Language specifc settings 
    
    These deliberately come after importing the core targets. That way we can assure these are 
    the final settings, and not over written by core targets. Certain versions of the SDK for 
    example do exactly that.
    -->
J
Jared Parsons 已提交
257 258
  <Choose>
    <!-- VB specific settings -->
259
    <When Condition="'$(MSBuildProjectExtension)' == '.vbproj' OR '$(Language)' == 'VB' OR '$(ProjectLanguage)' == 'VisualBasic'">
J
Jared Parsons 已提交
260 261
      <PropertyGroup>
        <ProjectLanguage>VB</ProjectLanguage>
262
        <LangVersion>15.5</LangVersion>
J
Jared Parsons 已提交
263 264 265 266 267 268 269
        <MyType>Empty</MyType>
        <OptionCompare>Binary</OptionCompare>
        <OptionExplicit>On</OptionExplicit>
        <OptionInfer>On</OptionInfer>
        <OptionStrict>On</OptionStrict>
        <VBRuntime>Embed</VBRuntime>
        <RemoveIntegerChecks>true</RemoveIntegerChecks>
270
        <RootNamespace></RootNamespace>
J
Jared Parsons 已提交
271
        <MSBuildTargetsLanguageName>VisualBasic</MSBuildTargetsLanguageName>
272
        <NoWarn>$(NoWarn);40057</NoWarn>
J
Jared Parsons 已提交
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301
      </PropertyGroup>
      <ItemGroup>
        <Import Include="Microsoft.VisualBasic" />
        <Import Include="System" />
        <Import Include="System.Collections" />
        <Import Include="System.Collections.Generic" />
        <Import Include="System.Diagnostics" />
      </ItemGroup>
      <ItemGroup Condition="'$(TargetNetFX20)' != 'true'">
        <Import Include="System.Linq" />
      </ItemGroup>
      <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
        <DebugSymbols>true</DebugSymbols>
        <DefineDebug>true</DefineDebug>
        <DefineTrace>true</DefineTrace>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)' == 'Release'">
        <DefineTrace>true</DefineTrace>
        <Optimize>true</Optimize>
      </PropertyGroup>
      <PropertyGroup>
        <DefineConstants Condition="'$(InitialDefineConstants)' != ''">$(InitialDefineConstants)</DefineConstants>
      </PropertyGroup>
    </When>

    <!-- C# specific settings -->
    <When Condition="'$(MSBuildProjectExtension)' == '.csproj' OR '$(Language)' == 'C#' OR '$(ProjectLanguage)' == 'CSharp'">
      <PropertyGroup>
        <ProjectLanguage>CSharp</ProjectLanguage>
302
        <LangVersion>7.2</LangVersion>
J
Jared Parsons 已提交
303 304 305 306
        <WarningLevel>4</WarningLevel>
        <ErrorReport>prompt</ErrorReport>

        <!-- Suppress the following warnings by default for C# projects
307 308 309
                1573: Suppressed in order to allow documentation for some but not all parameters.
                      A warning will still be reported if the documentation defines/references a
                      parameter which does not exist.
J
Jared Parsons 已提交
310 311 312 313 314
                1591: So far we've chosen to implicitly implement interfaces and as a consequence
                      the methods are public.  We don't want to duplicate documentation for them
                      and hence suppress this warning until we get closer to release and a more
                      thorough documentation story
        -->
315
        <NoWarn>$(NoWarn);1573;1591;1701</NoWarn>
J
Jared Parsons 已提交
316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336
        <CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
        <MSBuildTargetsLanguageName>CSharp</MSBuildTargetsLanguageName>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
        <DebugSymbols>true</DebugSymbols>
        <DefineConstants>DEBUG;TRACE</DefineConstants>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)' == 'Release'">
        <DefineConstants>TRACE</DefineConstants>
        <Optimize>true</Optimize>
      </PropertyGroup>
      <PropertyGroup>
        <DefineConstants Condition="'$(InitialDefineConstants)' != ''">$(DefineConstants);$(InitialDefineConstants)</DefineConstants>
      </PropertyGroup>
    </When>

    <!-- C++ specific settings -->
    <When Condition="'$(MSBuildProjectExtension)' == '.vcxproj' OR '$(Language)' == 'C++' OR '$(ProjectLanguage)' == 'C++'">
      <PropertyGroup>
        <ProjectLanguage>C++</ProjectLanguage>
        <!-- Put intermediate outputs in the same place as managed projects for sanity -->
337
        <IntDir>$(IntermediateOutputPath)</IntDir>
J
Jared Parsons 已提交
338 339 340 341 342 343 344

        <!-- We just always want to build with whatever toolset matches the VS you're building with -->
        <PlatformToolset>v$(VisualStudioReferenceMajorVersion)0</PlatformToolset>
      </PropertyGroup>
    </When>
  </Choose>

345 346
  <PropertyGroup>
    <DebugType>$(RoslynDebugType)</DebugType>
J
Jared Parsons 已提交
347
  </PropertyGroup>
J
Jared Parsons 已提交
348
</Project>