forked from dotnet/sdk
/
package.csproj
122 lines (107 loc) · 8.23 KB
/
package.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
<Project Sdk="Microsoft.Build.NoTargets">
<PropertyGroup>
<TargetFramework>$(SdkTargetFramework)</TargetFramework>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IsPackable>true</IsPackable>
<IsShipping>true</IsShipping>
<IsShippingPackage>true</IsShippingPackage>
<NoWarn>NU5100;NU5128</NoWarn>
<VSCompatTargetFramework>net472</VSCompatTargetFramework>
<!-- MSBuild tasks shouldn't be referenced. This is by design. -->
<NoWarn>NU5100;NU5128;NU1507</NoWarn>
<Authors>Microsoft</Authors>
<Company>Microsoft</Company>
<PackageId>Microsoft.NET.Build.Containers</PackageId>
<Description>Tasks and targets to natively publish .NET applications as containers.</Description>
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/dotnet/sdk-container-builds</PackageProjectUrl>
<RepositoryUrl>https://github.com/dotnet/sdk-container-builds</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>containers;docker;Microsoft.NET.Build.Containers</PackageTags>
<PackageReadmeFile>README.md</PackageReadmeFile>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="../Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj"
SetTargetFramework="TargetFramework=$(TargetFramework)"
OutputItemType="ContainerLibraryOutput"/>
<ProjectReference Include="../../Cli/Microsoft.DotNet.Cli.Utils/Microsoft.DotNet.Cli.Utils.csproj"
SetTargetFramework="TargetFramework=$(ResolverTargetFramework)"
OutputItemType="DotNetCliUtilsLibraryOutput"/>
<ProjectReference Include="../Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj"
SetTargetFramework="TargetFramework=$(VSCompatTargetFramework)"
OutputItemType="ContainerLibraryOutputNet472" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
<ProjectReference Include="../containerize/containerize.csproj" PrivateAssets="all" IncludeAssets="runtime" ReferenceOutputAssembly="true" Condition="'$(DotNetBuildSourceOnly)' != 'true'" />
</ItemGroup>
<Target Name="PreparePackageReleaseNotesFromFile" BeforeTargets="GenerateNuspec">
<PropertyGroup>
<PackageReleaseNotesFile>../docs/ReleaseNotes/v8.0.300.md</PackageReleaseNotesFile>
<PackageReleaseNotes>$([System.IO.File]::ReadAllText($(PackageReleaseNotesFile)))</PackageReleaseNotes>
</PropertyGroup>
</Target>
<Target Name="AddItemsForPackaging" AfterTargets="Build">
<MSBuild Projects="../Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj" Properties="TargetFramework=$(VSCompatTargetFramework)" Targets="ResolveAssemblyReferences" Condition="'$(DotNetBuildSourceOnly)' != 'true'">
<Output TaskParameter="TargetOutputs" ItemName="_AllNet472ContainerTaskDependencies" />
</MSBuild>
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
<NecessaryNet472ContainerTaskDependencies Include="@(_AllNet472ContainerTaskDependencies)" Condition="(
$([MSBuild]::ValueOrDefault('%(_AllNet472ContainerTaskDependencies.NuGetPackageId)', '').Contains('NuGet')) or
$([MSBuild]::ValueOrDefault('%(_AllNet472ContainerTaskDependencies.NuGetPackageId)', '').Contains('Newtonsoft')) or
$([MSBuild]::ValueOrDefault('%(_AllNet472ContainerTaskDependencies.NuGetPackageId)', '').Contains('Microsoft.Extensions'))
) and
%(_AllNet472ContainerTaskDependencies.NuGetIsFrameworkReference) != true" />
<!-- containerize folder -->
<Content Include="$(OutDir)containerize.dll" Pack="true" PackagePath="containerize/" />
<Content Include="$(OutDir)containerize.runtimeconfig.json" Pack="true" PackagePath="containerize/" />
<Content Include="$(OutDir)Newtonsoft.Json.dll" Pack="true" PackagePath="containerize/" />
<Content Include="$(OutDir)NuGet.*.dll" Pack="true" PackagePath="containerize/" />
<Content Include="$(OutDir)Microsoft.DotNet.Cli.Utils.dll" Pack="true" PackagePath="containerize/" />
<Content Include="$(OutDir)System.CommandLine.dll" Pack="true" PackagePath="containerize/" />
<Content Include="$(OutDir)Valleysoft.DockerCredsProvider.dll" Pack="true" PackagePath="containerize/" />
<Content Include="$(OutDir)Microsoft.Extensions.*.dll" Pack="true" PackagePath="containerize/" />
<Content Include="@(ContainerLibraryOutput)" Pack="true" PackagePath="containerize/" />
<!-- net472 tasks -->
<!-- dependencies -->
<Content Include="@(NecessaryNet472ContainerTaskDependencies)" Pack="true" PackagePath="tasks/$(VSCompatTargetFramework)/" />
<!-- actual DLL -->
<Content Include="@(ContainerLibraryOutputNet472)" Pack="true" PackagePath="tasks/$(VSCompatTargetFramework)/" />
</ItemGroup>
<MSBuild Projects="../Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj" Properties="TargetFramework=$(TargetFramework)" Targets="ResolveAssemblyReferences">
<Output TaskParameter="TargetOutputs" ItemName="_AllNetContainerTaskDependencies" />
</MSBuild>
<ItemGroup>
<NecessaryNetContainerTaskDependencies Include="@(_AllNetContainerTaskDependencies)" Condition="(
$([MSBuild]::ValueOrDefault('%(_AllNetContainerTaskDependencies.NuGetPackageId)', '').Contains('NuGet')) or
$([MSBuild]::ValueOrDefault('%(_AllNetContainerTaskDependencies.NuGetPackageId)', '').Contains('Newtonsoft')) or
$([MSBuild]::ValueOrDefault('%(_AllNetContainerTaskDependencies.NuGetPackageId)', '').Contains('Valleysoft')) or
$([MSBuild]::ValueOrDefault('%(_AllNetContainerTaskDependencies.NuGetPackageId)', '').Contains('Microsoft.Extensions'))
) and
%(_AllNetContainerTaskDependencies.NuGetIsFrameworkReference) != true" />
<!-- root folder -->
<Content Include="README.md" Pack="true" PackagePath="" />
<!-- tasks folder -->
<!-- net7.0 tasks -->
<!-- dependencies -->
<Content Include="@(NecessaryNetContainerTaskDependencies)" Pack="true" PackagePath="tasks/$(TargetFramework)/" />
<Content Include="@(DotNetCliUtilsLibraryOutput)" Pack="true" PackagePath="tasks/$(TargetFramework)/" />
<!-- runtime deps json -->
<Content Include="$(ArtifactsDir)bin/Microsoft.NET.Build.Containers/$(Configuration)/$(TargetFramework)/Microsoft.NET.Build.Containers.deps.json" Pack="true" PackagePath="tasks/$(TargetFramework)" />
<!-- actual DLL -->
<Content Include="@(ContainerLibraryOutput)" Pack="true" PackagePath="tasks/$(TargetFramework)/" />
<!-- build folder -->
<Content Include="build/**" Pack="true" PackagePath="build/" />
</ItemGroup>
</Target>
<!-- Hacky workaround for the fact that we don't publish the package yet. -->
<Target Name="CopyNupkgToCustomFolder" AfterTargets="Pack">
<Copy SourceFiles="$(ArtifactsDir)packages/$(Configuration)/Shipping/Microsoft.NET.Build.Containers.$(Version).nupkg"
DestinationFiles="$(ArtifactsTmpDir)Container/package/Microsoft.NET.Build.Containers.$(Version).nupkg" />
</Target>
<!-- Copy files that are needed by Integration tests. -->
<Target Name="CopyPropsAndTargets" AfterTargets="Pack">
<Copy SourceFiles="./build/Microsoft.NET.Build.Containers.props"
DestinationFiles="$(ArtifactsTmpDir)Container/packaging/Microsoft.NET.Build.Containers.props" />
<Copy SourceFiles="./build/Microsoft.NET.Build.Containers.targets"
DestinationFiles="$(ArtifactsTmpDir)Container/packaging/Microsoft.NET.Build.Containers.targets" />
</Target>
</Project>