/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Compilers/Core/MSBuildTask/Directory.Build.targets
34 строки
2 KB
Jared Parsons
Give .NET Framework build task in sdk different identity (#78584)
17 май 2025, 03:52
Не верифицирован
17 май 2025, 03:52
74a8a6f
Код
Авторство
О чём код?
<?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> <ItemGroup> <PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" /> <PackageReference Include="Microsoft.Build.Tasks.Core" ExcludeAssets="Runtime" /> <PackageReference Include="System.Memory" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" /> <PackageReference Include="System.Runtime.CompilerServices.Unsafe" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" /> <CompilerVersionTargetsFile Include="$(IntermediateOutputPath)Microsoft.Managed.Core.CurrentVersions.targets" /> </ItemGroup> <Target Name="GenerateCompilerVersionTargets" BeforeTargets="AssignTargetPaths" DependsOnTargets="GenerateCompilerVersionTargetsFile"> <ItemGroup> <Content Include="@(CompilerVersionTargetsFile)"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <Pack>true</Pack> <BuildAction>None</BuildAction> <PackageCopyToOutput>true</PackageCopyToOutput> <PackagePath>contentFiles\any\any</PackagePath> </Content> </ItemGroup> </Target> <Target Name="GenerateCompilerVersionTargetsFile" Outputs="@(CompilerVersionTargetsFile)"> <PropertyGroup> <_CompilerApiVersion>$([System.Version]::Parse($(VersionPrefix)).Major).$([System.Version]::Parse($(VersionPrefix)).Minor)</_CompilerApiVersion> <_CompilerVersionTargetsFileContent><![CDATA[<Project> <PropertyGroup> <CompilerApiVersion>roslyn$(_CompilerApiVersion)</CompilerApiVersion> </PropertyGroup> </Project>]]></_CompilerVersionTargetsFileContent> </PropertyGroup> <WriteLinesToFile File="@(CompilerVersionTargetsFile)" Lines="$(_CompilerVersionTargetsFileContent)" Overwrite="true" WriteOnlyWhenDifferent="true" /> </Target> <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" /> </Project>