-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\Directory.Build.targets" />
+<Project>
+
+ <!--
+ Import stubs for compatibility with packaging tools, if not building a pkgproj. Ordinarily,
+ listing this before the ../Directory.Build.targets import would be sufficient, but the packaging
+ tools targets are already imported before this file.
+ -->
+ <Import Project="packaging.stubs.targets" Condition="'$(MSBuildProjectExtension)' != '.pkgproj'" />
+
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))\Directory.Build.targets" />
</Project>
--- /dev/null
+<Project>
+
+ <!--
+ Provide default stub targets for packaging tasks, if not defined. Allows freer use of
+ ProjectReferences in pkgproj.
+ -->
+ <Target Name="GetFilesToPackage" />
+ <Target Name="GetDependenciesToPackage" />
+ <Target Name="DetermineRuntimeDependencies" />
+
+</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" InitialTargets="ValidateArgs" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\Directory.Build.props" />
+<Project>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
<PropertyGroup>
<Platform>$(TargetArchitecture)</Platform>
</PropertyGroup>
<PropertyGroup>
- <VersionTxtFile>$(ObjDir)version.txt</VersionTxtFile>
- </PropertyGroup>
-
- <PropertyGroup>
<PackageLicenseFile>$(ProjectDir)LICENSE.TXT</PackageLicenseFile>
<PackageThirdPartyNoticesFile>$(ProjectDir)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
<LicenseUrl>https://github.com/dotnet/core-setup/blob/master/LICENSE.TXT</LicenseUrl>
<SkipIndexCheck>true</SkipIndexCheck>
</PropertyGroup>
+ <ItemGroup>
+ <PackageReference Include="Microsoft.DotNet.Build.Tasks.Packaging" Version="$(MicrosoftDotNetBuildTasksPackagingPackageVersion)" />
+ </ItemGroup>
+
<PropertyGroup>
<PackagingToolsDir>$(MSBuildThisFileDirectory)packaging-tools/</PackagingToolsDir>
<InstallerSourceOSPlatformConfig Condition="'$(InstallerSourceOSPlatformConfig)' == ''">$(OSPlatformConfig)</InstallerSourceOSPlatformConfig>
</PropertyGroup>
- <PropertyGroup>
- <ProductBrandPrefix Condition="'$(ProductBrandPrefix)' == ''">Microsoft .NET Core</ProductBrandPrefix>
- <ProductBrandSuffix>$(ProductionVersion)</ProductBrandSuffix>
- <ProductBrandSuffix Condition="'$(ReleaseBrandSuffix)'!=''">$(ProductionVersion) $(ReleaseBrandSuffix)</ProductBrandSuffix>
- <SharedHostBrandName>$(ProductBrandPrefix) Host - $(ProductBrandSuffix)</SharedHostBrandName>
- <HostFxrBrandName>$(ProductBrandPrefix) Host FX Resolver - $(ProductBrandSuffix)</HostFxrBrandName>
- <TargetingPackBrandName>$(ProductBrandPrefix) Targeting Pack - $(ProductBrandSuffix)</TargetingPackBrandName>
- <AppHostPackBrandName>$(ProductBrandPrefix) AppHost Pack - $(ProductBrandSuffix)</AppHostPackBrandName>
- <SharedFrameworkBrandName>$(ProductBrandPrefix) Runtime - $(ProductBrandSuffix)</SharedFrameworkBrandName>
- </PropertyGroup>
-
<ItemGroup>
<PackageIndex Include="$(PackageIndexFile)" />
</ItemGroup>
</Target>
<Target Name="ValidatePreReleaseStrings" Condition="'$(StabilizePackageVersion)'!='true'">
- <Error Condition="'$(PreReleaseLabel)'==''" Text="PreReleaseLabel is undefined" />
+ <Error Condition="'$(PreReleaseVersionLabel)'==''" Text="PreReleaseVersionLabel is undefined" />
<Error Condition="'$(BuildNumberMajor)'==''" Text="BuildNumberMajor is undefined" />
<Error Condition="'$(BuildNumberMinor)'==''" Text="BuildNumberMinor is undefined" />
</Target>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" InitialTargets="CheckForBuildTools" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\Directory.Build.targets" />
+<Project>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))\Directory.Build.targets" />
+
<PropertyGroup>
<RuntimeIdGraphDefinitionFile>$(PackagesDir)$(PlatformPackageId.ToLowerInvariant())\$(MicrosoftNETCorePlatformsPackageVersion)\runtime.json</RuntimeIdGraphDefinitionFile>
</PropertyGroup>
- <UsingTask TaskName="DownloadFilesFromUrl" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" />
- <UsingTask TaskName="ZipFileExtractToDirectory" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
+ <!--
+ Get branding names for the installers.
+ -->
+ <Target Name="GetInstallerBrandingNames"
+ DependsOnTargets="GetProductVersions">
+ <PropertyGroup Condition="'$(PreReleaseVersionLabel)' != '' and $(PreReleaseVersionLabel.StartsWith('preview'))">
+ <!-- Convert 'preview7' to 'Preview 7'. -->
+ <ReleaseBrandSuffix>$(PreReleaseVersionLabel.Substring(0,1).ToUpperInvariant())</ReleaseBrandSuffix>
+ <ReleaseBrandSuffix>$(ReleaseBrandSuffix)$(PreReleaseVersionLabel.Substring(1,6))</ReleaseBrandSuffix>
+ <ReleaseBrandSuffix>$(ReleaseBrandSuffix) $(PreReleaseVersionLabel.Substring(7))</ReleaseBrandSuffix>
+ </PropertyGroup>
- <UsingTask TaskName="GenerateGuidFromName" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll" />
- <UsingTask TaskName="GenerateMsiVersion" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll" />
+ <PropertyGroup>
+ <ProductBrandPrefix Condition="'$(ProductBrandPrefix)' == ''">Microsoft .NET Core</ProductBrandPrefix>
+ <ProductBrandSuffix>$(ProductionVersion)</ProductBrandSuffix>
+ <ProductBrandSuffix Condition="'$(ReleaseBrandSuffix)'!=''">$(ProductionVersion) $(ReleaseBrandSuffix)</ProductBrandSuffix>
+
+ <SharedHostBrandName>$(ProductBrandPrefix) Host - $(ProductBrandSuffix)</SharedHostBrandName>
+ <HostFxrBrandName>$(ProductBrandPrefix) Host FX Resolver - $(ProductBrandSuffix)</HostFxrBrandName>
+ <TargetingPackBrandName>$(ProductBrandPrefix) Targeting Pack - $(ProductBrandSuffix)</TargetingPackBrandName>
+ <AppHostPackBrandName>$(ProductBrandPrefix) AppHost Pack - $(ProductBrandSuffix)</AppHostPackBrandName>
+ <SharedFrameworkBrandName>$(ProductBrandPrefix) Runtime - $(ProductBrandSuffix)</SharedFrameworkBrandName>
+ </PropertyGroup>
+ </Target>
<!-- Create deb tool package and set up the project that consumes it as a CLI tool. -->
<Target Name="InitializeDotnetDebTool">
<!--
Acquire WiX tools, if not present.
-
- Adapted from https://github.com/dotnet/core-sdk/blob/6aed0cd3614f9b740cfb3f21fdb795bab53ef7e9/src/redist/targets/GenerateMSIs.targets#L80-L102
-->
<Target Name="AcquireWix"
DependsOnTargets="GetAcquireWixProperties"
- Condition="'$(GenerateMSI)' == 'true'"
- Inputs="$(WixDownloadSentinel)"
- Outputs="$(WixDestinationPath)">
- <!-- Setup sentinel to take advantage of incrementality -->
- <MakeDir Directories="$(WixToolsDir)" />
- <WriteLinesToFile
- File="$(WixDownloadSentinel)"
- Lines="$(WixVersion)"
- Overwrite="true"
- Encoding="Unicode" />
-
- <ItemGroup>
- <_wixToolDownload
- Include="WixTool"
- Url="$(WixDownloadUrl)"
- DestinationDir="$(WixToolsDir)" />
- </ItemGroup>
-
- <DownloadFilesFromUrl Items="@(_wixToolDownload)" />
-
- <ZipFileExtractToDirectory
- SourceArchive="$(WixDestinationPath)"
- DestinationDirectory="$(WixToolsDir)" />
+ Condition="'$(GenerateMSI)' == 'true'">
+ <MSBuild Projects="$(AcquireWixProjectFile)" Targets="AcquireWixCore" />
</Target>
<Target Name="GetAcquireWixProperties">
<PropertyGroup>
+ <AcquireWixProjectFile>$(PackagingToolsDir)acquire-wix\acquire-wix.proj</AcquireWixProjectFile>
<WixDownloadFilename>wix.$(WixVersion).zip</WixDownloadFilename>
<WixDownloadUrl>https://dotnetcli.azureedge.net/build/wix/$(WixDownloadFilename)</WixDownloadUrl>
<WixDestinationPath>$(WixToolsDir)$(WixDownloadFilename)</WixDestinationPath>
</PropertyGroup>
</Target>
+ <UsingTask TaskName="GenerateCurrentVersion" AssemblyFile="$(LocalBuildToolsTaskFile)" />
+
<Target Name="GenerateMsiVersionString">
+ <PropertyGroup>
+ <VersionPadding Condition="'$(VersionPadding)'==''">5</VersionPadding>
+ <VersionComparisonDate>2016-01-01</VersionComparisonDate>
+ </PropertyGroup>
+
+ <GenerateCurrentVersion
+ SeedDate="$([System.DateTime]::Now.ToString(yyyy-MM-dd))"
+ OfficialBuildId="$(OfficialBuildId)"
+ ComparisonDate="$(VersionComparisonDate)"
+ Padding="$(VersionPadding)">
+ <Output PropertyName="BuildNumberMajor" TaskParameter="GeneratedVersion" />
+ <Output PropertyName="BuildNumberMinor" TaskParameter="GeneratedRevision" />
+ </GenerateCurrentVersion>
+
<GenerateMsiVersion
Major="$(MajorVersion)"
Minor="$(MinorVersion)"
--- /dev/null
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <UsingTask TaskName="DownloadFile" AssemblyFile="$(ArcadeSdkBuildTasksAssembly)" />
+
+ <!--
+ Acquire WiX tools, if not present.
+
+ Adapted from https://github.com/dotnet/core-sdk/blob/6aed0cd3614f9b740cfb3f21fdb795bab53ef7e9/src/redist/targets/GenerateMSIs.targets#L80-L102
+ -->
+ <Target Name="AcquireWixCore"
+ DependsOnTargets="GetAcquireWixProperties"
+ Inputs="$(WixDownloadSentinel)"
+ Outputs="$(WixDestinationPath)">
+ <!-- Setup sentinel to take advantage of incrementality -->
+ <MakeDir Directories="$(WixToolsDir)" />
+ <WriteLinesToFile
+ File="$(WixDownloadSentinel)"
+ Lines="$(WixVersion)"
+ Overwrite="true"
+ Encoding="Unicode" />
+
+ <DownloadFile
+ Uri="$(WixDownloadUrl)"
+ DestinationPath="$(WixDestinationPath)"
+ Overwrite="true" />
+
+ <Unzip
+ SourceFiles="$(WixDestinationPath)"
+ DestinationFolder="$(WixToolsDir)" />
+ </Target>
+
+</Project>
<!-- Fetches all the file items from the packages that we want to redist -->
<Target Name="GetFilesFromPackages">
- <ItemGroup Condition="'$(NuGetRuntimeIdentifier)' != ''">
+ <ItemGroup>
<!-- RID-specific: include all runtime files. -->
- <FilesToPackage Include="@(ReferenceCopyLocalPaths)">
+ <RidSpecificFilesToPackage Include="@(ReferenceCopyLocalPaths)">
<!-- ResolveNugetPackageAssets doesn't preserve the asset type (native),
calculate it by looking for native in the path -->
<IsNative Condition="$([System.String]::new('%(Identity)').ToLowerInvariant().Replace('\', '/').Contains('/native/'))">true</IsNative>
- </FilesToPackage>
- <FilesToPackage>
- <TargetPath Condition="'%(FilesToPackage.IsNative)' != 'true'">runtimes/$(NuGetRuntimeIdentifier)/lib/$(PackageTargetFramework)</TargetPath>
- <TargetPath Condition="'%(FilesToPackage.IsNative)' == 'true'">runtimes/$(NuGetRuntimeIdentifier)/native</TargetPath>
- </FilesToPackage>
+ </RidSpecificFilesToPackage>
+ <RidSpecificFilesToPackage>
+ <TargetPath Condition="'%(RidSpecificFilesToPackage.IsNative)' != 'true'">runtimes/$(PackageRID)/lib/$(PackageTargetFramework)</TargetPath>
+ <TargetPath Condition="'%(RidSpecificFilesToPackage.IsNative)' == 'true'">runtimes/$(PackageRID)/native</TargetPath>
+ </RidSpecificFilesToPackage>
<!-- Ensure localization resource files make it to their subdirs. -->
- <FilesToPackage Condition="'%(FilesToPackage.DestinationSubDirectory)' != ''">
- <TargetPath>%(FilesToPackage.TargetPath)/%(FilesToPackage.DestinationSubDirectory)</TargetPath>
- </FilesToPackage>
+ <RidSpecificFilesToPackage Condition="'%(RidSpecificFilesToPackage.DestinationSubDirectory)' != ''">
+ <TargetPath>%(RidSpecificFilesToPackage.TargetPath)/%(RidSpecificFilesToPackage.DestinationSubDirectory)</TargetPath>
+ </RidSpecificFilesToPackage>
+ </ItemGroup>
+
+ <ItemGroup Condition="'$(NuGetRuntimeIdentifier)' != ''">
+ <FilesToPackage Include="@(RidSpecificFilesToPackage)" />
</ItemGroup>
<ItemGroup Condition="'$(NuGetRuntimeIdentifier)' == ''">
</Target>
<Target Name="GetFilesToPackage"
- DependsOnTargets="ResolveNuGetPackages;GetFilesFromPackages"
+ DependsOnTargets="ResolveReferences;GetFilesFromPackages"
Returns="@(FilesToPackage)" />
<Target Name="GetDependenciesToPackage"
Condition="'@(DependenciesToPackage)' != ''"
- DependsOnTargets="ResolveNuGetPackages"
+ DependsOnTargets="ResolveReferences"
Returns="@(_DependenciesToPackageWithVersion)">
<ItemGroup>
<!-- intersect ReferencedPackage with DependenciesToPackage -->
<Message Importance="low" Text="%(_DependenciesToPackageWithVersion.Identity) : %(_DependenciesToPackageWithVersion.Version) : %(_DependenciesToPackageWithVersion.TargetFramework)" />
</Target>
- <!--
- When performing a restore, do so in a separate MSBuild call, removing any properties that don't
- affect restore. This allows MSBuild to nicely handle parallel exclusivity.
-
- Without this, the irrelevant properties cause a cache miss. Both restores run at the same time
- with the same intermediate location, causing file lock errors.
- -->
- <Target Name="ParallelSafeRestore"
- BeforeTargets="RestorePackages"
- Condition="'$(InParallelSafeRestore)' != 'true'">
- <MSBuild
- Projects="$(MSBuildProjectFullPath)"
- Targets="RestorePackages"
- RemoveProperties="BaseId;IdPrefix"
- Properties="
- RestorePackages=true;
- InParallelSafeRestore=true" />
- </Target>
-
<!-- Creates the *.versions.txt file describing where data in this package came from. -->
<Target Name="GenerateHashVersionsFile"
DependsOnTargets="GetDependencyVersionFiles"
Overwrite="true"/>
</Target>
- <!--
- Stub DetermineRuntimeDependencies target so that when GenerateRuntimeDependencies builds this
- target on the depproj, the build doesn't fail. BuildTools gives pkgproj a default implementation
- that depproj doesn't get.
- remove when fixing https://github.com/dotnet/buildtools/issues/1273
- -->
- <Target Name="DetermineRuntimeDependencies" />
-
<Target Name="AddCrossgenToolPackageReferences"
BeforeTargets="CollectPackageReferences">
<ItemGroup>
Get paths from packages that are needed for crossgen. Only relevant for runtime-specific builds.
-->
<Target Name="GetCorePackagePaths"
- Condition="'$(NuGetRuntimeIdentifier)' != ''"
- DependsOnTargets="ResolveNuGetPackages">
+ DependsOnTargets="ResolveReferences">
<PropertyGroup>
- <_runtimePackageId>transport.runtime.$(NuGetRuntimeIdentifier).$(MicrosoftNETCoreRuntimeCoreCLRPackage.ToLowerInvariant())</_runtimePackageId>
+ <_runtimePackageId>transport.runtime.$(PackageRID).$(MicrosoftNETCoreRuntimeCoreCLRPackage.ToLowerInvariant())</_runtimePackageId>
<_runtimePackageVersion>$(MicrosoftNETCoreRuntimeCoreCLRPackageVersion)</_runtimePackageVersion>
<_runtimePackageDir>$(PackagesDir)$(_runtimePackageId)/$(_runtimePackageVersion)/</_runtimePackageDir>
- <_jitPackageDir>$(PackagesDir)transport.runtime.$(NuGetRuntimeIdentifier).microsoft.netcore.jit/$(MicrosoftNETCoreRuntimeCoreCLRPackageVersion)/</_jitPackageDir>
- <_corefxPackageDir>$(PackagesDir)runtime.$(NuGetRuntimeIdentifier).$(MicrosoftPrivateCoreFxNETCoreAppPackage.ToLowerInvariant())/$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)/</_corefxPackageDir>
+ <_jitPackageDir>$(PackagesDir)transport.runtime.$(PackageRID).microsoft.netcore.jit/$(MicrosoftNETCoreRuntimeCoreCLRPackageVersion)/</_jitPackageDir>
+ <_corefxPackageDir>$(PackagesDir)runtime.$(PackageRID).$(MicrosoftPrivateCoreFxNETCoreAppPackage.ToLowerInvariant())/$(MicrosoftPrivateCoreFxNETCoreAppPackageVersion)/</_corefxPackageDir>
<_winmdPackageDir>$(PackagesDir)$(MicrosoftTargetingPackPrivateWinRTPackage.ToLowerInvariant())/$(MicrosoftTargetingPackPrivateWinRTPackageVersion)/</_winmdPackageDir>
</PropertyGroup>
</Target>
<Target Name="GetCrossgenToolPaths"
- Condition="'$(NuGetRuntimeIdentifier)' != ''"
DependsOnTargets="GetCorePackagePaths">
<ItemGroup>
<!-- Find crossgen tool assets in package cache to allow ExcludeAssets=All. -->
<!-- Prepares all items for cross-gen and replaces package file items with their cross-gen'ed equivalents -->
<Target Name="PrepareForCrossGen"
- Condition="'$(NuGetRuntimeIdentifier)' != '' AND '$(DisableCrossgen)' != 'true'"
- DependsOnTargets="
- GetCorePackagePaths;
- GetFilesFromPackages">
+ Condition="'$(DisableCrossgen)' != 'true'"
+ DependsOnTargets="GetFilesFromPackages">
<PropertyGroup>
- <_crossGenIntermediatePath>$(IntermediateOutputPath)/crossgen</_crossGenIntermediatePath>
+ <_crossGenIntermediatePath>$(IntermediateOutputPath)crossgen\</_crossGenIntermediatePath>
</PropertyGroup>
<ItemGroup>
Resource DLLs in 'cs/', 'de/', ... subdirectories.
-->
<_filesToCrossGen
- Include="@(FilesToPackage)"
+ Include="@(RidSpecificFilesToPackage)"
Condition="
- '%(FilesToPackage.IsNative)' != 'true' AND
+ '%(RidSpecificFilesToPackage.IsNative)' != 'true' AND
'%(FileName)' != 'System.Private.CoreLib' AND
'%(FileName)' != 'mscorlib' AND
'%(Extension)' == '.dll' AND
- '%(FilesToPackage.DestinationSubDirectory)' == '' AND
+ '%(RidSpecificFilesToPackage.DestinationSubDirectory)' == '' AND
(
'%(FileName)' != 'System.Runtime.WindowsRuntime' Or
'$(OsEnvironment)'=='Windows_NT'
)">
- <CrossGenedDirectory>$(CrossGenOutputPath)/%(TargetPath)/</CrossGenedDirectory>
- <CrossGenedPath>$(CrossGenOutputPath)/%(TargetPath)/%(FileName)%(Extension)</CrossGenedPath>
- <CrossGenSymbolSemaphorePath>$(_crossGenIntermediatePath)/%(FileName).symbol.semaphore</CrossGenSymbolSemaphorePath>
+ <CrossGenedDirectory>$(CrossGenOutputPath)%(TargetPath)/</CrossGenedDirectory>
+ <CrossGenedPath>$(CrossGenOutputPath)%(TargetPath)/%(FileName)%(Extension)</CrossGenedPath>
+ <CrossGenSymbolSemaphorePath>$(_crossGenIntermediatePath)%(FileName).symbol.semaphore</CrossGenSymbolSemaphorePath>
</_filesToCrossGen>
+ </ItemGroup>
+ <ItemGroup Condition="'$(NuGetRuntimeIdentifier)' != ''">
<FilesToPackage Remove="@(_filesToCrossGen)" />
-
- <_crossGenedFilesToPackage Include="@(_filesToCrossGen->'%(CrossGenedPath)')" />
- <FilesToPackage Include="@(_crossGenedFilesToPackage)" />
+ <FilesToPackage Include="@(_filesToCrossGen->'%(CrossGenedPath)')" />
</ItemGroup>
</Target>
<Target Name="CrossGen"
BeforeTargets="Build"
DependsOnTargets="
- GetCrossgenToolPaths;
- EnsureCrossGenIsExecutable;
+ PrepareForCrossGen;
CreateCrossGenImages;
CreateCrossGenSymbols" />
<Target Name="CreateCrossGenImages"
- DependsOnTargets="PrepareForCrossGen"
+ Condition="'@(_filesToCrossGen)' != ''"
+ DependsOnTargets="
+ GetCrossgenToolPaths;
+ EnsureCrossGenIsExecutable"
Inputs="@(_filesToCrossGen)"
Outputs="%(_filesToCrossGen.CrossGenedPath)">
<PropertyGroup>
- <_crossGenResponseFile>$(_crossGenIntermediatePath)/%(_filesToCrossGen.FileName).rsp</_crossGenResponseFile>
+ <_crossGenResponseFile>$(_crossGenIntermediatePath)%(_filesToCrossGen.FileName).rsp</_crossGenResponseFile>
</PropertyGroup>
<ItemGroup>
<_crossGenArgs Include="-readytorun" />
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName('%(_filesToCrossGen.CrossGenedPath)'))" />
<WriteLinesToFile File="$(_crossGenResponseFile)" Lines="@(_crossGenArgs)" Overwrite="true" />
+ <!--
+ Use IgnoreStandardErrorWarningFormat because Arcade sets WarnAsError and in some cases
+ crossgen warnings need to be ignored, like https://github.com/dotnet/core-setup/issues/5940.
+ -->
<Exec
Command="$(_crossGenPath) @$(_crossGenResponseFile)"
WorkingDirectory="$(_clrDirectory)"
- EnvironmentVariables="COMPlus_PartialNGen=$(_partialCrossgenFlag)" />
+ EnvironmentVariables="COMPlus_PartialNGen=$(_partialCrossgenFlag)"
+ IgnoreStandardErrorWarningFormat="true" />
</Target>
<Target Name="CreateCrossGenSymbols"
Inputs="%(_filesToCrossGen.CrossGenedPath)"
Outputs="%(_filesToCrossGen.CrossGenSymbolSemaphorePath)">
<PropertyGroup>
- <_crossGenSymbolsResponseFile>$(_crossGenIntermediatePath)/%(_filesToCrossGen.FileName).symbols.rsp</_crossGenSymbolsResponseFile>
+ <_crossGenSymbolsResponseFile>$(_crossGenIntermediatePath)%(_filesToCrossGen.FileName).symbols.rsp</_crossGenSymbolsResponseFile>
<_crossGenSymbolsOptionName Condition="'$(OS)' == 'Windows_NT'">CreatePDB</_crossGenSymbolsOptionName>
<_crossGenSymbolsOptionName Condition="'$(_crossGenSymbolsOptionName)' == ''">CreatePerfMap</_crossGenSymbolsOptionName>
<_crossGenSymbolsOutputDirectory>$(CrossGenSymbolsOutputPath)/%(_filesToCrossGen.TargetPath)</_crossGenSymbolsOutputDirectory>
<ItemGroup>
<FilesToPackage Include="$(CrossGenSymbolsOutputPath)/**/*$(CrossGenSymbolExtension)">
<IsSymbolFile>true</IsSymbolFile>
- <TargetPath>runtimes/$(NuGetRuntimeIdentifier)/lib/$(PackageTargetFramework)</TargetPath>
+ <TargetPath>runtimes/$(PackageRID)/lib/$(PackageTargetFramework)</TargetPath>
</FilesToPackage>
</ItemGroup>
</Target>
DependsOnTargets="PrepareForCrossGen;GetCrossGenSymbolsFiles" />
<Target Name="GetReferenceFilenames"
- Returns="@(Reference -> '%(Filename)')"
- DependsOnTargets="ResolveNuGetPackages" />
+ DependsOnTargets="ResolveReferences"
+ Returns="@(Reference -> '%(Filename)')" />
<!-- Target overrides (can't be shared with pkgproj) -->
Shared targets specific to projects building 'Microsoft.*.App*' packages.
-->
- <UsingTask TaskName="BuildFPMToolPreReqs" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
- <UsingTask TaskName="GenerateJsonObjectString" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
-
- <Import Project="$(MSBuildThisFileDirectory)windows/wix.targets" />
-
- <Target Name="GenerateInstallers"
- DependsOnTargets="
- GetInstallerProperties;
- GenerateDeb;
- GenerateRpm;
- GenerateMsi;
- GeneratePkg;
- GenerateCompressedArchive" />
-
- <Target Name="GenerateDeb" DependsOnTargets="TestDebuild;CreateDeb" Condition="'$(BuildDebPackage)' == 'true'"/>
- <Target Name="GenerateRpm" DependsOnTargets="TestFPMTool;CreateRpm" Condition="'$(BuildRpmPackage)' == 'true'"/>
- <Target Name="GenerateMsi" DependsOnTargets="CreateMsi" Condition="'$(GenerateMSI)' == 'true'"/>
- <Target Name="GeneratePkg" DependsOnTargets="CreatePkg" Condition="'$(GeneratePkg)' == 'true'"/>
- <Target Name="GenerateCompressedArchive" DependsOnTargets="CreateCompressedArchive" Condition="'$(GenerateCompressedArchive)' == 'true'"/>
-
- <!--
- Create Debian package.
- -->
- <Target Name="CreateDeb"
- DependsOnTargets="
- GetInstallerProperties;
- InitializeDotnetDebTool;
- CreateInstallerLayout;
- GetDebInstallerJsonProperties"
- Condition="'$(DebuildPresent)' == 'true'">
- <PropertyGroup>
- <ConfigJsonFile>$(LayoutDirectory)debian_config.json</ConfigJsonFile>
- <DebIntermediatesDir>$(InstallerIntermediatesDir)out-deb</DebIntermediatesDir>
-
- <DebToolArgs>-i $(LayoutDirectory)</DebToolArgs>
- <DebToolArgs>$(DebToolArgs) -o $(DebIntermediatesDir)</DebToolArgs>
- <DebToolArgs>$(DebToolArgs) -n $(VersionedInstallerName)</DebToolArgs>
- <DebToolArgs>$(DebToolArgs) -v $(InstallerPackageVersion)</DebToolArgs>
- </PropertyGroup>
-
- <!-- Write the configuration JSON. -->
- <GenerateJsonObjectString
- Properties="@(CommonJsonProperty);@(DebJsonProperty)"
- TargetFile="$(ConfigJsonFile)" />
-
- <!-- Run deb tool in the directory of the consumer project. -->
- <Exec
- Command="$(DotnetToolCommand) deb-tool $(DebToolArgs)"
- WorkingDirectory="$(DebtoolConsumerDeployDir)" />
-
- <!-- Copy package to output. -->
- <ItemGroup>
- <GeneratedDebFiles Include="$(DebIntermediatesDir)/*.deb" />
- </ItemGroup>
-
- <Error Text="@(GeneratedDebFiles->Count()) .deb files generated." Condition="'@(GeneratedDebFiles->Count())' != 1" />
-
- <Copy SourceFiles="@(GeneratedDebFiles)"
- DestinationFiles="$(InstallerFile)"
- OverwriteReadOnlyFiles="True"
- SkipUnchangedFiles="False"
- UseHardlinksIfPossible="False" />
- </Target>
-
- <Target Name="GetDebInstallerJsonProperties"
- DependsOnTargets="GetCommonJsonProperties">
- <ItemGroup>
- <DebJsonProperty Include="debian_dependencies" Object="{}" />
- </ItemGroup>
- </Target>
-
- <!--
- Create RPM package.
- -->
- <Target Name="CreateRpm"
- DependsOnTargets="
- GetInstallerProperties;
- CreateInstallerLayout;
- GetRpmInstallerJsonProperties"
- Condition="'$(FPMPresent)' == 'true'">
- <PropertyGroup>
- <ConfigJsonFile>$(LayoutDirectory)rpm_config.json</ConfigJsonFile>
- <RpmIntermediatesDir>$(InstallerIntermediatesDir)out-rpm</RpmIntermediatesDir>
-
- <!-- Copyright, Changelog -->
- <RpmTemplatesLayoutDir>$(LayoutDirectory)templates/</RpmTemplatesLayoutDir>
- </PropertyGroup>
-
- <ItemGroup>
- <RpmTemplateFile Include="$(RpmTemplatesDir)**/*" />
- </ItemGroup>
-
- <Copy
- SourceFiles="@(RpmTemplateFile)"
- DestinationFiles="@(RpmTemplateFile->'$(RpmTemplatesLayoutDir)%(RecursiveDir)%(Filename)%(Extension)')" />
-
- <GenerateJsonObjectString
- Properties="@(CommonJsonProperty);@(RpmJsonProperty)"
- TargetFile="$(ConfigJsonFile)" />
-
- <MakeDir Directories="$(RpmIntermediatesDir)" />
-
- <!-- Call the task to build the pre-reqs (parameters, copyright, changelog) for calling the FPM tool -->
- <BuildFPMToolPreReqs
- InputDir="$(LayoutDirectory)"
- OutputDir="$(RpmIntermediatesDir)"
- PackageVersion="$(InstallerPackageVersion)"
- ConfigJsonFile="$(ConfigJsonFile)">
- <Output TaskParameter="FPMParameters" PropertyName="FPMCmdParameters" />
- </BuildFPMToolPreReqs>
-
- <Exec Command="fpm $(FPMCmdParameters)" WorkingDirectory="$(RpmIntermediatesDir)" />
-
- <!-- Copy package to output -->
- <ItemGroup>
- <GeneratedRpmFiles Include="$(RpmIntermediatesDir)/*.rpm" />
- </ItemGroup>
-
- <Error Text="@(GeneratedRpmFiles->Count()) .rpm files generated." Condition="'@(GeneratedRpmFiles->Count())' != 1" />
-
- <Copy SourceFiles="@(GeneratedRpmFiles)"
- DestinationFiles="$(InstallerFile)"
- OverwriteReadOnlyFiles="True"
- SkipUnchangedFiles="False"
- UseHardlinksIfPossible="False" />
- </Target>
-
- <Target Name="GetRpmInstallerJsonProperties"
- DependsOnTargets="GetCommonJsonProperties">
- <ItemGroup>
- <RpmJsonProperty Include="vendor" String=".NET Foundation" />
- <RpmJsonProperty Include="install_doc" String="/usr/share/doc/$(VersionedInstallerName)/" />
- <RpmJsonProperty Include="rpm_dependencies" Object="{}" />
- </ItemGroup>
- </Target>
-
- <!--
- Create MSI installer, using WiX tools.
- -->
- <Target Name="CreateMsi"
- DependsOnTargets="
- GetInstallerProperties;
- RunLightLinker">
- <Message Text="Created '$(InstallerFile)'" Importance="High" />
- </Target>
-
- <Target Name="CreateCompressedArchive"
- DependsOnTargets="
- GetInstallerProperties;
- GenerateZip"/>
-
- <UsingTask TaskName="ZipFileCreateFromDirectory" AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll"/>
-
- <Target Name="GenerateZip"
- Condition="'$(OSGroup)' == 'Windows_NT'">
- <ZipFileCreateFromDirectory
- SourceDirectory="$(SharedFrameworkArchiveSourceDir)"
- DestinationArchive="$(CompressedArchiveFile)"
- OverwriteDestination="true" />
- </Target>
-
- <!--
- Create macOS pkg installer.
- -->
- <Target Name="CreatePkg"
- DependsOnTargets="
- GetInstallerProperties;
- FixLayoutPermissions">
- <PropertyGroup>
- <_pkgArgs></_pkgArgs>
- <_pkgArgs>$(_pkgArgs) --root $(PackLayoutDir)</_pkgArgs>
- <_pkgArgs>$(_pkgArgs) --identifier $(MacOSComponentName)</_pkgArgs>
- <_pkgArgs>$(_pkgArgs) --version $(ProductVersion)</_pkgArgs>
- <_pkgArgs>$(_pkgArgs) --install-location $(MacOSSharedInstallDir)</_pkgArgs>
- <_pkgArgs>$(_pkgArgs) $(InstallerFile)</_pkgArgs>
- </PropertyGroup>
-
- <Exec Command="pkgbuild $(_pkgArgs)" />
- </Target>
-
- <!--
- Create installer layout. Used for RPM or Debian package creation.
- -->
- <Target Name="CreateInstallerLayout"
- DependsOnTargets="
- FixLayoutPermissions;
- CopyFilesToLayout" />
-
- <Target Name="CopyFilesToLayout">
- <PropertyGroup>
- <LayoutDirectory>$(InstallerIntermediatesDir)/layoutDirectory/</LayoutDirectory>
- <LayoutAbsolute>$(LayoutDirectory)$</LayoutAbsolute>
- <LayoutPackageRoot>$(LayoutDirectory)package_root</LayoutPackageRoot>
- <LayoutSamples>$(LayoutDirectory)samples</LayoutSamples>
- <LayoutDocs>$(LayoutDirectory)docs</LayoutDocs>
- </PropertyGroup>
-
- <RemoveDir Condition="Exists('$(InstallerIntermediatesDir)')" Directories="$(InstallerIntermediatesDir)" />
- <MakeDir Directories="$(InstallerIntermediatesDir)" />
-
- <!-- Create empty layout. -->
- <RemoveDir Condition="Exists('$(LayoutDirectory)')" Directories="$(LayoutDirectory)" />
- <MakeDir Directories="$(LayoutDirectory)" />
- <MakeDir Directories="$(LayoutAbsolute)" />
- <MakeDir Directories="$(LayoutPackageRoot)" />
- <MakeDir Directories="$(LayoutSamples)" />
- <MakeDir Directories="$(LayoutDocs)" />
-
- <!-- Copy files to layout. -->
- <ItemGroup>
- <LayoutFiles Include="$(PackLayoutDir)/**/*" />
- </ItemGroup>
-
- <Error Text="No pack layout files found, expected > 0." Condition="@(LayoutFiles->Count()) == 0" />
-
- <Copy
- SourceFiles="@(LayoutFiles)"
- DestinationFiles="@(LayoutFiles->'$(LayoutPackageRoot)/%(RecursiveDir)%(Filename)%(Extension)')" />
- </Target>
-
- <Target Name="FixLayoutPermissions"
- Condition="'$(OSGroup)' != 'Windows_NT'">
- <!-- Fix file permissions in the layout dir. -->
- <!-- Reset everything to user readable/writeable and group and world readable. -->
- <Exec Command='find "$(PackLayoutDir)" -type f -name "*" -exec chmod 644 {} \;' />
- <!-- Generally, dylibs and sos have 'x'. -->
- <Exec Command='find "$(PackLayoutDir)" -type f -name "*.dylib" -exec chmod 755 {} \;' />
- <Exec Command='find "$(PackLayoutDir)" -type f -name "*.so" -exec chmod 755 {} \;' />
- <!-- Executables (those without dots) are executable. -->
- <Exec Command='find "$(PackLayoutDir)" -type f ! -name "*.*" -exec chmod 755 {} \;' />
- </Target>
-
- <!--
- Get common JSON properties. Used in the configuration JSON for both RPM and Debian packages.
- -->
- <Target Name="GetCommonJsonProperties">
- <PropertyGroup>
- <FullLicenseText>$([System.IO.File]::ReadAllText('$(ProjectDir)LICENSE.TXT').Replace('%0A', '\n').Replace('"', '\"'))</FullLicenseText>
- </PropertyGroup>
-
- <ItemGroup>
- <JsonReleaseProperty Include="package_version" String="1.0.0.0" />
- <JsonReleaseProperty Include="package_revision" String="$(InstallerPackageRelease)" />
- <JsonReleaseProperty Include="urgency" String="low" />
- <JsonReleaseProperty Include="changelog_message" String="https://github.com/dotnet/core/tree/master/release-notes" />
-
- <JsonControlProperty Include="priority" String="standard" />
- <JsonControlProperty Include="section" String="libs" />
- <JsonControlProperty Include="architecture" String="amd64" />
-
- <JsonLicenseProperty Include="type" String="MIT and ASL 2.0 and BSD" />
- <JsonLicenseProperty Include="full_text" String="$(FullLicenseText)" />
- </ItemGroup>
-
- <GenerateJsonObjectString Properties="@(JsonReleaseProperty)">
- <Output TaskParameter="Json" PropertyName="JsonReleaseObject" />
- </GenerateJsonObjectString>
- <GenerateJsonObjectString Properties="@(JsonControlProperty)">
- <Output TaskParameter="Json" PropertyName="JsonControlObject" />
- </GenerateJsonObjectString>
- <GenerateJsonObjectString Properties="@(JsonLicenseProperty)">
- <Output TaskParameter="Json" PropertyName="JsonLicenseObject" />
- </GenerateJsonObjectString>
-
- <ItemGroup>
- <CommonJsonProperty Include="package_name" String="$(VersionedInstallerName)" />
- <CommonJsonProperty Include="short_description" String="$(MSBuildProjectName) $(InstallerPackageVersion)" />
- <CommonJsonProperty Include="maintainer_name" String=".NET Core Team" />
- <CommonJsonProperty Include="maintainer_email" String="dotnetpackages@dotnetfoundation.org" />
- <CommonJsonProperty Include="install_root" String="/usr/share/dotnet" />
- <CommonJsonProperty Include="long_description" String=".NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs." />
- <CommonJsonProperty Include="homepage" String="https://github.com/dotnet/core" />
- <CommonJsonProperty Include="copyright" String="2017 Microsoft" />
- <CommonJsonProperty Include="release" Object="$(JsonReleaseObject)" />
- <CommonJsonProperty Include="control" Object="$(JsonControlObject)" />
- <CommonJsonProperty Include="license" Object="$(JsonLicenseObject)" />
- </ItemGroup>
- </Target>
-
<!--
Copy the files in the package's data/ dir to a layout directory. This is what the pack installer
will place in the dotnet install dir.
Include="@(FrameworkPackDataEntries)" />
</Target>
- <Target Name="GenerateSharedFramework"
- Condition="'$(GenerateSharedFramework)' == 'true'">
- <PropertyGroup>
- <!--
- For the sfx intermediate path, use 'bin/obj/sfx/', without OSPlatformConfig (RID +
- Release/Debug). This is to save on path chars, which are at a premium. if the Git clone root
- is even a little deep, Windows max path is a big problem. Package caches are a particular
- problem due to long IDs, long versions, and deep resource DLLs with big names.
-
- The OSPlatformConfig is normally in the intermediate path because it allows building
- different configurations without cleaning the repo in between. This can be valuable for dev
- builds. Not including OSPlatformConfig is ok in this target because the intermediate dir is
- always deleted before it's used.
- -->
- <SharedFrameworkIntermediateOutputPath>$(BaseIntermediateOutputPath)sfx/$(ShortFrameworkName)/</SharedFrameworkIntermediateOutputPath>
- </PropertyGroup>
-
- <!-- Delete layout directory and sfx NuGet cache to ensure freshness. -->
- <RemoveDir Directories="$(SharedFrameworkLayoutDir);$(SharedFrameworkIntermediateOutputPath)" />
-
- <!--
- Build a csproj that lays out the shared framework using the SDK publish targets. Pass
- properties to make the csproj restore and publish specific to the current pkgproj.
-
- Noteworthy inputs:
- SharedFrameworkName:
- Name of the shared framework, such as Microsoft.NETCore.App.
- SharedFrameworkPkgprojFile:
- Full path of the pkgproj that produces the framework package. The framework package
- identity is extracted from here via an MSBuild task, to be restored.
- SharedFrameworkLayoutDir:
- Directory to lay out "<id>/<version>/<files>" of the shared fx.
- IntermediateOutputPath:
- Typical: directory for intermediates, custom to avoid clashing.
- MSBuildProjectExtensionsPath:
- Same as IntermediateOutputPath. Passed in as a workaround, because the SDK needs the value
- in its props file before we have a chance to override in this project.
- -->
- <MSBuild
- Projects="$(MSBuildThisFileDirectory)sharedFramework/sharedFramework.csproj"
- Properties="
- SharedFrameworkName=$(MSBuildProjectName);
- SharedFrameworkPkgprojFile=$(MSBuildProjectFullPath);
- SharedFrameworkLayoutDir=$(SharedFrameworkLayoutDir);
- IntermediateOutputPath=$(SharedFrameworkIntermediateOutputPath);
- MSBuildProjectExtensionsPath=$(SharedFrameworkIntermediateOutputPath);
- PackageRID=$(PackageRID);
- GenerateNetCoreAppRuntimeConfig=$(GenerateNetCoreAppRuntimeConfig);
- GenerateRuntimeGraph=$(GenerateRuntimeGraph)" />
- </Target>
-
<!--
Add note to Targeting Pack nupkg description that this package shouldn't be referenced directly.
The packaging tooling normally only adds this to runtime packages.
<!-- Target overrides (can't be shared with other package projects) -->
+ <!--
+ Redefine build. The packaging tools require a parameterized build call to use IDs other than the
+ project name such as the runtime pack RID suffix and runtime package RID prefix. Perform a
+ nested build when these runtime-specific packages are necessary.
+
+ Also, generate shared framework layout and installers as appropriate.
+ -->
+ <Target Name="Build"
+ DependsOnTargets="
+ BuildRidAgnosticPackage;
+ BuildRidSpecificPackage;
+ GenerateInstallers" />
+
+ <Target Name="BuildRidAgnosticPackage"
+ DependsOnTargets="$(BuildDependsOn)"
+ Condition="'$(BuildLineupPackage)' == 'true'">
+ <Message Text="$(MSBuildProjectName) -> $(NuSpecPath)" Importance="high" />
+ </Target>
+
+ <Target Name="BuildRidSpecificPackage">
+ <!--
+ If PackageRID should be built for the current package, PackageBuildRID is set to PackageRID.
+ Otherwise, PackageBuildRID is left empty.
+ -->
+ <PropertyGroup>
+ <PackageBuildRID Condition="'%(Identity)' == '$(PackageRID)'">@(BuildRID)</PackageBuildRID>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(BuildRidSpecificPacks)' == 'true'">
+ <RidSpecificPackProperties>BaseId=$(MSBuildProjectName).$(PackageBuildRID);IdPrefix=</RidSpecificPackProperties>
+ </PropertyGroup>
+
+ <!--
+ Ensure all project references are built to make sure dependencies (e.g. native build and
+ depproj's crossgen) runs first. The global properties mean we can't let the inner build handle
+ this itself because it would miss the cache of finished builds.
+ -->
+ <MSBuild
+ Projects="@(ProjectReference);@(WaitOnlyProjectReference)"
+ Targets="Build" />
+
+ <MSBuild
+ Condition="
+ '$(PackageBuildRID)' != '' and
+ (
+ '$(BuildRidSpecificPacks)' == 'true' or
+ ('$(FrameworkPackType)' == '' and '$(BuildRuntimePackages)' == 'true')
+ )"
+ Projects="$(MSBuildProjectFullPath)"
+ Targets="InnerBuildRidSpecificPackage"
+ Properties="
+ BuildPackageLibraryReferences=false;
+ DisableOrderDependencies=true;
+ PackageTargetRuntime=$(PackageBuildRID);
+ NuGetRuntimeIdentifier=$(PackageBuildRID);
+ $(RidSpecificPackProperties)" />
+ </Target>
+
+ <Target Name="InnerBuildRidSpecificPackage"
+ DependsOnTargets="$(BuildDependsOn)">
+ <Message Text="$(MSBuildProjectName) -> $(NuSpecPath)" Importance="high" />
+ </Target>
+
<Import
Project="$(MSBuildThisFileDirectory)skip.GetPackageReport.targets"
Condition="'$(SkipValidatePackage)' == 'true'"/>
--- /dev/null
+<Project>
+ <!--
+ Shared targets to build installer artifacts such as installers, distro packages, and tarballs.
+ -->
+
+ <UsingTask TaskName="BuildFPMToolPreReqs" AssemblyFile="$(LocalBuildToolsTaskFile)"/>
+ <UsingTask TaskName="GenerateJsonObjectString" AssemblyFile="$(LocalBuildToolsTaskFile)"/>
+ <UsingTask TaskName="ZipFileCreateFromDirectory" AssemblyFile="$(LocalBuildToolsTaskFile)"/>
+ <UsingTask TaskName="ZipFileExtractToDirectory" AssemblyFile="$(LocalBuildToolsTaskFile)" />
+ <UsingTask TaskName="ZipFileGetEntries" AssemblyFile="$(LocalBuildToolsTaskFile)" />
+
+ <Import Project="$(MSBuildThisFileDirectory)windows/wix.targets" />
+
+ <Target Name="GenerateInstallers"
+ DependsOnTargets="
+ GetInstallerProperties;
+ GenerateDeb;
+ GenerateRpm;
+ GenerateMsi;
+ GeneratePkg;
+ GenerateCompressedArchive" />
+
+ <Target Name="GenerateDeb" DependsOnTargets="TestDebuild;CreateDeb" Condition="'$(BuildDebPackage)' == 'true'"/>
+ <Target Name="GenerateRpm" DependsOnTargets="TestFPMTool;CreateRpm" Condition="'$(BuildRpmPackage)' == 'true'"/>
+ <Target Name="GenerateMsi" DependsOnTargets="CreateMsi" Condition="'$(GenerateMSI)' == 'true'"/>
+ <Target Name="GeneratePkg" DependsOnTargets="CreatePkg" Condition="'$(GeneratePkg)' == 'true'"/>
+ <Target Name="GenerateCompressedArchive" DependsOnTargets="CreateCompressedArchive" Condition="'$(GenerateCompressedArchive)' == 'true'"/>
+
+ <!--
+ Create Debian package.
+ -->
+ <Target Name="CreateDeb"
+ DependsOnTargets="
+ GetInstallerProperties;
+ InitializeDotnetDebTool;
+ CreateInstallerLayout;
+ GetDebInstallerJsonProperties"
+ Condition="'$(DebuildPresent)' == 'true'">
+ <PropertyGroup>
+ <ConfigJsonFile>$(LayoutDirectory)debian_config.json</ConfigJsonFile>
+ <DebIntermediatesDir>$(InstallerIntermediatesDir)out-deb</DebIntermediatesDir>
+
+ <DebToolArgs>-i $(LayoutDirectory)</DebToolArgs>
+ <DebToolArgs>$(DebToolArgs) -o $(DebIntermediatesDir)</DebToolArgs>
+ <DebToolArgs>$(DebToolArgs) -n $(VersionedInstallerName)</DebToolArgs>
+ <DebToolArgs>$(DebToolArgs) -v $(InstallerPackageVersion)</DebToolArgs>
+ </PropertyGroup>
+
+ <!-- Write the configuration JSON. -->
+ <GenerateJsonObjectString
+ Properties="@(CommonJsonProperty);@(DebJsonProperty)"
+ TargetFile="$(ConfigJsonFile)" />
+
+ <!-- Run deb tool in the directory of the consumer project. -->
+ <Exec
+ Command="$(DotNetTool) deb-tool $(DebToolArgs)"
+ WorkingDirectory="$(DebtoolConsumerDeployDir)" />
+
+ <!-- Copy package to output. -->
+ <ItemGroup>
+ <GeneratedDebFiles Include="$(DebIntermediatesDir)/*.deb" />
+ </ItemGroup>
+
+ <Error Text="@(GeneratedDebFiles->Count()) .deb files generated." Condition="'@(GeneratedDebFiles->Count())' != 1" />
+
+ <Copy SourceFiles="@(GeneratedDebFiles)"
+ DestinationFiles="$(InstallerFile)"
+ OverwriteReadOnlyFiles="True"
+ SkipUnchangedFiles="False"
+ UseHardlinksIfPossible="False" />
+ </Target>
+
+ <Target Name="GetDebInstallerJsonProperties"
+ DependsOnTargets="GetCommonJsonProperties">
+ <ItemGroup>
+ <DebJsonProperty Include="debian_dependencies" Object="{}" />
+ </ItemGroup>
+ </Target>
+
+ <!--
+ Create RPM package.
+ -->
+ <Target Name="CreateRpm"
+ DependsOnTargets="
+ GetInstallerProperties;
+ CreateInstallerLayout;
+ GetRpmInstallerJsonProperties"
+ Condition="'$(FPMPresent)' == 'true'">
+ <PropertyGroup>
+ <ConfigJsonFile>$(LayoutDirectory)rpm_config.json</ConfigJsonFile>
+ <RpmIntermediatesDir>$(InstallerIntermediatesDir)out-rpm</RpmIntermediatesDir>
+
+ <!-- Copyright, Changelog -->
+ <RpmTemplatesLayoutDir>$(LayoutDirectory)templates/</RpmTemplatesLayoutDir>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <RpmTemplateFile Include="$(RpmTemplatesDir)**/*" />
+ </ItemGroup>
+
+ <Copy
+ SourceFiles="@(RpmTemplateFile)"
+ DestinationFiles="@(RpmTemplateFile->'$(RpmTemplatesLayoutDir)%(RecursiveDir)%(Filename)%(Extension)')" />
+
+ <GenerateJsonObjectString
+ Properties="@(CommonJsonProperty);@(RpmJsonProperty)"
+ TargetFile="$(ConfigJsonFile)" />
+
+ <MakeDir Directories="$(RpmIntermediatesDir)" />
+
+ <!-- Call the task to build the pre-reqs (parameters, copyright, changelog) for calling the FPM tool -->
+ <BuildFPMToolPreReqs
+ InputDir="$(LayoutDirectory)"
+ OutputDir="$(RpmIntermediatesDir)"
+ PackageVersion="$(InstallerPackageVersion)"
+ ConfigJsonFile="$(ConfigJsonFile)">
+ <Output TaskParameter="FPMParameters" PropertyName="FPMCmdParameters" />
+ </BuildFPMToolPreReqs>
+
+ <Exec Command="fpm $(FPMCmdParameters)" WorkingDirectory="$(RpmIntermediatesDir)" />
+
+ <!-- Copy package to output -->
+ <ItemGroup>
+ <GeneratedRpmFiles Include="$(RpmIntermediatesDir)/*.rpm" />
+ </ItemGroup>
+
+ <Error Text="@(GeneratedRpmFiles->Count()) .rpm files generated." Condition="'@(GeneratedRpmFiles->Count())' != 1" />
+
+ <Copy SourceFiles="@(GeneratedRpmFiles)"
+ DestinationFiles="$(InstallerFile)"
+ OverwriteReadOnlyFiles="True"
+ SkipUnchangedFiles="False"
+ UseHardlinksIfPossible="False" />
+ </Target>
+
+ <Target Name="GetRpmInstallerJsonProperties"
+ DependsOnTargets="GetCommonJsonProperties">
+ <ItemGroup>
+ <RpmJsonProperty Include="vendor" String=".NET Foundation" />
+ <RpmJsonProperty Include="install_doc" String="/usr/share/doc/$(VersionedInstallerName)/" />
+ <RpmJsonProperty Include="rpm_dependencies" Object="{}" />
+ </ItemGroup>
+ </Target>
+
+ <!--
+ Create MSI installer, using WiX tools.
+ -->
+ <Target Name="CreateMsi"
+ DependsOnTargets="
+ GetInstallerProperties;
+ RunLightLinker">
+ <Message Text="Created '$(InstallerFile)'" Importance="High" />
+ </Target>
+
+ <Target Name="CreateCompressedArchive"
+ DependsOnTargets="
+ GetInstallerProperties;
+ GenerateZip"/>
+
+ <Target Name="GenerateZip"
+ Condition="'$(OSGroup)' == 'Windows_NT'">
+ <ZipFileCreateFromDirectory
+ SourceDirectory="$(SharedFrameworkArchiveSourceDir)"
+ DestinationArchive="$(CompressedArchiveFile)"
+ OverwriteDestination="true" />
+ </Target>
+
+ <!--
+ Create macOS pkg installer.
+ -->
+ <Target Name="CreatePkg"
+ DependsOnTargets="
+ GetInstallerProperties;
+ FixLayoutPermissions">
+ <PropertyGroup>
+ <_pkgArgs></_pkgArgs>
+ <_pkgArgs>$(_pkgArgs) --root $(PackLayoutDir)</_pkgArgs>
+ <_pkgArgs>$(_pkgArgs) --identifier $(MacOSComponentName)</_pkgArgs>
+ <_pkgArgs>$(_pkgArgs) --version $(ProductVersion)</_pkgArgs>
+ <_pkgArgs>$(_pkgArgs) --install-location $(MacOSSharedInstallDir)</_pkgArgs>
+ <_pkgArgs>$(_pkgArgs) $(InstallerFile)</_pkgArgs>
+ </PropertyGroup>
+
+ <Exec Command="pkgbuild $(_pkgArgs)" />
+ </Target>
+
+ <!--
+ Create installer layout. Used for RPM or Debian package creation.
+ -->
+ <Target Name="CreateInstallerLayout"
+ DependsOnTargets="
+ FixLayoutPermissions;
+ CopyFilesToLayout" />
+
+ <Target Name="CopyFilesToLayout">
+ <PropertyGroup>
+ <LayoutDirectory>$(InstallerIntermediatesDir)/layoutDirectory/</LayoutDirectory>
+ <LayoutAbsolute>$(LayoutDirectory)$</LayoutAbsolute>
+ <LayoutPackageRoot>$(LayoutDirectory)package_root</LayoutPackageRoot>
+ <LayoutSamples>$(LayoutDirectory)samples</LayoutSamples>
+ <LayoutDocs>$(LayoutDirectory)docs</LayoutDocs>
+ </PropertyGroup>
+
+ <RemoveDir Condition="Exists('$(InstallerIntermediatesDir)')" Directories="$(InstallerIntermediatesDir)" />
+ <MakeDir Directories="$(InstallerIntermediatesDir)" />
+
+ <!-- Create empty layout. -->
+ <RemoveDir Condition="Exists('$(LayoutDirectory)')" Directories="$(LayoutDirectory)" />
+ <MakeDir Directories="$(LayoutDirectory)" />
+ <MakeDir Directories="$(LayoutAbsolute)" />
+ <MakeDir Directories="$(LayoutPackageRoot)" />
+ <MakeDir Directories="$(LayoutSamples)" />
+ <MakeDir Directories="$(LayoutDocs)" />
+
+ <!-- Copy files to layout. -->
+ <ItemGroup>
+ <LayoutFiles Include="$(PackLayoutDir)/**/*" />
+ </ItemGroup>
+
+ <Error Text="No pack layout files found, expected > 0." Condition="@(LayoutFiles->Count()) == 0" />
+
+ <Copy
+ SourceFiles="@(LayoutFiles)"
+ DestinationFiles="@(LayoutFiles->'$(LayoutPackageRoot)/%(RecursiveDir)%(Filename)%(Extension)')" />
+ </Target>
+
+ <Target Name="FixLayoutPermissions"
+ Condition="'$(OSGroup)' != 'Windows_NT'">
+ <!-- Fix file permissions in the layout dir. -->
+ <!-- Reset everything to user readable/writeable and group and world readable. -->
+ <Exec Command='find "$(PackLayoutDir)" -type f -name "*" -exec chmod 644 {} \;' />
+ <!-- Generally, dylibs and sos have 'x'. -->
+ <Exec Command='find "$(PackLayoutDir)" -type f -name "*.dylib" -exec chmod 755 {} \;' />
+ <Exec Command='find "$(PackLayoutDir)" -type f -name "*.so" -exec chmod 755 {} \;' />
+ <!-- Executables (those without dots) are executable. -->
+ <Exec Command='find "$(PackLayoutDir)" -type f ! -name "*.*" -exec chmod 755 {} \;' />
+ </Target>
+
+ <!--
+ Get common JSON properties. Used in the configuration JSON for both RPM and Debian packages.
+ -->
+ <Target Name="GetCommonJsonProperties">
+ <PropertyGroup>
+ <FullLicenseText>$([System.IO.File]::ReadAllText('$(ProjectDir)LICENSE.TXT').Replace('%0A', '\n').Replace('"', '\"'))</FullLicenseText>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <JsonReleaseProperty Include="package_version" String="1.0.0.0" />
+ <JsonReleaseProperty Include="package_revision" String="$(InstallerPackageRelease)" />
+ <JsonReleaseProperty Include="urgency" String="low" />
+ <JsonReleaseProperty Include="changelog_message" String="https://github.com/dotnet/core/tree/master/release-notes" />
+
+ <JsonControlProperty Include="priority" String="standard" />
+ <JsonControlProperty Include="section" String="libs" />
+ <JsonControlProperty Include="architecture" String="amd64" />
+
+ <JsonLicenseProperty Include="type" String="MIT and ASL 2.0 and BSD" />
+ <JsonLicenseProperty Include="full_text" String="$(FullLicenseText)" />
+ </ItemGroup>
+
+ <GenerateJsonObjectString Properties="@(JsonReleaseProperty)">
+ <Output TaskParameter="Json" PropertyName="JsonReleaseObject" />
+ </GenerateJsonObjectString>
+ <GenerateJsonObjectString Properties="@(JsonControlProperty)">
+ <Output TaskParameter="Json" PropertyName="JsonControlObject" />
+ </GenerateJsonObjectString>
+ <GenerateJsonObjectString Properties="@(JsonLicenseProperty)">
+ <Output TaskParameter="Json" PropertyName="JsonLicenseObject" />
+ </GenerateJsonObjectString>
+
+ <ItemGroup>
+ <CommonJsonProperty Include="package_name" String="$(VersionedInstallerName)" />
+ <CommonJsonProperty Include="short_description" String="$(MSBuildProjectName) $(InstallerPackageVersion)" />
+ <CommonJsonProperty Include="maintainer_name" String=".NET Core Team" />
+ <CommonJsonProperty Include="maintainer_email" String="dotnetpackages@dotnetfoundation.org" />
+ <CommonJsonProperty Include="install_root" String="/usr/share/dotnet" />
+ <CommonJsonProperty Include="long_description" String=".NET Core is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs." />
+ <CommonJsonProperty Include="homepage" String="https://github.com/dotnet/core" />
+ <CommonJsonProperty Include="copyright" String="2017 Microsoft" />
+ <CommonJsonProperty Include="release" Object="$(JsonReleaseObject)" />
+ <CommonJsonProperty Include="control" Object="$(JsonControlObject)" />
+ <CommonJsonProperty Include="license" Object="$(JsonLicenseObject)" />
+ </ItemGroup>
+ </Target>
+
+</Project>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <InstallerSourceIntermediateOutputDir>$(BaseIntermediateOutputPath)$(InstallerSourceOSPlatformConfig)\$(MSBuildProjectName)\</InstallerSourceIntermediateOutputDir>
+ <InstallerSourceIntermediateOutputDir>$(ObjDir)$(InstallerSourceOSPlatformConfig)\$(MSBuildProjectName)\</InstallerSourceIntermediateOutputDir>
+
+ <CopyBuildOutputToOutputDirectory>false</CopyBuildOutputToOutputDirectory>
</PropertyGroup>
<!-- Detect framework pack suffix and apply defaults. -->
</PropertyGroup>
<PropertyGroup>
- <SharedFrameworkLayoutDir>$(InstallerSourceIntermediateOutputDir)sharedFxLayout/</SharedFrameworkLayoutDir>
+ <SharedFrameworkLayoutDir Condition="'$(SharedFrameworkLayoutDir)' == ''">$(InstallerSourceIntermediateOutputDir)sharedFxLayout/</SharedFrameworkLayoutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(IsFrameworkPackage)' == 'true'">
overrides that shouldn't be applied to other projects.
-->
<Import Project="framework.dependency.targets" Condition="'$(MSBuildProjectExtension)' == '.depproj'" />
- <Import Project="framework.packaging.targets" Condition="'$(IsFrameworkPackage)' == 'true'" />
+ <Import Project="framework.packaging.targets" Condition="'$(MSBuildProjectExtension)' == '.pkgproj'" />
+
+ <Import Project="installer.targets" />
+
+ <!-- Required by Common.Targets but not used by packaging projects. -->
+ <Target Name="CreateManifestResourceNames" />
+ <Target Name="CoreCompile" />
<!--
Set up properties for installer file. These depend on properties defined in the project file.
(Unlike properties set up in packaging-tools.props, which shouldn't.)
-->
- <Target Name="GetInstallerProperties">
+ <Target Name="GetInstallerProperties"
+ DependsOnTargets="
+ GetInstallerBrandingNames;
+ GetProductVersions">
<!-- Detect framework pack suffix and apply defaults. -->
<PropertyGroup Condition="'$(FrameworkPackType)' == 'targeting'">
<InstallerName>$(ShortFrameworkName)-targeting-pack</InstallerName>
<GenerateMSI>false</GenerateMSI>
</PropertyGroup>
+ <!-- Non-framework pkgproj shouldn't build MSIs. -->
+ <PropertyGroup Condition="'$(FrameworkPackType)' == '' and '$(MSBuildProjectExtension)' == '.pkgproj'">
+ <GenerateMSI>false</GenerateMSI>
+ </PropertyGroup>
+
<PropertyGroup Condition="'$(GenerateSharedFramework)' == 'true'">
<InstallerName>$(ShortFrameworkName)-runtime</InstallerName>
<WixProductMoniker>$(SharedFrameworkBrandName)</WixProductMoniker>
+++ /dev/null
-<Project>
-
- <!--
- This Directory.Build.props prevents the SDK from skipping down to the root
- Directory.Build.props, following the Directory.Build.props chain instead.
-
- Specifically, gets LibPrefix, LibSuffix, etc.
- -->
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
-
-</Project>
</Target>
<!-- Set up information to pass to WiX, depending on the type of installer being created. -->
- <Target Name="GetWixBuildConfiguration" DependsOnTargets="GetInstallerProperties">
+ <Target Name="GetWixBuildConfiguration"
+ DependsOnTargets="
+ AcquireWix;
+ GetInstallerProperties">
<ItemGroup Condition="'$(FrameworkPackType)' != ''">
<DirectoryToHarvest
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\Directory.Build.props" />
+<Project>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
<PropertyGroup>
<PackagePlatform>AnyCPU</PackagePlatform>
- <IntermediateOutputPath Condition="'$(IntermediateOutputPath)' == ''">obj/$(Configuration)/</IntermediateOutputPath>
- <IntermediateOutputPath Condition="'$(NuGetRuntimeIdentifier)' != ''">$(IntermediateOutputPath)$(NuGetRuntimeIdentifier)/</IntermediateOutputPath>
-
+
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<!-- This property must be set to the same value as $(PackageOutputPath) for the nuspecs and nupkgs to be binplaced to the intended location. -->
<OutputPath>$(PackageOutputPath)</OutputPath>
<PackProjectDependencies>true</PackProjectDependencies>
- <RestorePackages>true</RestorePackages>
- <PrereleaseResolveNuGetPackages>true</PrereleaseResolveNuGetPackages>
+ <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
+
+ <!-- Prevent unintended Microsoft.NETCore.Platforms package downgrade. -->
+ <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
+ <ImportNuGetBuildTasksPackTargetsFromSdk>false</ImportNuGetBuildTasksPackTargetsFromSdk>
+
+ <!-- Tell NuGet where the assets file is. I think the intermediate output path got more complex with Arcade. -->
+ <RestoreOutputPath>$(BaseIntermediateOutputPath)</RestoreOutputPath>
+ <ProjectAssetsFile>$(RestoreOutputPath)\project.assets.json</ProjectAssetsFile>
+
+ <RestoreAllBuildRids>true</RestoreAllBuildRids>
</PropertyGroup>
+ <!-- Most packages need the host to be built first. -->
+ <ItemGroup Condition="'$(DisableOrderDependencies)' != 'true'">
+ <ProjectReference Include="$(SourceDir)corehost\build.proj" />
+ </ItemGroup>
+
<!-- In *.builds projects, the current phase's name is the same as the project name. -->
<PropertyGroup>
<BuildPhase>$(MSBuildProjectName)</BuildPhase>
</PropertyGroup>
<Choose>
- <When Condition="$(PackageTargetRuntime.StartsWith('win'))">
+ <When Condition="$(PackageTargetRid.StartsWith('win'))">
<PropertyGroup>
<ApplicationFileExtension>.exe</ApplicationFileExtension>
<LibraryFilePrefix></LibraryFilePrefix>
<SymbolFileExtension>.pdb</SymbolFileExtension>
</PropertyGroup>
</When>
- <When Condition="$(PackageTargetRuntime.StartsWith('osx'))">
+ <When Condition="$(PackageTargetRid.StartsWith('osx'))">
<PropertyGroup>
<ApplicationFileExtension></ApplicationFileExtension>
<LibraryFilePrefix>lib</LibraryFilePrefix>
<NuGetTargetMoniker>$(NETCoreAppFrameworkMoniker)</NuGetTargetMoniker>
<NuGetTargetMonikerShort>$(NETCoreAppFramework)</NuGetTargetMonikerShort>
<PackageTargetFramework>$(NETCoreAppFramework)</PackageTargetFramework>
- <CrossGenOutputPath>$(CrossGenRootPath)/$(MSBuildProjectName)/$(NuGetRuntimeIdentifier)</CrossGenOutputPath>
+ <CrossGenOutputPath>$(CrossGenRootPath)$(MSBuildProjectName)\</CrossGenOutputPath>
<ContainsPackageReferences>true</ContainsPackageReferences>
- <!-- Disable restore normally: this is handled by ParallelSafeRestore. -->
- <RestorePackages>false</RestorePackages>
<RidSpecificAssets Condition="'$(NuGetRuntimeIdentifier)' != ''">true</RidSpecificAssets>
- <IntermediateOutputPath>$(IntermediateOutputPath)$(NuGetRuntimeIdentifier)</IntermediateOutputPath>
- <RestoreOutputPath>$(IntermediateOutputPath)</RestoreOutputPath>
- <AdditionalRestoreArgs>/p:HasRuntimePackages=false /p:IntermediateOutputPath=$(IntermediateOutputPath) /bl:$(IntermediateOutputPath)/dotnet-restore.binlog</AdditionalRestoreArgs>
<CrossGenSymbolsOutputPath>$(PackageSymbolsBinDir)/$(MSBuildProjectName)</CrossGenSymbolsOutputPath>
</PropertyGroup>
+ <PropertyGroup>
+ <TargetFramework Condition="'$(TargetFramework)' == ''">$(PackageTargetFramework)</TargetFramework>
+ <TargetFramework Condition="'$(TargetFramework)' == ''">$(NETCoreAppFramework)</TargetFramework>
+ </PropertyGroup>
+
<!-- Add required legal files to packages -->
<ItemGroup Condition="'$(MSBuildProjectExtension)' == '.pkgproj'">
<File Condition="Exists('$(PackageLicenseFile)')"
<ExcludeFromPlatformManifest>true</ExcludeFromPlatformManifest>
</BuildRID>
<BuildRID Include="@(_buildingOnRID)"/>
+
+ <RestoreBuildRID Include="@(BuildRID)" Exclude="@(UnofficialBuildRID)" />
</ItemGroup>
<PropertyGroup>
AdditionalProperties="%(AdditionalProperties);BaseId=%(BaseId);IdPrefix=" />
</ItemGroup>
- <ItemGroup Condition="'$(PackageTargetRuntime)' == '' and '$(HasRuntimePackages)' != 'false'">
- <ProjectReference Include="@(RuntimeProject)" />
- </ItemGroup>
-
+ <PropertyGroup>
+ <!-- During NuGet restore, grab assets for all applicable RIDs. -->
+ <RuntimeIdentifiers Condition="'$(RestoreAllBuildRids)' == 'true'">@(RestoreBuildRID)</RuntimeIdentifiers>
+ <!-- When resolving assets to pack, use the target runtime (if any). -->
+ <RuntimeIdentifier>$(PackageRID)</RuntimeIdentifier>
+ </PropertyGroup>
+
</Project>
\ No newline at end of file
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="..\Directory.Build.targets" />
+<Project>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.targets))\Directory.Build.targets" />
<Import Project="$(PackagingToolsDir)packaging-tools.targets" />
- <UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
- <UsingTask TaskName="GenerateFileVersionProps" AssemblyFile="$(LocalBuildToolsTaskDir)core-setup.tasks.dll"/>
+ <UsingTask TaskName="CreateFrameworkListFile" AssemblyFile="$(LocalBuildToolsTaskFile)"/>
+ <UsingTask TaskName="GenerateFileVersionProps" AssemblyFile="$(LocalBuildToolsTaskFile)"/>
<PropertyGroup>
<!--
</PropertyGroup>
<!--
- Remove duplicate files returned by PrereleaseResolveNuGetPackageAssets. The resolve task
- performs extra detection to pick up a PDB file for any file listed in the assets file. This
- causes duplicates if the assets file lists PDBs. If foo.dll and foo.pdb exist in the package and
- both are listed in the assets file, the task finds:
+ For any Dependency items with a VersionProp, set it to the property by that name given by the
+ version generation target.
+ -->
+ <Target Name="SetCustomPackageDependencyVersions"
+ BeforeTargets="GetPackageDependencies"
+ DependsOnTargets="GetProductVersions">
+ <ItemGroup>
+ <Dependency Version="$(%(Dependency.VersionProp))" Condition="'%(Dependency.VersionProp)' != ''" />
+ </ItemGroup>
+ </Target>
+
+ <!--
+ If the project is configured to use a shipped package version, set it. Use a target because we
+ need the versions from GetProductVersions.
+ -->
+ <Target Name="SetSpecificPackageVersion"
+ Condition="'$(VersionProp)' != ''"
+ BeforeTargets="GenerateNuSpec"
+ DependsOnTargets="GetProductVersions">
+ <!-- Use item metadata: $(%(foo)) works, $($(foo)) doesn't. -->
+ <ItemGroup>
+ <VersionPropItem Include="$(VersionProp)" />
+ </ItemGroup>
+ <PropertyGroup>
+ <Version>$(%(VersionPropItem.Identity))</Version>
+ </PropertyGroup>
+ </Target>
+
+ <!--
+ Remove duplicate files returned by restore. The resolve task performs extra detection to pick up
+ a PDB file for any file listed in the assets file. This causes duplicates if the assets file
+ lists PDBs. If foo.dll and foo.pdb exist in the package and both are listed in the assets file,
+ the task finds:
foo.dll
foo.pdb (based on foo.dll entry)
The duplicates cause package validation failure and must be filtered out.
-->
- <Target Name="RemoveDuplicateResolvedNuGetPackageAssets"
- AfterTargets="ResolveNuGetPackages">
+ <Target Name="RemoveDuplicateResolvedNuGetPackageAssets">
<RemoveDuplicates Inputs="@(ReferenceCopyLocalPaths)">
<Output TaskParameter="Filtered" ItemName="FilteredReferenceCopyLocalPaths"/>
</RemoveDuplicates>
</Target>
<!--
- Get Project items: build the project, and build runtime packages if necessary. All projects in
- this directory are ProjectProviders.
+ Create RuntimeDependencies just before they're needed. Use MSBuild to get their identities, like
+ GetPkgProjPackageDependencies: this finds package id and version without any guesswork.
-->
- <Target Name="GetProjectsToBuild" Returns="@(Project)">
- <ItemGroup>
- <!-- The pkg and src builds both build these projects. Add them to both phases. -->
- <PkgSrcProject Include="@(RuntimeProject)" Condition="'$(BuildRuntimePackages)' == 'true'" />
- <PkgSrcProject Include="@(RidSpecificPackProject)" Condition="'$(BuildRidSpecificPacks)' == 'true'" />
- <PkgSrcProject Include="$(MSBuildProjectFullPath)" Condition="'$(BuildLineupPackage)' == 'true'"/>
-
- <Project Include="@(PkgSrcProject)" Phase="pkg" />
- <Project Include="@(PkgSrcProject)" Phase="src" />
-
- <!--
- Create framework pack non-nuget packages/installers. Similar to the runtime package, we only
- make one Debian or RPM package for all distros of that type.
- -->
- <Project
- Include="$(MSBuildProjectFullPath)"
- Phase="installer"
- Condition="
- '$(FrameworkPackType)' != '' AND
- '$(BuildDistroIndependentInstallers)' == 'true'" />
- </ItemGroup>
+ <Target Name="CreateRuntimeDependencyItems"
+ BeforeTargets="DetermineRuntimeDependencies"
+ Condition="'$(PackageTargetRuntime)' == '' and '$(HasRuntimePackages)' != 'false'">
+ <MSBuild
+ Targets="GetPackageIdentity"
+ BuildInParallel="$(BuildInParallel)"
+ Projects="@(RuntimeProject -> WithMetadataValue('Extension', '.pkgproj'))">
+ <Output TaskParameter="TargetOutputs" ItemName="_runtimeDependencyIdentity" />
+ </MSBuild>
- <!-- Create shared framework and its installers. -->
- <ItemGroup Condition="'$(GenerateSharedFramework)' == 'true' AND '$(BuildDistroIndependentInstallers)' == 'true'">
- <Project Include="$(MSBuildProjectFullPath)" Phase="sharedfx" />
- <!--
- Currently any pkgproj is assumed to only build one type of installer, so there is no
- distinction between this Project and a targeting pack installer Project. Some
- AdditionalProperties may need to be added if this assumption doesn't hold up.
- -->
- <Project Include="$(MSBuildProjectFullPath)" Phase="installer" />
+ <ItemGroup>
+ <RuntimeDependency Include="@(_runtimeDependencyIdentity)" />
</ItemGroup>
</Target>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Version>$(AppHostVersion)</Version>
+ <VersionProp>AppHostVersion</VersionProp>
</PropertyGroup>
<Import Project="$(MSBuildProjectName).props" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
-</Project>
\ No newline at end of file
+</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Version>$(HostVersion)</Version>
- </PropertyGroup>
+ <VersionProp>HostVersion</VersionProp>
+ </PropertyGroup>
<Import Condition="'$(PackageTargetRuntime)' != ''" Project="$(MSBuildThisFileDirectory)runtime.$(OSGroup).$(MSBuildProjectName).props" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Version>$(HostPolicyVersion)</Version>
- </PropertyGroup>
+ <VersionProp>HostPolicyVersion</VersionProp>
+ </PropertyGroup>
<ItemGroup>
- <Dependency Include="Microsoft.NETCore.DotNetHostResolver">
- <Version>$(HostResolverVersion)</Version>
- </Dependency>
- </ItemGroup>
+ <Dependency Include="Microsoft.NETCore.DotNetHostResolver" VersionProp="HostResolverVersion" />
+ </ItemGroup>
<Import Project="$(MSBuildProjectName).props" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
-</Project>
\ No newline at end of file
+</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
\ No newline at end of file
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
\ No newline at end of file
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
\ No newline at end of file
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <Version>$(HostResolverVersion)</Version>
- </PropertyGroup>
+ <VersionProp>HostResolverVersion</VersionProp>
+ </PropertyGroup>
<ItemGroup>
- <Dependency Include="Microsoft.NETCore.DotNetAppHost">
- <Version>$(AppHostVersion)</Version>
- </Dependency>
+ <Dependency Include="Microsoft.NETCore.DotNetAppHost" VersionProp="AppHostVersion" />
</ItemGroup>
-
+
<Import Project="$(MSBuildProjectName).props" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
<TargetPath>runtimes/$(PackageTargetRuntime)/native</TargetPath>
<IsNative>true</IsNative>
</File>
- <File Include="$(VersionTxtFile)" />
</ItemGroup>
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
<PropertyGroup>
<IsFrameworkPackage>true</IsFrameworkPackage>
<ShortFrameworkName>dotnet</ShortFrameworkName>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<!--
Create AppHost Pack based on legacy DotNetAppHost package. This can be collapsed once the legacy
-->
<Import Project="..\..\Microsoft.NETCore.DotNetAppHost\Microsoft.NETCore.DotNetAppHost.props" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>
\ No newline at end of file
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
+<Project Sdk="Microsoft.NET.Sdk">
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<!--
Include HostPolicy and HostResolver based on legacy packages. This can be collapsed once the
<Import Project="..\..\Microsoft.NETCore.DotNetHostPolicy\Microsoft.NETCore.DotNetHostPolicy.props" />
<Import Project="..\..\Microsoft.NETCore.DotNetHostResolver\Microsoft.NETCore.DotNetHostResolver.props" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
<PropertyGroup>
<!-- Identity / Reference package content -->
<ItemGroup Condition="'$(PackageTargetRuntime)' == ''">
<!-- reference RID specific packages to generate lineup -->
- <ProjectReference Include="@(RuntimeProject)" />
+ <LineupProjectReference Include="@(RuntimeProject)" />
<!-- references the host packages -->
- <Dependency Include="Microsoft.NETCore.DotNetHostPolicy">
- <Version>$(HostPolicyVersion)</Version>
- <TargetFramework>$(NETCoreAppFramework)</TargetFramework>
- </Dependency>
+ <Dependency
+ Include="Microsoft.NETCore.DotNetHostPolicy"
+ VersionProp="HostPolicyVersion"
+ TargetFramework="$(NETCoreAppFramework)" />
</ItemGroup>
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
<PropertyGroup>
<!-- Make this Internal package's runtime.json point to the non-Internal runtime packages. -->
<RuntimeProjectFile>$(MSBuildThisFileDirectory)Microsoft.NETCore.App.pkgproj</RuntimeProjectFile>
</PropertyGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+ <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<!--
<BuildRuntimePackages>false</BuildRuntimePackages>
</PropertyGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
+ <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!--
<FrameworkListTargetPath>data/</FrameworkListTargetPath>
</PropertyGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
+
<PropertyGroup>
<ExcludeDepprojReference>true</ExcludeDepprojReference>
</PropertyGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+ <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<!-- Exclude runtime.json from the package. -->
<ExcludeLineupReference>true</ExcludeLineupReference>
<BuildRuntimePackages>false</BuildRuntimePackages>
-
- <GenerateSharedFramework>true</GenerateSharedFramework>
- <GenerateRuntimeGraph>true</GenerateRuntimeGraph>
-
- <!--
- Make sure the installer file is generated with the name from /Directory.Build.props. This allows the
- existing infra to bundle it without any changes.
- -->
- <InstallerFile>$(SharedFrameworkInstallerFile)</InstallerFile>
-
- <!-- Lay out the sfx in the legacy location for old packaging to keep working for now. -->
- <SharedFrameworkLayoutDir>$(SharedFrameworkPublishDir)</SharedFrameworkLayoutDir>
-
- <!-- These components are installed by the root shared framework, but not others. -->
- <IncludeWerRelatedKeys>true</IncludeWerRelatedKeys>
- <IncludeBreadcrumbStoreFolder>true</IncludeBreadcrumbStoreFolder>
</PropertyGroup>
-
+
<ItemGroup>
<Dependency Include="Microsoft.NETCore.Platforms" Version="$(MicrosoftNETCorePlatformsPackageVersion)" />
</ItemGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
-
- <!--
- Use the internal package to generate the shared framework. Allows the shared framework to
- continue to have the correct name without other workarounds.
- -->
- <Target Name="GetSharedFrameworkPackageReferences"
- Returns="@(SharedFrameworkPackageReference)">
- <ItemGroup>
- <SharedFrameworkPackageReference Include="Microsoft.NETCore.App.Internal" Version="$(Version)" />
- <SharedFrameworkPackageReference Include="Microsoft.NETCore.DotNetHost" Version="$(HostVersion)" />
- </ItemGroup>
- </Target>
+ <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
+
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<FrameworkPackageName>Microsoft.NETCore.App</FrameworkPackageName>
Condition="'$(NuGetRuntimeIdentifier)' != ''"
DependsOnTargets="GetCorePackagePaths" />
- <Target Name="GetDependencyVersionFiles" DependsOnTargets="GetPackagePaths;ResolveNuGetPackages">
+ <Target Name="GetDependencyVersionFiles" DependsOnTargets="ResolveReferences;GetPackagePaths">
<ItemGroup>
<_coreFxVersionFile
Include="$(PackagesDir)$([System.String]::new('%(Reference.NuGetPackageId)').ToLowerInvariant())/%(Reference.NuGetPackageVersion)/version.txt"
</ItemGroup>
</Target>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
<PropertyGroup>
<RIDPropsFile>$(MSBuildThisFileDirectory)netstandardRIDs.props</RIDPropsFile>
</PropertyGroup>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
<PropertyGroup>
<IsFrameworkPackage>true</IsFrameworkPackage>
<ShortFrameworkName>netstandard</ShortFrameworkName>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<!-- .NET Standard has no shared framework, so there is no data for a platform manifest. -->
<PlatformManifestTargetPath />
</PropertyGroup>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<NETStandardTargetFramework>netstandard2.1</NETStandardTargetFramework>
</ItemGroup>
</Target>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
<PropertyGroup>
+ <ShortFrameworkName>windowsdesktop</ShortFrameworkName>
+ <ProductBrandPrefix>Microsoft Windows Desktop</ProductBrandPrefix>
+
<RIDPropsFile>$(MSBuildThisFileDirectory)windowsdesktopRIDs.props</RIDPropsFile>
</PropertyGroup>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+<Project>
<PropertyGroup>
<IsFrameworkPackage>true</IsFrameworkPackage>
- <ShortFrameworkName>windowsdesktop</ShortFrameworkName>
- <ProductBrandPrefix>Microsoft Windows Desktop</ProductBrandPrefix>
</PropertyGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory).., Directory.Build.props))\Directory.Build.props" />
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
+<Project Sdk="Microsoft.NET.Sdk">
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
+<Project Sdk="Microsoft.NET.Sdk">
</Project>
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project>
+ <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
<PropertyGroup>
<PreventImplementationReference Condition="'$(PackageTargetRuntime)' != ''">true</PreventImplementationReference>
<FrameworkListTargetPath>data/</FrameworkListTargetPath>
- <GenerateSharedFramework>true</GenerateSharedFramework>
- <GenerateNetCoreAppRuntimeConfig>true</GenerateNetCoreAppRuntimeConfig>
-
- <GenerateCompressedArchive>true</GenerateCompressedArchive>
-
<TargetFrameworkName>netcoreapp</TargetFrameworkName>
<TargetFrameworkVersion>3.0</TargetFrameworkVersion>
<TargetFramework>$(TargetFrameworkName)$(TargetFrameworkVersion)</TargetFramework>
<IgnoredReference Condition="'$(PackageTargetRuntime)' == ''" Include="DirectWriteForwarder" />
</ItemGroup>
+ <!--
+ Wait for Microsoft.NETCore.App pkgprojs to be done with netcoreapp.depproj, but don't take any
+ dependency on the assets. ResolveAssemblyReference tasks running in parallel may try to write to
+ netcoreapp.depprojAssemblyReference.cache, hit the other's lock, and fail.
+ -->
+ <ItemGroup>
+ <WaitOnlyProjectReference Include="..\..\netcoreapp\pkg\legacy\*.pkgproj" />
+ </ItemGroup>
+
<Target Name="GetNETCoreAppIgnoredReference" BeforeTargets="VerifyClosure">
<MSBuild
Projects="../../netcoreapp/src/netcoreapp.depproj"
Properties="Configuration=netcoreapp"
Targets="GetReferenceFilenames">
- <Output TaskParameter="TargetOutputs" ItemName="IgnoredReference" />
+ <Output TaskParameter="TargetOutputs" ItemName="IgnoredReference" />
</MSBuild>
</Target>
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
+ <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
<!-- Don't validate this package as it doesn't actually represent a framework. -->
<Target Name="ValidateFrameworkPackage" />
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="Build">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.props))\Directory.Build.props" />
+<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Microsoft.DotNet.Wpf.DncEng" Version="$(MicrosoftDotNetWpfDncEngPackageVersion)" />
-->
<Target Name="GetDependencyVersionFiles" />
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
</Project>