From acc80be676e740799b265b8ae21b1e89c4a7b9aa Mon Sep 17 00:00:00 2001 From: iSazonov Date: Wed, 3 May 2017 15:28:39 +0300 Subject: [PATCH 1/5] $PSVersionTable.GitCommitId based on generated constant Generate C# file with a constant containing current version GitCommitId. Correct test for GitCommitId. --- build.psm1 | 32 +++++++++++++++---- .../engine/PSVersionInfo.cs | 18 ++++------- test/powershell/Host/PSVersionTable.Tests.ps1 | 2 +- 3 files changed, 32 insertions(+), 20 deletions(-) diff --git a/build.psm1 b/build.psm1 index 364fea38c58..f1a85f94f17 100644 --- a/build.psm1 +++ b/build.psm1 @@ -165,13 +165,31 @@ function Start-PSBuild { } } - # save git commit id to file for PowerShell to include in PSVersionTable - $gitCommitId = $ReleaseTag - if (-not $gitCommitId) { - # if ReleaseTag is not specified, use 'git describe' to get the commit id - $gitCommitId = git --git-dir="$PSScriptRoot/.git" describe --dirty --abbrev=60 + # save Git description to file for PowerShell to include in PSVersionTable + $powershellVersion = git --git-dir="$PSScriptRoot/.git" describe --dirty --abbrev=60 + $powershellVersion > "$PSScriptRoot/powershell.version" + + # Generate version constant for $PSVersionTable + $template = @" +//------------------------------------------------------------------------------ +// +// This code was generated by Build.psm1\Start-PSBuild. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace System.Management.Automation +{ + internal class GitCommitInfo + { + internal const string s_GitCommitInfo = "$powershellVersion"; } - $gitCommitId > "$psscriptroot/powershell.version" +} +"@ + $null = New-Item -Path "$PSScriptRoot\src\System.Management.Automation" -Name "gen" -ItemType Directory -ErrorAction SilentlyContinue + Set-Content -Path "$PSScriptRoot\src\System.Management.Automation\gen\PSVersionInfo.generated.cs" -Value $template # create the telemetry flag file $null = new-item -force -type file "$psscriptroot/DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY" @@ -196,7 +214,7 @@ function Start-PSBuild { Write-Warning @" The currently installed .NET Command Line Tools is not the required version. -Installed version: $dotnetCLIIntalledVersion +Installed version: $dotnetCLIIntalledVersion Required version: $dotnetCLIRequiredVersion Fix steps: diff --git a/src/System.Management.Automation/engine/PSVersionInfo.cs b/src/System.Management.Automation/engine/PSVersionInfo.cs index 45a4d17ebe6..84125de88c7 100644 --- a/src/System.Management.Automation/engine/PSVersionInfo.cs +++ b/src/System.Management.Automation/engine/PSVersionInfo.cs @@ -63,7 +63,8 @@ static PSVersionInfo() s_psVersionTable[PSVersionInfo.PSVersionName] = s_psV6Version; s_psVersionTable[PSVersionInfo.PSEditionName] = PSEditionValue; - s_psVersionTable[PSGitCommitIdName] = GetCommitInfo(); + s_psVersionTable[PSBuildVersionName] = GetBuildVersion(); + s_psVersionTable[PSGitCommitIdName] = GitCommitInfo.s_GitCommitInfo; s_psVersionTable[PSCompatibleVersionsName] = new Version[] { s_psV1Version, s_psV2Version, s_psV3Version, s_psV4Version, s_psV5Version, s_psV51Version, s_psV6Version }; s_psVersionTable[PSVersionInfo.SerializationVersionName] = new Version(InternalSerializer.DefaultVersion); s_psVersionTable[PSVersionInfo.PSRemotingProtocolVersionName] = RemotingConstants.ProtocolVersion; @@ -89,18 +90,11 @@ internal static Hashtable GetPSVersionTableForDownLevel() return result; } - // Get the commit id from the powershell.version file. If the powershell.version file doesn't exist, use the string "N/A" - internal static string GetCommitInfo() + internal static Version GetBuildVersion() { - try - { - string assemblyPath = IO.Path.GetDirectoryName(typeof(PSVersionInfo).GetTypeInfo().Assembly.Location); - return (IO.File.ReadAllLines(IO.Path.Combine(assemblyPath, "powershell.version"))[0]); - } - catch (Exception e) - { - return e.Message; - } + string assemblyPath = typeof(PSVersionInfo).GetTypeInfo().Assembly.Location; + string buildVersion = FileVersionInfo.GetVersionInfo(assemblyPath).FileVersion; + return new Version(buildVersion); } #region Private helper methods diff --git a/test/powershell/Host/PSVersionTable.Tests.ps1 b/test/powershell/Host/PSVersionTable.Tests.ps1 index a9513d4f518..9d5fa17e346 100644 --- a/test/powershell/Host/PSVersionTable.Tests.ps1 +++ b/test/powershell/Host/PSVersionTable.Tests.ps1 @@ -16,7 +16,7 @@ Describe "PSVersionTable" -Tags "CI" { } It "GitCommitId property should not contain an error" { - $PSVersionTable.GitCommitId | Should not match "powershell.version" + $PSVersionTable.GitCommitId | Should BeExactly $(Get-Content "$PsHome\powershell.version") } It "Should have the correct platform info" { From 90e090f4881912ebffe0584f27b8ccfe67b32923 Mon Sep 17 00:00:00 2001 From: iSazonov Date: Fri, 5 May 2017 15:54:28 +0300 Subject: [PATCH 2/5] Remove "powershell.version" file + Format GitCommitId version string --- build.psm1 | 13 ++++++++++--- src/powershell-unix/powershell-unix.csproj | 2 +- src/powershell-win-core/powershell-win-core.csproj | 2 +- test/powershell/Host/PSVersionTable.Tests.ps1 | 4 +++- 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/build.psm1 b/build.psm1 index f1a85f94f17..b8d11706b21 100644 --- a/build.psm1 +++ b/build.psm1 @@ -166,8 +166,14 @@ function Start-PSBuild { } # save Git description to file for PowerShell to include in PSVersionTable - $powershellVersion = git --git-dir="$PSScriptRoot/.git" describe --dirty --abbrev=60 - $powershellVersion > "$PSScriptRoot/powershell.version" + $powershellVersion = git --git-dir="$PSScriptRoot/.git" describe --dirty --abbrev=60 --long + $matchVersion = ([regex]::Match($powershellVersion, "^(v.+)-(\d\d)-g(.+)-.+")).Groups.Value + $formattedVersion = "Version: $($matchVersion[1])" + if ($($matchVersion[1]) -ne "0") { + $formattedVersion += " Additional commits: $($matchVersion[2])" + } + $formattedVersion += " Commit Hash: $($matchVersion[3])" + $formattedVersion > "$PSScriptRoot/test/powershell/Host/assets/powershell.version" # Generate version constant for $PSVersionTable $template = @" @@ -184,10 +190,11 @@ namespace System.Management.Automation { internal class GitCommitInfo { - internal const string s_GitCommitInfo = "$powershellVersion"; + internal const string s_GitCommitInfo = "$formattedVersion"; } } "@ + $null = New-Item -Path "$PSScriptRoot\src\System.Management.Automation" -Name "gen" -ItemType Directory -ErrorAction SilentlyContinue Set-Content -Path "$PSScriptRoot\src\System.Management.Automation\gen\PSVersionInfo.generated.cs" -Value $template diff --git a/src/powershell-unix/powershell-unix.csproj b/src/powershell-unix/powershell-unix.csproj index 5014a55cd2d..74366ad7437 100644 --- a/src/powershell-unix/powershell-unix.csproj +++ b/src/powershell-unix/powershell-unix.csproj @@ -16,7 +16,7 @@ PreserveNewest PreserveNewest - + PreserveNewest PreserveNewest diff --git a/src/powershell-win-core/powershell-win-core.csproj b/src/powershell-win-core/powershell-win-core.csproj index f468542f464..a8072664cdf 100644 --- a/src/powershell-win-core/powershell-win-core.csproj +++ b/src/powershell-win-core/powershell-win-core.csproj @@ -20,7 +20,7 @@ PreserveNewest PreserveNewest - + PreserveNewest PreserveNewest diff --git a/test/powershell/Host/PSVersionTable.Tests.ps1 b/test/powershell/Host/PSVersionTable.Tests.ps1 index 9d5fa17e346..f6e84388b6e 100644 --- a/test/powershell/Host/PSVersionTable.Tests.ps1 +++ b/test/powershell/Host/PSVersionTable.Tests.ps1 @@ -16,7 +16,9 @@ Describe "PSVersionTable" -Tags "CI" { } It "GitCommitId property should not contain an error" { - $PSVersionTable.GitCommitId | Should BeExactly $(Get-Content "$PsHome\powershell.version") + $powershellVersionFile = Join-Path -Path $PSScriptRoot -ChildPath "assets/powershell.version" + $powershellVersion = Get-Content $powershellVersionFile + $PSVersionTable.GitCommitId | Should BeExactly $powershellVersion } It "Should have the correct platform info" { From aaf27a975a205c63c4f1f0620189547f099d8c2a Mon Sep 17 00:00:00 2001 From: iSazonov Date: Wed, 10 May 2017 14:59:27 +0300 Subject: [PATCH 3/5] Generate PSVersion --- build.psm1 | 6 ++++-- src/System.Management.Automation/engine/PSVersionInfo.cs | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build.psm1 b/build.psm1 index b8d11706b21..f7dd35dbf43 100644 --- a/build.psm1 +++ b/build.psm1 @@ -166,8 +166,9 @@ function Start-PSBuild { } # save Git description to file for PowerShell to include in PSVersionTable - $powershellVersion = git --git-dir="$PSScriptRoot/.git" describe --dirty --abbrev=60 --long - $matchVersion = ([regex]::Match($powershellVersion, "^(v.+)-(\d\d)-g(.+)-.+")).Groups.Value + $powershellVersion = git --git-dir="$PSScriptRoot/.git" describe --abbrev=60 --long + $matchVersion = ([regex]::Match($powershellVersion, "^(v.+)-(\d+)-g(.+)")).Groups.Value + $null, $ps6MajorVersion, $ps6MinorVersion, $ps6PatchVersion, $ps6LabelVersion = ([regex]::Match($matchVersion[1], "^v(\d+).(\d+).(\d+)-(.+)")).Groups.Value $formattedVersion = "Version: $($matchVersion[1])" if ($($matchVersion[1]) -ne "0") { $formattedVersion += " Additional commits: $($matchVersion[2])" @@ -191,6 +192,7 @@ namespace System.Management.Automation internal class GitCommitInfo { internal const string s_GitCommitInfo = "$formattedVersion"; + internal static readonly SemanticVersion s_psV6Version = new SemanticVersion($ps6MajorVersion, $ps6MinorVersion, $ps6PatchVersion, "$ps6LabelVersion"); } } "@ diff --git a/src/System.Management.Automation/engine/PSVersionInfo.cs b/src/System.Management.Automation/engine/PSVersionInfo.cs index 84125de88c7..415afc15ef7 100644 --- a/src/System.Management.Automation/engine/PSVersionInfo.cs +++ b/src/System.Management.Automation/engine/PSVersionInfo.cs @@ -45,7 +45,7 @@ internal class PSVersionInfo private static Version s_psV4Version = new Version(4, 0); private static Version s_psV5Version = new Version(5, 0); private static Version s_psV51Version = new Version(5, 1, NTVerpVars.PRODUCTBUILD, NTVerpVars.PRODUCTBUILD_QFE); - private static SemanticVersion s_psV6Version = new SemanticVersion(6, 0, 0, "beta"); + private static SemanticVersion s_psV6Version = GitCommitInfo.s_psV6Version; /// /// A constant to track current PowerShell Edition From d46752bc96573ad27daa769f6aff2329c05e6a9e Mon Sep 17 00:00:00 2001 From: iSazonov Date: Thu, 11 May 2017 07:26:04 +0300 Subject: [PATCH 4/5] Remove 'powershell.version' from all files Fix Install-PowerShellRemoting.ps1 Fix test Fix build.psm1 --- .gitignore | 3 - .spelling | 1 - build.psm1 | 59 ++++++++++--------- .../Install-PowerShellRemoting.ps1 | 18 ++---- test/powershell/Host/PSVersionTable.Tests.ps1 | 14 +++-- 5 files changed, 45 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index befc0d7a24b..214e465ce5b 100644 --- a/.gitignore +++ b/.gitignore @@ -39,9 +39,6 @@ dotnet-uninstall-debian-packages.sh *.rpm *.pkg -# ignore the version file as it is generated at build time -powershell.version - # ignore the telemetry semaphore file DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY diff --git a/.spelling b/.spelling index 8c881de6717..174c887cab3 100644 --- a/.spelling +++ b/.spelling @@ -840,7 +840,6 @@ Coveralls.io. Coveralls.net csmacnz OpenCover.zip -powershell.version Start-CodeCoverageRun tests.zip v5.0 diff --git a/build.psm1 b/build.psm1 index f7dd35dbf43..610415ba0dd 100644 --- a/build.psm1 +++ b/build.psm1 @@ -150,34 +150,18 @@ function Start-PSBuild { Stop-Process -Verbose } - if ($Clean) { - log "Cleaning your working directory. You can also do it with 'git clean -fdX'" - Push-Location $PSScriptRoot - try { - git clean -fdX - # Extra cleaning is required to delete the CMake temporary files. - # These are not cleaned when using "X" and cause CMake to retain state, leading to - # mis-configured environment issues when switching between x86 and x64 compilation - # environments. - git clean -fdx .\src\powershell-native - } finally { - Pop-Location + # Generate version constant for $PSVersionTable + function Start-PowerShellVersionGen { + $powershellVersion = git --git-dir="$PSScriptRoot/.git" describe --abbrev=60 --long + $matchVersion = ([regex]::Match($powershellVersion, "^(v.+)-(\d+)-g(.+)")).Groups.Value + $null, $ps6MajorVersion, $ps6MinorVersion, $ps6PatchVersion, $ps6LabelVersion = ([regex]::Match($matchVersion[1], "^v(\d+).(\d+).(\d+)-(.+)")).Groups.Value + $formattedVersion = "Version: $($matchVersion[1])" + if ($($matchVersion[1]) -ne "0") { + $formattedVersion += " Additional commits: $($matchVersion[2])" } - } + $formattedVersion += " Commit Hash: $($matchVersion[3])" - # save Git description to file for PowerShell to include in PSVersionTable - $powershellVersion = git --git-dir="$PSScriptRoot/.git" describe --abbrev=60 --long - $matchVersion = ([regex]::Match($powershellVersion, "^(v.+)-(\d+)-g(.+)")).Groups.Value - $null, $ps6MajorVersion, $ps6MinorVersion, $ps6PatchVersion, $ps6LabelVersion = ([regex]::Match($matchVersion[1], "^v(\d+).(\d+).(\d+)-(.+)")).Groups.Value - $formattedVersion = "Version: $($matchVersion[1])" - if ($($matchVersion[1]) -ne "0") { - $formattedVersion += " Additional commits: $($matchVersion[2])" - } - $formattedVersion += " Commit Hash: $($matchVersion[3])" - $formattedVersion > "$PSScriptRoot/test/powershell/Host/assets/powershell.version" - - # Generate version constant for $PSVersionTable - $template = @" + $template = @" //------------------------------------------------------------------------------ // // This code was generated by Build.psm1\Start-PSBuild. @@ -197,8 +181,23 @@ namespace System.Management.Automation } "@ - $null = New-Item -Path "$PSScriptRoot\src\System.Management.Automation" -Name "gen" -ItemType Directory -ErrorAction SilentlyContinue - Set-Content -Path "$PSScriptRoot\src\System.Management.Automation\gen\PSVersionInfo.generated.cs" -Value $template + Set-Content -Path "$PSScriptRoot\src\System.Management.Automation\gen\PSVersionInfo.generated.cs" -Value $template + } + + if ($Clean) { + log "Cleaning your working directory. You can also do it with 'git clean -fdX'" + Push-Location $PSScriptRoot + try { + git clean -fdX + # Extra cleaning is required to delete the CMake temporary files. + # These are not cleaned when using "X" and cause CMake to retain state, leading to + # mis-configured environment issues when switching between x86 and x64 compilation + # environments. + git clean -fdx .\src\powershell-native + } finally { + Pop-Location + } + } # create the telemetry flag file $null = new-item -force -type file "$psscriptroot/DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY" @@ -329,6 +328,10 @@ Fix steps: Start-ResGen } + # Generate version constant for $PSVersionTable + # (Call after 'Start-ResGen'!) + Start-PowerShellVersionGen + # handle xaml files # Heuristic to resolve xaml on the fresh machine if ($FullCLR -and ($XamlGen -or -not (Test-Path "$PSScriptRoot/src/Microsoft.PowerShell.Activities/gen/*.g.cs"))) { diff --git a/src/powershell-native/Install-PowerShellRemoting.ps1 b/src/powershell-native/Install-PowerShellRemoting.ps1 index dffe2286942..3ed973395a4 100644 --- a/src/powershell-native/Install-PowerShellRemoting.ps1 +++ b/src/powershell-native/Install-PowerShellRemoting.ps1 @@ -20,7 +20,7 @@ param [parameter(ParameterSetName = "ByPath")] [ValidateNotNullOrEmpty()] [string] - $PowerShellVersion = "6.0.0-alpha.8" + $PowerShellVersion ) function Register-WinRmPlugin @@ -130,19 +130,9 @@ else { $targetPsHome = $PSHOME - # Parse the version string from the version file so that users do not have - # to enter it manually. - $targetPsVersionFilePath = Join-Path $targetPsHome "Powershell.Version" - $versionString = (Get-Content $targetPsVersionFilePath).Trim() - if($versionString.StartsWith("v")) - { - $versionString = $versionString.substring(1) - } - $index = $versionString.LastIndexOf(".") - $version = $versionString.Substring(0,$index) - $revision = $versionString.Substring($index).split("-") - $version= $version + $revision[0] - $targetPsVersion = $version + # Get the version string from PowerShell so that users do not have to enter it manually. + $powershell = Join-Path -Path $targetPsHome -ChildPath "powershell" + $targetPsVersion = & $powershell -c "$PSVersionTable.PSVersion.ToString()" Write-Verbose "Using PowerShell Version: $targetPsVersion" -Verbose } diff --git a/test/powershell/Host/PSVersionTable.Tests.ps1 b/test/powershell/Host/PSVersionTable.Tests.ps1 index f6e84388b6e..98ac2f7e5a9 100644 --- a/test/powershell/Host/PSVersionTable.Tests.ps1 +++ b/test/powershell/Host/PSVersionTable.Tests.ps1 @@ -15,10 +15,16 @@ Describe "PSVersionTable" -Tags "CI" { $PSVersionTable.ContainsKey("OS") | Should Be True } - It "GitCommitId property should not contain an error" { - $powershellVersionFile = Join-Path -Path $PSScriptRoot -ChildPath "assets/powershell.version" - $powershellVersion = Get-Content $powershellVersionFile - $PSVersionTable.GitCommitId | Should BeExactly $powershellVersion + + It "GitCommitId property" { + $PSVersionTable.GitCommitId | Should Not BeNullOrEmpty + $PSVersionTable.GitCommitId | Should BeOfType "System.String" + $PSVersionTable.GitCommitId | Should Match $PSVersionTable.PSVersion.ToString() + } + + It "PSVersion property" { + $PSVersionTable.PSVersion | Should BeOfType "System.Management.Automation.SemanticVersion" + $PSVersionTable.PSVersion.Major | Should Be 6 } It "Should have the correct platform info" { From 6ec07b9818198108d6898b32a8af72da59ff3ab6 Mon Sep 17 00:00:00 2001 From: iSazonov Date: Fri, 12 May 2017 19:34:32 +0300 Subject: [PATCH 5/5] Update assemblies versions by MSBuild --- build.psm1 | 16 +++++++++----- ...anagement.Infrastructure.CimCmdlets.csproj | 2 ++ ...oft.PowerShell.Commands.Diagnostics.csproj | 2 ++ ...soft.PowerShell.Commands.Management.csproj | 2 ++ ...crosoft.PowerShell.Commands.Utility.csproj | 2 ++ .../Microsoft.PowerShell.ConsoleHost.csproj | 2 ++ ...erShell.CoreCLR.AssemblyLoadContext.csproj | 2 ++ ...crosoft.PowerShell.CoreCLR.Eventing.csproj | 2 ++ .../Microsoft.PowerShell.LocalAccounts.csproj | 2 ++ .../Microsoft.PowerShell.SDK.csproj | 2 ++ .../Microsoft.PowerShell.Security.csproj | 2 ++ .../Microsoft.WSMan.Management.csproj | 2 ++ .../Microsoft.WSMan.Runtime.csproj | 2 ++ .../System.Management.Automation.csproj | 2 ++ src/powershell-unix/powershell-unix.csproj | 2 ++ .../powershell-win-core.csproj | 2 ++ .../powershell-win-core.targets | 22 +++++++++++++++++++ 17 files changed, 63 insertions(+), 5 deletions(-) create mode 100644 src/powershell-win-core/powershell-win-core.targets diff --git a/build.psm1 b/build.psm1 index 610415ba0dd..a907d2151a3 100644 --- a/build.psm1 +++ b/build.psm1 @@ -153,13 +153,13 @@ function Start-PSBuild { # Generate version constant for $PSVersionTable function Start-PowerShellVersionGen { $powershellVersion = git --git-dir="$PSScriptRoot/.git" describe --abbrev=60 --long - $matchVersion = ([regex]::Match($powershellVersion, "^(v.+)-(\d+)-g(.+)")).Groups.Value - $null, $ps6MajorVersion, $ps6MinorVersion, $ps6PatchVersion, $ps6LabelVersion = ([regex]::Match($matchVersion[1], "^v(\d+).(\d+).(\d+)-(.+)")).Groups.Value - $formattedVersion = "Version: $($matchVersion[1])" + $matchVersion = ([regex]::Match($powershellVersion, "^v(.+)-(\d+)-g(.+)")).Groups.Value + $null, $ps6MajorVersion, $ps6MinorVersion, $ps6PatchVersion, $ps6LabelVersion = ([regex]::Match($matchVersion[1], "^(\d+).(\d+).(\d+)-(.+)")).Groups.Value + $Global:formattedVersion = "$($matchVersion[1])" if ($($matchVersion[1]) -ne "0") { - $formattedVersion += " Additional commits: $($matchVersion[2])" + $Global:formattedVersion += " Additional commits: $($matchVersion[2])" } - $formattedVersion += " Commit Hash: $($matchVersion[3])" + $Global:formattedVersion += " Commit Hash: $($matchVersion[3])" $template = @" //------------------------------------------------------------------------------ @@ -182,6 +182,8 @@ namespace System.Management.Automation "@ Set-Content -Path "$PSScriptRoot\src\System.Management.Automation\gen\PSVersionInfo.generated.cs" -Value $template + + $Global:formattedVersion = $Global:formattedVersion -replace ' ', '%20' } if ($Clean) { @@ -332,6 +334,10 @@ Fix steps: # (Call after 'Start-ResGen'!) Start-PowerShellVersionGen +# $Arguments += "/p:ProductVersion=$formattedVersion;InformationalVersion=$formattedVersion;" + $Arguments += "/p:ProductVersion=$formattedVersion;InformationalVersion=$formattedVersion" + + # handle xaml files # Heuristic to resolve xaml on the fresh machine if ($FullCLR -and ($XamlGen -or -not (Test-Path "$PSScriptRoot/src/Microsoft.PowerShell.Activities/gen/*.g.cs"))) { diff --git a/src/Microsoft.Management.Infrastructure.CimCmdlets/Microsoft.Management.Infrastructure.CimCmdlets.csproj b/src/Microsoft.Management.Infrastructure.CimCmdlets/Microsoft.Management.Infrastructure.CimCmdlets.csproj index 4daa71078a3..f260a609712 100644 --- a/src/Microsoft.Management.Infrastructure.CimCmdlets/Microsoft.Management.Infrastructure.CimCmdlets.csproj +++ b/src/Microsoft.Management.Infrastructure.CimCmdlets/Microsoft.Management.Infrastructure.CimCmdlets.csproj @@ -8,6 +8,8 @@ Microsoft.Management.Infrastructure.CimCmdlets + + diff --git a/src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj b/src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj index e4a845624bc..cb4ca01934a 100644 --- a/src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj +++ b/src/Microsoft.PowerShell.Commands.Diagnostics/Microsoft.PowerShell.Commands.Diagnostics.csproj @@ -9,6 +9,8 @@ false + + diff --git a/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj b/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj index 2df8b6132a8..f7bb27238ae 100644 --- a/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj +++ b/src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj @@ -9,6 +9,8 @@ false + + diff --git a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj index ec8d3a1e391..abb10637952 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj +++ b/src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj @@ -9,6 +9,8 @@ false + + diff --git a/src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj b/src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj index d4db09c8e1c..61f34d062ab 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj +++ b/src/Microsoft.PowerShell.ConsoleHost/Microsoft.PowerShell.ConsoleHost.csproj @@ -8,6 +8,8 @@ Microsoft.PowerShell.ConsoleHost + + diff --git a/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext.csproj b/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext.csproj index 04a453363a8..2d68138643c 100644 --- a/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext.csproj +++ b/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext.csproj @@ -7,6 +7,8 @@ Microsoft.PowerShell.CoreCLR.AssemblyLoadContext + + $(DefineConstants);CORECLR diff --git a/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj b/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj index 291c8f1e05b..83bbb2402ed 100644 --- a/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj +++ b/src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj @@ -8,6 +8,8 @@ Microsoft.PowerShell.CoreCLR.Eventing + + $(DefineConstants);CORECLR diff --git a/src/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.csproj b/src/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.csproj index fe81a6b4a7e..d40ba074c65 100644 --- a/src/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.csproj +++ b/src/Microsoft.PowerShell.LocalAccounts/Microsoft.PowerShell.LocalAccounts.csproj @@ -8,6 +8,8 @@ false + + diff --git a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj index aee7a367bab..90cbc52e80f 100644 --- a/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj +++ b/src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj @@ -8,6 +8,8 @@ false + + diff --git a/src/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.csproj b/src/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.csproj index e5d6ee982c6..e7d042f257e 100644 --- a/src/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.csproj +++ b/src/Microsoft.PowerShell.Security/Microsoft.PowerShell.Security.csproj @@ -10,6 +10,8 @@ false + + diff --git a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj index a0698b1739d..94c1a1a063b 100644 --- a/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj +++ b/src/Microsoft.WSMan.Management/Microsoft.WSMan.Management.csproj @@ -7,6 +7,8 @@ Microsoft.WSMan.Management + + diff --git a/src/Microsoft.WSMan.Runtime/Microsoft.WSMan.Runtime.csproj b/src/Microsoft.WSMan.Runtime/Microsoft.WSMan.Runtime.csproj index 205983e5aa4..60aeda9f478 100644 --- a/src/Microsoft.WSMan.Runtime/Microsoft.WSMan.Runtime.csproj +++ b/src/Microsoft.WSMan.Runtime/Microsoft.WSMan.Runtime.csproj @@ -7,6 +7,8 @@ Microsoft.WSMan.Runtime + + $(DefineConstants);CORECLR diff --git a/src/System.Management.Automation/System.Management.Automation.csproj b/src/System.Management.Automation/System.Management.Automation.csproj index 92ee303d057..a4f838d7b03 100644 --- a/src/System.Management.Automation/System.Management.Automation.csproj +++ b/src/System.Management.Automation/System.Management.Automation.csproj @@ -9,6 +9,8 @@ false + + diff --git a/src/powershell-unix/powershell-unix.csproj b/src/powershell-unix/powershell-unix.csproj index 74366ad7437..078ac41bc1f 100644 --- a/src/powershell-unix/powershell-unix.csproj +++ b/src/powershell-unix/powershell-unix.csproj @@ -9,6 +9,8 @@ ubuntu.14.04-x64;ubuntu.16.04-x64;ubuntu.16.10-x64;debian.8-x64;centos.7-x64;fedora.24-x64;osx.10.11-x64;osx.10.12-x64;opensuse.13.2-x64;opensuse.42.1-x64 + + diff --git a/src/powershell-win-core/powershell-win-core.csproj b/src/powershell-win-core/powershell-win-core.csproj index a8072664cdf..a91f790d8af 100644 --- a/src/powershell-win-core/powershell-win-core.csproj +++ b/src/powershell-win-core/powershell-win-core.csproj @@ -9,6 +9,8 @@ win7-x86;win7-x64;win81-x64;win10-x64 + + diff --git a/src/powershell-win-core/powershell-win-core.targets b/src/powershell-win-core/powershell-win-core.targets new file mode 100644 index 00000000000..7cf48114004 --- /dev/null +++ b/src/powershell-win-core/powershell-win-core.targets @@ -0,0 +1,22 @@ + + + PowerShell Core + Microsoft Corporation + (c) Microsoft Corporation. All rights reserved. + + 6.0.0.0 + 6.0.0.0 + + netcoreapp2.0 + true + true + true + + true + ../signing/visualstudiopublic.snk + true + +