-
Notifications
You must be signed in to change notification settings - Fork 73
/
Microsoft.VisualStudio.SlnGen.csproj
61 lines (61 loc) · 3.98 KB
/
Microsoft.VisualStudio.SlnGen.csproj
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
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetDotNet9 Condition="'$(TargetDotNet9)' == '' And $([MSBuild]::VersionGreaterThanOrEquals('$(NETCoreSdkVersion)', '9.0'))">true</TargetDotNet9>
<OutputType>Exe</OutputType>
<TargetFrameworks>net461;net472;net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetDotNet9)' == 'true'">$(TargetFrameworks);net9.0</TargetFrameworks>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.config</AllowedOutputExtensionsInPackageBuildOutputFolder>
<IncludeReferenceCopyLocalPathsInBuildOutputInPackage>true</IncludeReferenceCopyLocalPathsInBuildOutputInPackage>
<IsTool>true</IsTool>
<NoWarn>$(NoWarn);NU5128;MSB3270</NoWarn>
<Prefer32Bit>false</Prefer32Bit>
<RollForward>LatestMinor</RollForward>
<ServerGarbageCollection>true</ServerGarbageCollection>
<ConcurrentGarbageCollection>false</ConcurrentGarbageCollection>
</PropertyGroup>
<ItemDefinitionGroup>
<PackageReference>
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemDefinitionGroup>
<Import Project="..\Shared\Shared.props" />
<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" />
<PackageReference Include="Microsoft.Build" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Runtime" IncludeAssets="None" GeneratePathProperty="true" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Extensions.FileSystemGlobbing" />
<PackageReference Include="System.Configuration.ConfigurationManager" ExcludeAssets="Runtime" />
</ItemGroup>
<ItemGroup>
<Reference Include="$(PkgMicrosoft_Build_Runtime)\contentFiles\any\net46\MSBuild.exe" Private="false" Condition="'$(TargetFramework)' == 'net461'" />
<Reference Include="$(PkgMicrosoft_Build_Runtime)\contentFiles\any\net472\MSBuild.exe" Private="false" Condition="'$(TargetFramework)' == 'net472'" />
<Reference Include="$(PkgMicrosoft_Build_Runtime)\contentFiles\any\net6.0\MSBuild.dll" Private="false" Condition="'$(TargetFramework)' == 'net6.0'" />
<Reference Include="$(PkgMicrosoft_Build_Runtime)\contentFiles\any\net7.0\MSBuild.dll" Private="false" Condition="'$(TargetFramework)' == 'net7.0'" />
<Reference Include="$(PkgMicrosoft_Build_Runtime)\contentFiles\any\net8.0\MSBuild.dll" Private="false" Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" Condition="'$(TargetFramework)' == 'net461' Or '$(TargetFramework)' == 'net472'" />
<None Include="Microsoft.VisualStudio.SlnGen.targets" Pack="true" PackagePath="build/;buildMultiTargeting/" />
</ItemGroup>
<!--
By default, this application will use the same runtime as whatever version it was built against. In reality, this application
should run against any version of the runtime with the same major version. This logic gets the major, minor, and build version
and sets RuntimeFramework.Version to the major.minor.build-alpha so at runtime it will work against any version of the runtime with
the same major version.
-->
<Target Name="SetRuntimeFramework" BeforeTargets="GenerateBuildRuntimeConfigurationFiles">
<PropertyGroup>
<_MajorMinorBuildRuntimeFramework>$([System.Text.RegularExpressions.Regex]::Match(%(RuntimeFramework.Version), '^\d+\.\d+\.\d+'))</_MajorMinorBuildRuntimeFramework>
<_PreviousRuntimeFramework>%(RuntimeFramework.Version)</_PreviousRuntimeFramework>
</PropertyGroup>
<ItemGroup>
<RuntimeFramework Update="@(RuntimeFramework)" Version="$(_MajorMinorBuildRuntimeFramework)-alpha" />
</ItemGroup>
</Target>
<Target Name="RestoreRuntimeFramework" AfterTargets="GenerateBuildRuntimeConfigurationFiles">
<ItemGroup>
<RuntimeFramework Update="@(RuntimeFramework)" Version="$(_PreviousRuntimeFramework)" />
</ItemGroup>
</Target>
</Project>