Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions PowerShellEditorServices.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ task SetupDotNet -Before Clean, Build, TestServerWinPS, TestServerPS7, TestServe
$dotnetExePath = if ($script:IsNix) { "$dotnetPath/dotnet" } else { "$dotnetPath/dotnet.exe" }

if (!(Test-Path $dotnetExePath)) {
# TODO: Test .NET 5 with PowerShell 7.1, and add that channel here.
Install-Dotnet -Channel '3.1','release/6.0.1xx-preview2'
# TODO: Test .NET 5 with PowerShell 7.1
Install-Dotnet -Channel '3.1','5.0','6.0'
}

# This variable is used internally by 'dotnet' to know where it's installed
Expand Down Expand Up @@ -174,6 +174,7 @@ task GetProductVersion -Before PackageModule, UploadArtifacts {
task CreateBuildInfo -Before Build {
$buildVersion = "<development-build>"
$buildOrigin = "Development"
$buildCommit = git rev-parse HEAD

# Set build info fields on build platforms
if ($env:TF_BUILD) {
Expand Down Expand Up @@ -215,6 +216,7 @@ namespace Microsoft.PowerShell.EditorServices.Hosting
{
public static readonly string BuildVersion = "$buildVersion";
public static readonly string BuildOrigin = "$buildOrigin";
public static readonly string BuildCommit= "$buildCommit";
public static readonly System.DateTime? BuildTime = System.DateTime.Parse("$buildTime", CultureInfo.InvariantCulture.DateTimeFormat);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/PowerShellEditorServices.Hosting/BuildInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public static class BuildInfo
// TODO: Include a Git commit hash in this.
public static readonly string BuildVersion = "<development-build>";
public static readonly string BuildOrigin = "<development>";
public static readonly string BuildCommit= "<development>";
public static readonly System.DateTime? BuildTime = System.DateTime.Parse("2019-12-06T21:43:41", CultureInfo.InvariantCulture.DateTimeFormat);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@
<AssemblyName>Microsoft.PowerShell.EditorServices.Hosting</AssemblyName>
</PropertyGroup>

<!-- HACK: This is a temporary workaround of `dotnet publish` -->
<Target Name="InjectNetStandardFacadesToPublishDirectory"
BeforeTargets="ComputeResolvedFilesToPublishList"
Condition="'@(_NETStandardLibraryNETFrameworkLib)' != ''">
<ItemGroup>
<_ResolvedCopyLocalPublishAssets
Include="@(_NETStandardLibraryNETFrameworkLib)"
Condition="'%(_NETStandardLibraryNETFrameworkLib.FileName)' != 'netfx.force.conflicts'"
/>
</ItemGroup>
</Target>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
<DefineConstants>$(DefineConstants);CoreCLR</DefineConstants>
</PropertyGroup>
Expand Down