Skip to content

Commit e98d181

Browse files
committed
Merge pull request dotnet#5400 from weshaggard/FixPackageLicenseFiles
Include license files into the packages
2 parents c407544 + 404aa74 commit e98d181

File tree

1 file changed

+37
-25
lines changed

1 file changed

+37
-25
lines changed

dir.props

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,25 @@
77
<OsEnvironment Condition="'$(OsEnvironment)'=='' and '$(OS)'=='OSX'">Unix</OsEnvironment>
88
<OsEnvironment Condition="'$(OsEnvironment)'==''">$(OS)</OsEnvironment>
99
</PropertyGroup>
10-
10+
1111
<!-- Build Tools Versions -->
1212
<PropertyGroup>
1313
<RoslynVersion>1.0.0-rc3-20150510-01</RoslynVersion>
1414
<RoslynPackageName>Microsoft.Net.ToolsetCompilers</RoslynPackageName>
1515
</PropertyGroup>
1616

17-
<!--
18-
Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
19-
as well as runnning the build on mono. Until we can get these sorted out we will continue using the .NET 4.5 version of the tasks.
20-
-->
17+
<!--
18+
Switching to the .NET Core version of the BuildTools tasks seems to break numerous scenarios, such as VS intellisense and resource designer
19+
as well as runnning the build on mono. Until we can get these sorted out we will continue using the .NET 4.5 version of the tasks.
20+
-->
2121
<PropertyGroup>
22-
<BuildToolsTargets45>true</BuildToolsTargets45>
22+
<BuildToolsTargets45>true</BuildToolsTargets45>
2323
</PropertyGroup>
24-
24+
2525
<!-- Common properties -->
2626
<PropertyGroup>
2727
<!-- Set basic properties and normalize -->
28-
28+
2929
<BuildArch>$(__BuildArch)</BuildArch>
3030
<BuildArch Condition="'$(__BuildArch)'==''">x64</BuildArch>
3131
<BuildArch Condition="'$(__BuildArch)' == 'amd64'">x64</BuildArch>
@@ -60,18 +60,18 @@
6060
-->
6161
<PackagesBinDir>$(__PackagesBinDir)</PackagesBinDir>
6262
<PackagesBinDir Condition="'$(__PackagesBinDir)'==''">$(BinDir).nuget\</PackagesBinDir>
63-
64-
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
65-
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
63+
64+
<ToolsDir Condition="'$(ToolsDir)'==''">$(ProjectDir)Tools/</ToolsDir>
65+
<DotnetCliPath Condition="'$(DotnetCliPath)'==''">$(ToolsDir)dotnetcli/</DotnetCliPath>
6666
<BuildToolsSemaphore Condition="'$(BuildToolsSemaphore)' == ''">$(ToolsDir)Microsoft.DotNet.Build.Tasks.dll</BuildToolsSemaphore>
67-
67+
6868
<TestWorkingDir>$(__TestWorkingDir)\</TestWorkingDir>
6969
<TestWorkingDir Condition="'$(__TestWorkingDir)'==''">$(RootBinDir)tests\$(BuildOS).$(BuildArch).$(BuildType)\</TestWorkingDir>
7070
<BuildToolsTaskDir Condition="'$(BuildToolsTargets45)' == 'true'">$(ToolsDir)net45/</BuildToolsTaskDir>
7171

7272
<Platform Condition="'$(Platform)' == ''">$(BuildArch)</Platform>
7373
<Platform Condition="'$(Platform)' == 'amd64'">x64</Platform>
74-
74+
7575
</PropertyGroup>
7676

7777
<!-- Output paths -->
@@ -83,11 +83,11 @@
8383
</PropertyGroup>
8484

8585
<Import Condition="Exists('$(ToolsDir)BuildVersion.targets')" Project="$(ToolsDir)BuildVersion.targets" />
86-
87-
<!-- Import Build tools common props file where repo-independent properties are found -->
88-
<Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
8986

