-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathMicrosoft.NET.Build.Extensions.Tasks.csproj
106 lines (88 loc) · 5.32 KB
/
Microsoft.NET.Build.Extensions.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
<?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>
<!-- This is a smaller build of Microsoft.NET.Build.Tasks to be used outside of SDK projects -->
<PropertyGroup>
<PackageId>Microsoft.NET.Build.Extensions</PackageId>
<OutDirName>$(Configuration)\Sdks\$(PackageId)\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\tools</OutDirName>
</PropertyGroup>
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<Description>The MSBuild targets and tasks which extend MSBuild's common targets.</Description>
<OutputType>Library</OutputType>
<RootNamespace>Microsoft.NET.Build.Tasks</RootNamespace>
<TargetFrameworks>$(SdkTargetFramework);net472</TargetFrameworks>
<TargetFrameworks Condition=" '$(DotNetBuildFromSource)' == 'true' ">$(SdkTargetFramework)</TargetFrameworks>
</PropertyGroup>
<PropertyGroup>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<EnableDefaultItems>false</EnableDefaultItems>
<GenerateDependencyFile>false</GenerateDependencyFile>
<IncludeBuildOutput>false</IncludeBuildOutput>
<NoPackageAnalysis>true</NoPackageAnalysis>
<!-- MSBuild Task DLLs need to be versioned with every build -->
<AutoGenerateAssemblyVersion>true</AutoGenerateAssemblyVersion>
</PropertyGroup>
<PropertyGroup>
<OutputPath>$(BaseOutputPath)</OutputPath>
<DefineConstants>$(DefineConstants);EXTENSIONS</DefineConstants>
<IsPackable>true</IsPackable>
<PackageLayoutOutputPath>$(ArtifactsBinDir)$(Configuration)\Sdks\$(PackageId)\</PackageLayoutOutputPath>
</PropertyGroup>
<ItemDefinitionGroup>
<PackageReference>
<PrivateAssets>All</PrivateAssets>
<Publish>true</Publish>
</PackageReference>
</ItemDefinitionGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Build.Framework" Version="$(MicrosoftBuildFrameworkVersion)" ExcludeAssets="Runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildUtilitiesCoreVersion)" ExcludeAssets="Runtime" />
<PackageReference Include="NETStandard.Library.NETFramework" Version="$(NETStandardLibraryNETFrameworkVersion)" ExcludeAssets="All" NoWarn="NU1701" />
<!-- Lift dependency of NETStandard.Library.NETFramework to version produced in SBRP. -->
<PackageReference Include="NETStandard.Library" Version="2.0.3" ExcludeAssets="All" />
</ItemGroup>
<ItemGroup>
<!-- don't reference MS.NET.Build.Tasks, but make sure it builds before this project -->
<ProjectReference Include="..\Microsoft.NET.Build.Tasks\Microsoft.NET.Build.Tasks.csproj" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<Compile Include="**\*.cs" />
<Compile Include="..\Common\**\*.cs" LinkBase="Common" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="..\Common\Resources\Strings.resx" LinkBase="Resources" GenerateSource="True" Namespace="Microsoft.NET.Build.Tasks" />
</ItemGroup>
<ItemGroup>
<None Include="msbuildExtensions\**\*" PackagePath="msbuildExtensions\" />
<None Include="msbuildExtensions-ver\**\*" PackagePath="msbuildExtensions-ver\" />
<None Include="..\Common\Resources\xlf\**\*" LinkBase="Resources\xlf" />
<None Include="..\Common\targets\**\*" PackagePath="msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\" LinkBase="%(PackagePath)" />
<UpToDateCheckInput Include="@(None)" />
</ItemGroup>
<Target Name="PrepareAdditionalFilesToLayout" BeforeTargets="AssignTargetPaths">
<PropertyGroup>
<_NETStandardLibraryNETFrameworkPath>$(NuGetPackageRoot)netstandard.library.netframework\$(NETStandardLibraryNETFrameworkVersion)\build</_NETStandardLibraryNETFrameworkPath>
</PropertyGroup>
<ItemGroup>
<LayoutFile Include="@(None)" Condition="'%(None.PackagePath)' != '' and '%(None.PackagePath)' != 'Icon.png'">
<TargetPath>%(None.PackagePath)\%(None.RecursiveDir)%(None.Filename)%(None.Extension)</TargetPath>
</LayoutFile>
<NetStandardNetFxFile Include="$(_NETStandardLibraryNETFrameworkPath)\**\*" Exclude="$(_NETStandardLibraryNETFrameworkPath)\**\*.props;$(_NETStandardLibraryNETFrameworkPath)\**\*.targets" />
<LayoutFile Include="@(NetStandardNetFxFile)">
<TargetPath>msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\%(NetStandardNetFxFile.RecursiveDir)%(NetStandardNetFxFile.FileName)%(NetStandardNetFxFile.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>
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>