Update packaging script to build reference assembly targeting netcoreapp2.1 and use actual .csproj files (#8729)

# Conflicts:
#	tools/packaging/packaging.psm1
#	tools/packaging/packaging.strings.psd1
This commit is contained in:
Dongbo Wang
2019-02-01 15:12:19 -08:00
committed by Travis Plunk
parent 9bb19f3c9e
commit f10279ef1f
6 changed files with 37 additions and 18 deletions
+1 -1
View File
@@ -1911,7 +1911,7 @@ function New-ReferenceAssembly
{
Push-Location $projectFolder
$sourceProjectRoot = Join-Path $PSScriptRoot "projects/reference/$assemblyName"
$sourceProjectRoot = Join-Path $PSScriptRoot 'projects/reference'
$sourceProjectFile = Join-Path $sourceProjectRoot "$assemblyName.csproj"
Copy-Item -Path $sourceProjectFile -Destination "$projectFolder/$assemblyName.csproj" -Force
+1 -16
View File
@@ -132,22 +132,7 @@ NuspecTemplate = @'
</metadata>
</package>
'@
RefAssemblyCsProj = @'
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>{0}</Version>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>{1}</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0-alpha08" />
<PackageReference Include="System.Security.AccessControl" Version="4.4.1" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.4.1" />
</ItemGroup>
</Project>
'@
NuGetConfigFile = @'
<configuration>
<packageSources>
@@ -7,7 +7,7 @@
<authors>PowerShell</authors>
<owners>PowerShell</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://github.com/PowerShell/PowerShell/blob/master/LICENSE.txt</licenseUrl>
<license type="expression">MIT</license>
<projectUrl>https://github.com/powershell/powershell</projectUrl>
<iconUrl>https://github.com/PowerShell/PowerShell/blob/master/assets/Powershell_64.png</iconUrl>
<description>This package contains the PowerShell Core for $runtime$.</description>
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<Version>$(RefAsmVersion)</Version>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(SnkFile)</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<LangVersion>Latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System.Management.Automation">
<HintPath>$(SmaRefFile)</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="System.Security.AccessControl" Version="4.5.0" />
</ItemGroup>
</Project>
@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<Version>$(RefAsmVersion)</Version>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(SnkFile)</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<LangVersion>Latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0" />
<PackageReference Include="System.Security.AccessControl" Version="4.5.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="4.5.1" />
</ItemGroup>
</Project>