forked from dotnet/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Microsoft.NET.Build.Tasks.csproj
162 lines (136 loc) · 8.68 KB
/
Microsoft.NET.Build.Tasks.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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<PropertyGroup>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<PackageId>Microsoft.NET.Sdk</PackageId>
<OutDirName>$(Configuration)\Sdks\$(PackageId)\tools</OutDirName>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<Description>The MSBuild targets and properties for building .NET Core projects.</Description>
<OutputType>Library</OutputType>
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
<Nullable>annotations</Nullable>
</PropertyGroup>
<PropertyGroup>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<EnableDefaultItems>false</EnableDefaultItems>
<GenerateDependencyFile>false</GenerateDependencyFile>
<IncludeBuildOutput>false</IncludeBuildOutput>
<!-- only copy symbols from project references (omit xml docs and config files) -->
<AllowedReferenceRelatedFileExtensions>.pdb</AllowedReferenceRelatedFileExtensions>
<NoPackageAnalysis>true</NoPackageAnalysis>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- MSBuild Task DLLs need to be versioned with every build -->
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
<!-- Avoid https://github.com/dotnet/arcade/issues/9305 -->
<AutoGenerateBindingRedirects>false</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup>
<OutputPath>$(BaseOutputPath)</OutputPath>
<IsPackable>true</IsPackable>
<PackageLayoutOutputPath>$(ArtifactsBinDir)$(Configuration)\Sdks\$(PackageId)\</PackageLayoutOutputPath>
<!-- Allow .editorconfig file for analyzers to be packed -->
<NoDefaultExcludes>true</NoDefaultExcludes>
</PropertyGroup>
<ItemDefinitionGroup>
<PackageReference>
<PrivateAssets>All</PrivateAssets>
<Publish>true</Publish>
</PackageReference>
</ItemDefinitionGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" />
<PackageReference Include="Microsoft.NET.HostModel" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" />
<PackageReference Include="NuGet.ProjectModel" />
<PackageReference Include="NuGet.Build.Tasks.Pack" ExcludeAssets="All" />
<PackageReference Include="Microsoft.Deployment.DotNet.Releases" />
<!-- Use an alias for APICompat so that we bring in the binaries, but don't accidentally reference any types -->
<ProjectReference Include="$(RepoRoot)src\Compatibility\ApiCompat\Microsoft.DotNet.ApiCompat.Task\Microsoft.DotNet.ApiCompat.Task.csproj" Aliases="unused" PrivateAssets="All" />
<PackageReference Include="System.IO.Hashing" />
</ItemGroup>
<!-- Packages that are in-box for .NET Core, so we only need to reference them for .NET Framework -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
<!--
Microsoft.NET.HostModel also uses System.Reflection.Metadata. Don't move ahead of the version of System.Reflection.Metadata
that MSBuild supports with the binding redirect to ensure that both this project and Microsoft.NET.HostModel can load
the same System.Reflection.Metadata assembly and their types can unify. See the following link for the MSBuild binding redirect config.
https://github.com/dotnet/msbuild/blob/299e0514835a1588e6ef21b1da748462dec706b8/src/MSBuild/app.config#L60
-->
<PackageReference Include="System.Collections.Immutable" VersionOverride="$(SystemCollectionsImmutableToolsetPackageVersion)" />
<PackageReference Include="System.Reflection.Metadata" VersionOverride="$(SystemReflectionMetadataToolsetPackageVersion)" />
<PackageReference Include="System.Reflection.MetadataLoadContext" VersionOverride="$(SystemReflectionMetadataLoadContextToolsetPackageVersion)" />
</ItemGroup>
<!-- These are loaded from the CLI's copy on .NET Core, we don't need to duplicate them on disk -->
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
<PackageReference Update="Microsoft.Extensions.DependencyModel" ExcludeAssets="Runtime" />
<PackageReference Update="Microsoft.NET.HostModel" ExcludeAssets="Runtime" />
<PackageReference Update="NuGet.ProjectModel" ExcludeAssets="Runtime" />
</ItemGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<Compile Include="..\Common\**\*.cs" LinkBase="Common" />
<Compile Include="..\..\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\**\*.cs" LinkBase="WorkloadManifestReader" />
<Compile Include="..\..\Resolvers\Microsoft.DotNet.MSBuildSdkResolver\FXVersion.cs" LinkBase="WorkloadManifestReader" />
<Compile Include="$(RepoRoot)src\Common\EnvironmentVariableNames.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\CliFolderPathCalculatorCore.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Common\WorkloadFileBasedInstall.cs" LinkBase="Common" />
<Compile Include="$(RepoRoot)src\Cli\dotnet\commands\dotnet-workload\InstallStateContents.cs" LinkBase="Cli" />
<Compile Include="$(RepoRoot)src\Cli\dotnet\commands\dotnet-test\IPC\**\*.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\Common\Resources\Strings.resx" LinkBase="Resources" GenerateSource="True" Namespace="Microsoft.NET.Build.Tasks" />
<EmbeddedResource Include="..\..\Resolvers\Microsoft.NET.Sdk.WorkloadManifestReader\Strings.resx" LinkBase="Resources\WorkloadManifestReoder" GenerateSource="True" Namespace="Microsoft.NET.Sdk.Localization" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="Microsoft.NET.Build.Tasks.UnitTests" />
<InternalsVisibleTo Include="Microsoft.NET.Build.Tests" />
<InternalsVisibleTo Include="Microsoft.NET.ToolPack.Tests" />
</ItemGroup>
<ItemGroup>
<None Include="targets\**\*" PackagePath="targets\" />
<None Include="sdk\**\*" PackagePath="Sdk\" />
<None Include="..\Common\targets\**\*" PackagePath="targets\" LinkBase="targets" />
<None Include="..\Common\Resources\xlf\**\*" LinkBase="Resources\xlf" />
<UpToDateCheckInput Include="@(None)" />
</ItemGroup>
<Target Name="PrepareAdditionalFilesToLayout" BeforeTargets="AssignTargetPaths">
<PropertyGroup>
<_NugetBuildTasksPackPath>$(NuGetPackageRoot)nuget.build.tasks.pack\$(NuGetBuildTasksPackageVersion)</_NugetBuildTasksPackPath>
<_Stage0SdksFolder>$(DOTNET_INSTALL_DIR)\sdk\$(NETCoreSdkVersion)\Sdks</_Stage0SdksFolder>
</PropertyGroup>
<ItemGroup>
<LayoutFile Include="@(None)" Condition="'%(None.PackagePath)' != '' and '%(None.PackagePath)' != 'Icon.png'">
<TargetPath>%(None.PackagePath)\%(None.RecursiveDir)%(None.Filename)%(None.Extension)</TargetPath>
</LayoutFile>
<PackFile Include="$(_NugetBuildTasksPackPath)\**\*" Exclude="$(_NugetBuildTasksPackPath)\*" />
<LayoutFile Include="@(PackFile)">
<TargetPath>..\NuGet.Build.Tasks.Pack\%(PackFile.RecursiveDir)%(PackFile.Filename)%(PackFile.Extension)</TargetPath>
</LayoutFile>
<!-- Include some of the Sdks from the Stage 0 CLI for performance tests-->
<Stage0SdkFile Include="$(_Stage0SdksFolder)\FSharp.NET.Sdk\**" SdkName="FSharp.NET.Sdk" />
<Stage0SdkFile Include="$(_Stage0SdksFolder)\Microsoft.NET.Sdk.WindowsDesktop\**" SdkName="Microsoft.NET.Sdk.WindowsDesktop" />
<LayoutFile Include="@(Stage0SdkFile)">
<TargetPath>..\%(Stage0SdkFile.SdkName)\%(Stage0SdkFile.RecursiveDir)%(Stage0SdkFile.Filename)%(Stage0SdkFile.Extension)</TargetPath>
</LayoutFile>
</ItemGroup>
</Target>
<Target Name="CopyAdditionalFilesToLayout" Condition="'$(TargetFramework)' == ''" DependsOnTargets="PrepareAdditionalFilesToLayout" AfterTargets="Build" Inputs="@(LayoutFile)" Outputs="@(LayoutFile->'$(PackageLayoutOutputPath)%(TargetPath)')">
<Copy SourceFiles="@(LayoutFile)" DestinationFiles="@(LayoutFile->'$(PackageLayoutOutputPath)%(TargetPath)')">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites" />
</Copy>
</Target>
<Target Name="PackLayout" DependsOnTargets="CopyAdditionalFilesToLayout" BeforeTargets="$(GenerateNuspecDependsOn)">
<ItemGroup>
<Content Include="$(PackageLayoutOutputPath)**\*" PackagePath="\" />
</ItemGroup>
</Target>
<Target Name="GetTargetPath" />
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>