Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix cli-deps-satellites on windows to not sign the satellites during source-build, since we are using a dummy RoslynTools package. #148

Merged
merged 4 commits into from
Sep 19, 2017
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
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
* text=auto
* text=auto

# patch files need lf line-endings, even on Windows
*.patch text eol=lf
1 change: 1 addition & 0 deletions dir.props
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
<EnvironmentVariables Include="DOTNET_TOOL_DIR=$(DotNetCliToolDir)" />
<EnvironmentVariables Include="BUILD_TOOLS_TOOL_DIR=$(ProjectDir)Tools/" />
<EnvironmentVariables Include="BUILDTOOLS_SKIP_CROSSGEN=1" />
<EnvironmentVariables Include="DotNet_BuildFromSource=true" />
</ItemGroup>

<Import Project="repositories.props" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
From ad9db12008d9d07bc6137c69234670112d5899fb Mon Sep 17 00:00:00 2001
From: Eric Erhardt <eric.erhardt@microsoft.com>
Date: Fri, 15 Sep 2017 20:08:48 -0500
Subject: [PATCH] Allow cli-deps-satellites to skip signing on Windows during
source-build since we don't have the RoslynTools package

---
src/Directory.Build.props | 3 ++-
src/Directory.Build.targets | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 042f2ab..191b194 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -33,7 +33,8 @@
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)..\build\$(StrongNameKey).snk</AssemblyOriginatorKeyFile>
<SignToolConfig>$(MSBuildThisFileDirectory)..\build\$(StrongNameKey).json</SignToolConfig>
<SignAssembly>true</SignAssembly>
-
+ <SkipSignSatellites Condition="'$(SkipSignSatellites)' == '' and '$(DotNet_BuildFromSource)' == 'true'">true</SkipSignSatellites>
+
<!-- Use delay signing instead of public signing on full msbuild to workaround https://github.com/Microsoft/msbuild/issues/1490 -->
<PublicSign Condition="'$(SignType)' != 'real' and '$(MSBuildRuntimeType)' == 'Core'">true</PublicSign>
<DelaySign Condition="'$(PublicSign)' != 'true'">true</DelaySign>
diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets
index 8e76325..0f87c86 100644
--- a/src/Directory.Build.targets
+++ b/src/Directory.Build.targets
@@ -21,7 +21,7 @@

<Target Name="SignSatellites"
BeforeTargets="PackSatellites"
- Condition="$(IsPackage) and '$(OS)' == 'Windows_NT'">
+ Condition="$(IsPackage) and '$(OS)' == 'Windows_NT' and '$(SkipSignSatellites)' != 'true'">
<ItemGroup>
<SignToolArg Include="-nugetPackagesPath $(NuGetPackageRoot)" />
<SignToolArg Include="-intermediateOutputPath $(IntermediateOutputPath)" />
--
2.11.0 (Apple Git-81)

Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ index 53a7cd7..82e7578 100644
<PropertyGroup>
<Description>NuGet wrapper for dotnet.exe</Description>
<TargetFrameworks>netcoreapp1.0;net46</TargetFrameworks>
+ <TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netcoreapp1.0</TargetFrameworks>
+ <TargetFrameworks Condition="'$(OS)' != 'Windows_NT' or '$(DotNet_BuildFromSource)' == 'true'">netcoreapp1.0</TargetFrameworks>
<RuntimeIdentifier Condition=" '$(TargetFramework)' == 'net46' ">win7-x86</RuntimeIdentifier>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<OutputType>Exe</OutputType>
Expand Down