diff --git a/Build/step-build-libs.yml b/Build/step-build-libs.yml index 823c0168..757004df 100644 --- a/Build/step-build-libs.yml +++ b/Build/step-build-libs.yml @@ -17,7 +17,7 @@ steps: -v n /p:Version=$(Assembly.Version) /p:QsharpDocsOutDir=$(DocsOutDir) - + /p:DefineConstants=$(Assembly.Constants) ## @@ -37,6 +37,7 @@ steps: -v n /p:Version=$(Assembly.Version) /p:QsharpDocsOutDir=$(DocsOutDir) + /p:DefineConstants=$(Assembly.Constants) ## # Create Nuget. @@ -49,5 +50,10 @@ steps: projects: | $(LibrariesRootFolder)/Standard/src/Standard.csproj $(LibrariesRootFolder)/Chemistry/src/DataModel/DataModel.csproj - arguments: ' --no-build -c $(BuildConfiguration) -v n -o $(System.DefaultWorkingDirectory) /p:PackageVersion=$(Nuget.Version)' + arguments: > + --no-build + -c $(BuildConfiguration) + -v n + -o $(System.DefaultWorkingDirectory) + /p:PackageVersion=$(Nuget.Version) diff --git a/Chemistry/Common/267DevDivSNKey2048.snk b/Chemistry/Common/267DevDivSNKey2048.snk new file mode 100644 index 00000000..7a1fffb8 Binary files /dev/null and b/Chemistry/Common/267DevDivSNKey2048.snk differ diff --git a/Chemistry/Common/DelaySign.cs b/Chemistry/Common/DelaySign.cs new file mode 100644 index 00000000..8a98ee2f --- /dev/null +++ b/Chemistry/Common/DelaySign.cs @@ -0,0 +1,24 @@ +using System.Reflection; + +// Attributes for delay-signing +#if SIGNED +[assembly:AssemblyKeyFile("..\\..\\Common\\267DevDivSNKey2048.snk")] +[assembly:AssemblyDelaySign(true)] +#endif + +internal static class SigningConstants +{ +#if SIGNED + public const string PUBLIC_KEY = ", PublicKey=" + + "002400000c800000140100000602000000240000525341310008000001000100613399aff18ef1" + + "a2c2514a273a42d9042b72321f1757102df9ebada69923e2738406c21e5b801552ab8d200a65a2" + + "35e001ac9adc25f2d811eb09496a4c6a59d4619589c69f5baf0c4179a47311d92555cd006acc8b" + + "5959f2bd6e10e360c34537a1d266da8085856583c85d81da7f3ec01ed9564c58d93d713cd0172c" + + "8e23a10f0239b80c96b07736f5d8b022542a4e74251a5f432824318b3539a5a087f8e53d2f135f" + + "9ca47f3bb2e10aff0af0849504fb7cea3ff192dc8de0edad64c68efde34c56d302ad55fd6e80f3" + + "02d5efcdeae953658d3452561b5f36c542efdbdd9f888538d374cef106acf7d93a4445c3c73cd9" + + "11f0571aaf3d54da12b11ddec375b3"; +#else + public const string PUBLIC_KEY = ""; +#endif +} diff --git a/Chemistry/src/DataModel/DataModel.csproj b/Chemistry/src/DataModel/DataModel.csproj index 09ec31e9..cf2eb8a2 100644 --- a/Chemistry/src/DataModel/DataModel.csproj +++ b/Chemistry/src/DataModel/DataModel.csproj @@ -19,6 +19,9 @@ Quantum Q# Qsharp + + + diff --git a/Chemistry/src/Runtime/Runtime.csproj b/Chemistry/src/Runtime/Runtime.csproj index a857cfdb..1492f1bf 100644 --- a/Chemistry/src/Runtime/Runtime.csproj +++ b/Chemistry/src/Runtime/Runtime.csproj @@ -10,6 +10,10 @@ True + + + + diff --git a/Chemistry/tests/ChemistryTests/ChemistryTests.csproj b/Chemistry/tests/ChemistryTests/ChemistryTests.csproj index ce9310dd..7f6e965a 100644 --- a/Chemistry/tests/ChemistryTests/ChemistryTests.csproj +++ b/Chemistry/tests/ChemistryTests/ChemistryTests.csproj @@ -5,6 +5,10 @@ false + + + + diff --git a/Chemistry/tests/DataModelTests/DataModelTests.csproj b/Chemistry/tests/DataModelTests/DataModelTests.csproj index 9b15c1af..b0f86baf 100644 --- a/Chemistry/tests/DataModelTests/DataModelTests.csproj +++ b/Chemistry/tests/DataModelTests/DataModelTests.csproj @@ -12,6 +12,10 @@ + + + + diff --git a/Chemistry/tests/SystemTests/SystemTests.csproj b/Chemistry/tests/SystemTests/SystemTests.csproj index 91703493..298ea8c4 100644 --- a/Chemistry/tests/SystemTests/SystemTests.csproj +++ b/Chemistry/tests/SystemTests/SystemTests.csproj @@ -12,6 +12,10 @@ + + + + diff --git a/Standard/Common/267DevDivSNKey2048.snk b/Standard/Common/267DevDivSNKey2048.snk new file mode 100644 index 00000000..7a1fffb8 Binary files /dev/null and b/Standard/Common/267DevDivSNKey2048.snk differ diff --git a/Standard/Common/DelaySign.cs b/Standard/Common/DelaySign.cs new file mode 100644 index 00000000..b87eea67 --- /dev/null +++ b/Standard/Common/DelaySign.cs @@ -0,0 +1,24 @@ +using System.Reflection; + +// Attributes for delay-signing +#if SIGNED +[assembly:AssemblyKeyFile("..\\Common\\267DevDivSNKey2048.snk")] +[assembly:AssemblyDelaySign(true)] +#endif + +internal static class SigningConstants +{ +#if SIGNED + public const string PUBLIC_KEY = ", PublicKey=" + + "002400000c800000140100000602000000240000525341310008000001000100613399aff18ef1" + + "a2c2514a273a42d9042b72321f1757102df9ebada69923e2738406c21e5b801552ab8d200a65a2" + + "35e001ac9adc25f2d811eb09496a4c6a59d4619589c69f5baf0c4179a47311d92555cd006acc8b" + + "5959f2bd6e10e360c34537a1d266da8085856583c85d81da7f3ec01ed9564c58d93d713cd0172c" + + "8e23a10f0239b80c96b07736f5d8b022542a4e74251a5f432824318b3539a5a087f8e53d2f135f" + + "9ca47f3bb2e10aff0af0849504fb7cea3ff192dc8de0edad64c68efde34c56d302ad55fd6e80f3" + + "02d5efcdeae953658d3452561b5f36c542efdbdd9f888538d374cef106acf7d93a4445c3c73cd9" + + "11f0571aaf3d54da12b11ddec375b3"; +#else + public const string PUBLIC_KEY = ""; +#endif +} diff --git a/Standard/src/Standard.csproj b/Standard/src/Standard.csproj index d81b6a67..82d40fd1 100644 --- a/Standard/src/Standard.csproj +++ b/Standard/src/Standard.csproj @@ -18,6 +18,10 @@ Quantum Q# Qsharp + + + + diff --git a/Standard/tests/Standard.Tests.csproj b/Standard/tests/Standard.Tests.csproj index b3991f0d..f3ff9ee3 100644 --- a/Standard/tests/Standard.Tests.csproj +++ b/Standard/tests/Standard.Tests.csproj @@ -10,6 +10,10 @@ 0162 + + + + diff --git a/build.yml b/build.yml index 8addf471..87a7d566 100644 --- a/build.yml +++ b/build.yml @@ -10,6 +10,7 @@ variables: Build.Minor: 0 LibrariesRootFolder: $(System.DefaultWorkingDirectory) DocsOutDir: '' + Assembly.Constants: '' Assembly.Version: $(Build.BuildNumber) Nuget.Version: $(Assembly.Version)-preview Python.Version: $(Assembly.Version)