diff options
author | Miguel de Icaza <miguel@gnome.org> | 2014-05-25 08:33:21 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2014-05-25 08:33:21 +0400 |
commit | a7eace18c195257ba0d89152e194ca5405f33146 (patch) | |
tree | ee65f228d5c4cfe3235656fb2fed9366363cc6f5 /msvc | |
parent | ef0fdb0b2f1007dd864d3d95f55e00ca67e9e3d6 (diff) |
[build] MSBuild setup: Add support for -keyfile and -delaysign, thanks to Marek Safar for the pointer
Diffstat (limited to 'msvc')
-rw-r--r-- | msvc/scripts/csproj.tmpl | 1 | ||||
-rw-r--r-- | msvc/scripts/genproj.cs | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/msvc/scripts/csproj.tmpl b/msvc/scripts/csproj.tmpl index 4e0e44e5915..872748e7f47 100644 --- a/msvc/scripts/csproj.tmpl +++ b/msvc/scripts/csproj.tmpl @@ -19,6 +19,7 @@ <TargetFrameworkVersion>v@FX_VERSION</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
+ @SIGNATURE@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
diff --git a/msvc/scripts/genproj.cs b/msvc/scripts/genproj.cs index 5fa1a75ec78..b3e6b0d6715 100644 --- a/msvc/scripts/genproj.cs +++ b/msvc/scripts/genproj.cs @@ -861,7 +861,19 @@ class MsbuildGenerator { // Replace the template values // + string strongNameSection = ""; + if (StrongNameKeyFile != null){ + strongNameSection = String.Format ( + " <PropertyGroup>\n" + + " <SignAssembly>true</SignAssembly>\n" + + "{1}" + + " </PropertyGroup>\n" + + " <PropertyGroup>\n" + + " <AssemblyOriginatorKeyFile>{0}</AssemblyOriginatorKeyFile>\n" + + " </PropertyGroup>", StrongNameKeyFile, StrongNameDelaySign ? " <DelaySign>true</DelaySign>\n" : ""); + } Csproj.output = template. + Replace ("@SIGNATURE@", strongNameSection). Replace ("@PROJECTGUID@", Csproj.projectGuid). Replace ("@DEFINES@", defines.ToString ()). Replace ("@DISABLEDWARNINGS@", string.Join (",", (from i in ignore_warning select i.ToString ()).ToArray ())). |