summaryrefslogtreecommitdiff
path: root/.packages/microsoft.dotnet.arcade.sdk/1.0.0-beta.19461.7/tools/ProjectDefaults.props
blob: daf5422a1c23c9a01599d52606552a84cb5d774d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?xml version="1.0" encoding="utf-8"?>
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
<Project>
  <PropertyGroup>
    <SignAssembly>true</SignAssembly>
    <StrongNameKeyId>MicrosoftShared</StrongNameKeyId>
    <ChecksumAlgorithm>SHA256</ChecksumAlgorithm>
    <HighEntropyVA>true</HighEntropyVA>
    <NeutralLanguage>en-US</NeutralLanguage>
    <Company>Microsoft Corporation</Company>
    <CopyrightMicrosoft>© Microsoft Corporation. All rights reserved.</CopyrightMicrosoft>
    <CopyrightNetFoundation>© .NET Foundation and Contributors</CopyrightNetFoundation>
    <Authors>Microsoft</Authors>
    <Serviceable>true</Serviceable>
    <DevelopmentDependency>false</DevelopmentDependency>
    <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
    <PublishRepositoryUrl>true</PublishRepositoryUrl>

    <!-- Disable the message indicating we are using a preview SDK. That is understood and by design -->
    <SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>

    <!-- By default do not build NuGet package for a project. Project may override. -->
    <IsPackable>false</IsPackable>

    <!--
      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.

      PR validation build:
       - Embed PDBs to make it easier to debug crash dumps captured on the CI machine.

      Developer build:
       - Embed PDBs to be consistent with PR validation build.    
    -->
    <DebugType>portable</DebugType>
    <DebugType Condition="'$(OfficialBuild)' != 'true'">embedded</DebugType>

    <!-- 
      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.
    -->
    <AssemblySearchPaths>
      {HintPathFromItem};
      {TargetFrameworkDirectory};
      {RawFileName};
    </AssemblySearchPaths>
  </PropertyGroup>

  <PropertyGroup>
    <Language Condition="'$(MSBuildProjectExtension)' == '.csproj'">C#</Language>
    <Language Condition="'$(MSBuildProjectExtension)' == '.vbproj'">VB</Language>
    <Language Condition="'$(MSBuildProjectExtension)' == '.fsproj'">F#</Language>
    <Language Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">C++</Language>
  </PropertyGroup>

  <!--
    When building WPF / VSIX 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="'$(Language)' == 'C#' or Exists('$(MSBuildProjectDirectory)\$(AssemblyName).csproj')">
          <PropertyGroup>
            <Language>C#</Language>
            <LanguageTargets>$(MSBuildToolsPath)\Microsoft.CSharp.targets</LanguageTargets>
          </PropertyGroup>
        </When>

        <When Condition="'$(Language)' == 'VB' or Exists('$(MSBuildProjectDirectory)\$(AssemblyName).vbproj')">
          <PropertyGroup>
            <Language>VB</Language>
            <LanguageTargets>$(MSBuildToolsPath)\Microsoft.VisualBasic.targets</LanguageTargets>
          </PropertyGroup>
        </When>
      </Choose>
    </When>
  </Choose>

  <Choose>
    <!-- C# specific settings -->
    <When Condition="'$(Language)' == 'C#'">
      <PropertyGroup>
        <NoWarn>$(NoWarn);1701;1702;1705;1591</NoWarn>
      </PropertyGroup>
    </When>

    <!-- VB specific settings -->
    <When Condition="'$(Language)' == 'VB'">
      <PropertyGroup>
        <MyType>Empty</MyType>
        <OptionCompare>Binary</OptionCompare>
        <OptionStrict>On</OptionStrict>
        <RemoveIntegerChecks>true</RemoveIntegerChecks>
      </PropertyGroup>
    </When>

    <!-- F# specific settings -->
    <When Condition="'$(Language)' == 'F#'">
      <PropertyGroup>
        <!-- F# compiler doesn't support PathMap (see https://github.com/Microsoft/visualfsharp/issues/3812) -->
        <DeterministicSourcePaths>false</DeterministicSourcePaths>
      </PropertyGroup>
    </When>

    <!-- C++ specific settings -->
    <When Condition="'$(Language)' == 'C++'">
      <PropertyGroup>
        <OutDir>$(OutputPath)</OutDir>

        <!-- 
          Disable NuGet package resolution during build - PackageReferences are not fully supported 
          Props and target files are still going to be imported from referenced packages.
        -->
        <ResolveNuGetPackages>false</ResolveNuGetPackages>
      </PropertyGroup>
    </When>

  </Choose>

  <!-- 
    Implements proposal https://github.com/dotnet/designs/pull/33.
  -->
  <ItemGroup Condition="'$(UsingToolNetFrameworkReferenceAssemblies)' == 'true'">
    <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="$(MicrosoftNetFrameworkReferenceAssembliesVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
  </ItemGroup>

</Project>