90-
87+
<!-- Import Build tools common props file where repo-independent properties are found -->
88+
<Import Condition="Exists('$(ToolsDir)Build.Common.props')" Project="$(ToolsDir)Build.Common.props" />
89+
90+
9191
<!-- Common nuget properties -->
9292
<PropertyGroup>
9393
<NuGetToolPath Condition="'$(NuGetToolPath)'==''">$(PackagesDir)NuGet.exe</NuGetToolPath>
@@ -103,16 +103,16 @@
103103
<NugetRestoreCommand>$(NugetRestoreCommand) -Verbosity detailed</NugetRestoreCommand>
104104
<NugetRestoreCommand Condition="'$(OsEnvironment)'=='Unix'">mono $(NuGetRestoreCommand)</NugetRestoreCommand>
105105
</PropertyGroup>
106-
106+
107107
<PropertyGroup>
108-
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
109-
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>
108+
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'!='Unix'">$(DotnetCliPath)dotnet.exe</DotnetToolCommand>
109+
<DotnetToolCommand Condition="'$(DotnetToolCommand)'=='' and '$(OsEnvironment)'=='Unix'">$(DotnetCliPath)dotnet</DotnetToolCommand>
110110

111-
<DnuRestoreCommand>$(DnuRestoreCommand) "$(DotnetToolCommand)"</DnuRestoreCommand>
111+
<DnuRestoreCommand>$(DnuRestoreCommand) "$(DotnetToolCommand)"</DnuRestoreCommand>
112112
<DnuRestoreCommand>$(DnuRestoreCommand) restore</DnuRestoreCommand>
113113
<DnuRestoreCommand>$(DnuRestoreCommand) --packages "$(PackagesDir.TrimEnd('\\'))"</DnuRestoreCommand>
114114
</PropertyGroup>
115-
115+
116116
<!--
117117
Set up Roslyn predefines
118118
-->
@@ -128,7 +128,7 @@
128128
<TargetsNetBSD Condition="'$(BuildOS)' == 'NetBSD'">true</TargetsNetBSD>
129129
<TargetsOSX Condition="'$(BuildOS)' == 'OSX'">true</TargetsOSX>
130130
<TargetsWindows Condition="'$(BuildOS)' == 'Windows_NT'">true</TargetsWindows>
131-
131+
132132
<TargetsUnix Condition="'$(TargetsFreeBSD)' == 'true' or '$(TargetsLinux)' == 'true' or '$(TargetsNetBSD)' == 'true' or '$(TargetsOSX)' == 'true'">true</TargetsUnix>
133133

134134
<!-- We are only tracking Linux Distributions for Nuget RID mapping -->
@@ -142,7 +142,7 @@
142142
<PackageDescriptionFile>$(SourceDir).nuget/descriptions.json</PackageDescriptionFile>
143143
<PackageLicenseFile>$(SourceDir).nuget/dotnet_library_license.txt</PackageLicenseFile>
144144
<PackageThirdPartyNoticesFile>$(SourceDir).nuget/ThirdPartyNotices.txt</PackageThirdPartyNoticesFile>
145-
145+
146146
<!-- This should be kept in sync with package details in src/.nuget/init/project.json -->
147147
<RuntimeIdGraphDefinitionFile>$(PackagesDir)/Microsoft.NETCore.Platforms/1.0.1-rc2-23712/runtime.json</RuntimeIdGraphDefinitionFile>
148148

@@ -155,7 +155,19 @@
155155
<PackagePlatform Condition="'$(PackagePlatform)' == ''">$(Platform)</PackagePlatform>
156156
<PackagePlatform Condition="'$(PackagePlatform)' == 'amd64'">x64</PackagePlatform>
157157
<PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath>
158-
<SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
158+
<SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
159159
</PropertyGroup>
160160

161+
<!-- Add required legal files to packages -->
162+
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
163+
<File Condition="Exists('$(PackageLicenseFile)')"
164+
Include="$(PackageLicenseFile)" >
165+
<SkipPackageFileCheck>true</SkipPackageFileCheck>
166+
</File>
167+
<File Condition="Exists('$(PackageThirdPartyNoticesFile)')"
168+
Include="$(PackageThirdPartyNoticesFile)" >
169+
<SkipPackageFileCheck>true</SkipPackageFileCheck>
170+
</File>
171+
</ItemGroup>
172+
161173
</Project>

0 commit comments

Comments
 (0)