-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
common.props
106 lines (83 loc) · 5.42 KB
/
common.props
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
<Project>
<!-- redefine.props helps to override properties when it used as a submodule etc. -->
<Import Project="..\redefine.props" Condition="Exists('..\redefine.props')" />
<Import Project="..\..\redefine.props" Condition="Exists('..\..\redefine.props')" />
<PropertyGroup>
<RootOutDir>bin\prj\</RootOutDir>
<RootObjDir>bin\obj\</RootObjDir>
<OsUnixLike>false</OsUnixLike>
<OsUnixLike Condition="$([MSBuild]::IsOsUnixLike())">true</OsUnixLike>
<LangVersion>latest</LangVersion>
<TargetLatestRuntimePatch Condition="'$(TargetLatestRuntimePatch)'==''">true</TargetLatestRuntimePatch>
<MvsSlnGeneratePackageOnBuild Condition="'$(MvsSlnGeneratePackageOnBuild)'==''">true</MvsSlnGeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup Label="Supported TFMs">
<NetfxTFM>net40;net472</NetfxTFM>
<NetfxTFM Condition="'$(SuppressNetfxTFM)'=='true'"></NetfxTFM>
<NetStdTFM>netstandard2.0</NetStdTFM>
<NetStdTFM Condition="'$(SuppressNetStdTFM)'=='true'"></NetStdTFM>
<NetCoreTFM>netcoreapp2.1</NetCoreTFM>
<NetCoreTFM Condition="'$(SuppressNetCoreTFM)'=='true'"></NetCoreTFM>
<DotNetTFM>net5;net6</DotNetTFM>
<DotNetTFM Condition="'$(SuppressDotNetTFM)'=='true'"></DotNetTFM>
</PropertyGroup>
<PropertyGroup>
<MvsSlnTFM>$(NetfxTFM);$(DotNetTFM);$(NetCoreTFM);$(NetStdTFM)</MvsSlnTFM>
<MvsSlnTFM Condition="'$(OsUnixLike)'=='true'">$(DotNetTFM);$(NetCoreTFM);$(NetStdTFM)</MvsSlnTFM>
<MvsSlnTFM Condition="'$(BuildAndTestUsing)'!=''">$(BuildAndTestUsing)</MvsSlnTFM>
<MvsSlnTFM Condition="'$(OverrideMvsSlnTFM)'!=''">$(OverrideMvsSlnTFM)</MvsSlnTFM>
<MvsSlnTestTFM>$(NetfxTFM);$(DotNetTFM);$(NetCoreTFM)</MvsSlnTestTFM>
<MvsSlnTestTFM Condition="'$(OsUnixLike)'=='true'">$(DotNetTFM);$(NetCoreTFM)</MvsSlnTestTFM>
<MvsSlnTestTFM Condition="'$(BuildAndTestUsing)'!=''">$(BuildAndTestUsing)</MvsSlnTestTFM>
<MvsSlnTestTFM Condition="'$(OverrideMvsSlnTestTFM)'!=''">$(OverrideMvsSlnTestTFM)</MvsSlnTestTFM>
</PropertyGroup>
<PropertyGroup>
<OutPrjDir>$(RootOutDir)$(MSBuildProjectName)\$(Configuration)\$(TargetFramework)\</OutPrjDir>
<ObjPrjDir>$(RootObjDir)$(MSBuildProjectName)\$(Configuration)\$(TargetFramework)\</ObjPrjDir>
<OutDir>$([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(SolutionDir)`, `$(OutPrjDir)`))`))))</OutDir>
<OutputPath>$(OutDir)</OutputPath>
<IntermediateOutputPath>$([MSBuild]::Escape($([System.IO.Path]::GetFullPath(`$([System.IO.Path]::Combine(`$(SolutionDir)`, `$(ObjPrjDir)`))`))))</IntermediateOutputPath>
</PropertyGroup>
<PropertyGroup>
<IsNetCoreFamilyTarget>true</IsNetCoreFamilyTarget>
<IsNetCoreFamilyTarget Condition="$(TargetFramework.StartsWith('net4')) == 'true'">false</IsNetCoreFamilyTarget>
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition="'$(IsNetCoreFamilyTarget)' == 'true'">NETCORE;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(TargetFramework)' == 'netstandard2.0'">NETSTD20;NETSTD;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(TargetFramework)' == 'net40'">NET40;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<DefineConstants Condition="'$(MvsSlnFeatureGuidSha1)' == 'true'">FEATURE_GUID_SHA1;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(MvsSlnFeatureHuid)' == 'true'">FEATURE_HUID;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(MvsSlnFeatureExactRopOrderCmp)' == 'true'">FEATURE_EXACT_ROP_ORDER_CMP;$(DefineConstants)</DefineConstants>
<DefineConstants Condition="'$(MvsSlnFeatureCohExt)' == 'true'">FEATURE_COH_EXT;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="'$(IsNetCoreFamilyTarget)' != 'true'">
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Build" />
</ItemGroup>
<ItemGroup Condition="'$(IsNetCoreFamilyTarget)' == 'true'">
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
</ItemGroup>
<ItemGroup Condition="'$(MvsSlnFeatureHuid)' == 'true'">
<PackageReference Include="Huid" Version="1.0.0" />
</ItemGroup>
<PropertyGroup>
<OverridedTFM Condition="$(MvsSlnTFM.Contains('$(TargetFramework)'))=='false'">true</OverridedTFM>
<MicrosoftBuildVersion Condition="'$(MicrosoftBuildVersion)'==''">17.3.2</MicrosoftBuildVersion>
</PropertyGroup>
<ItemGroup Condition="'$(OverridedTFM)'!='true'">
<!-- Microsoft.Build -->
<PackageReference Version="15.9.20" Condition="'netstandard2.0'=='$(TargetFramework)'" Include="Microsoft.Build" />
<PackageReference Version="16.9.0" Condition="'netcoreapp2.1'=='$(TargetFramework)'" Include="Microsoft.Build" />
<PackageReference Version="16.11.0" Condition="'net5'=='$(TargetFramework)'" Include="Microsoft.Build" />
<PackageReference Version="17.3.2" Condition="'net6'=='$(TargetFramework)'" Include="Microsoft.Build" />
<!-- https://github.com/3F/MvsSln/wiki/Advanced-Features#how-to-use-modern-versions-of-msbuild-for-netfx -->
<!-- <PackageReference Version="16.3.0" Condition=" 'net472' == '$(TargetFramework)' " Include="Microsoft.Build" /> -->
<!-- <PackageReference Version="15.9.20" Condition=" 'net46' == '$(TargetFramework)' " Include="Microsoft.Build" /> -->
</ItemGroup>
<ItemGroup Condition="'$(OverridedTFM)'=='true'">
<PackageReference Version="$(MicrosoftBuildVersion)" Include="Microsoft.Build"/>
</ItemGroup>
</Project>