From 2fa4232f64352b03cd9dfe1d451b312b694bfbfc Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Wed, 29 Aug 2012 10:48:02 +0200 Subject: [PATCH] Build: new 'Release-Signed' profile for signing assemblies (strong name) --- MathNet.Numerics.sln | 15 +++++ .../MathNet.Numerics.Signed.nuspec | 23 ++++++++ build/NuGet/nuget-signed.proj | 56 +++++++++++++++++++ src/Examples/Examples.csproj | 16 ++++++ src/FSharp/FSharp.fsproj | 9 +++ src/FSharpExamples/FSharpExamples.fsproj | 8 +++ src/FSharpUnitTests/FSharpUnitTests.fsproj | 8 +++ src/Numerics.IO/Numerics.IO.csproj | 28 ++++++++-- src/Numerics.IO/Properties/AssemblyInfo.cs | 4 ++ src/Numerics/Numerics.csproj | 32 +++++++++-- src/Numerics/Properties/AssemblyInfo.cs | 4 ++ src/UnitTests/UnitTests.csproj | 32 +++++++---- 12 files changed, 215 insertions(+), 20 deletions(-) create mode 100644 build/NuGet/Numerics.Signed/MathNet.Numerics.Signed.nuspec create mode 100644 build/NuGet/nuget-signed.proj diff --git a/MathNet.Numerics.sln b/MathNet.Numerics.sln index f10988fa..82a49c1d 100644 --- a/MathNet.Numerics.sln +++ b/MathNet.Numerics.sln @@ -30,36 +30,51 @@ Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU + Release-Signed|Any CPU = Release-Signed|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {8239A6FF-1EF3-4DA4-A860-95C392DD6899}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8239A6FF-1EF3-4DA4-A860-95C392DD6899}.Debug|Any CPU.Build.0 = Debug|Any CPU {8239A6FF-1EF3-4DA4-A860-95C392DD6899}.Release|Any CPU.ActiveCfg = Release|Any CPU {8239A6FF-1EF3-4DA4-A860-95C392DD6899}.Release|Any CPU.Build.0 = Release|Any CPU + {8239A6FF-1EF3-4DA4-A860-95C392DD6899}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU + {8239A6FF-1EF3-4DA4-A860-95C392DD6899}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Debug|Any CPU.Build.0 = Debug|Any CPU {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Release|Any CPU.ActiveCfg = Release|Any CPU {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Release|Any CPU.Build.0 = Release|Any CPU + {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU + {B7CAE5F4-A23F-4438-B5BE-41226618B695}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU {37E8E802-A354-4114-BFC1-6E1357DA605B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {37E8E802-A354-4114-BFC1-6E1357DA605B}.Debug|Any CPU.Build.0 = Debug|Any CPU {37E8E802-A354-4114-BFC1-6E1357DA605B}.Release|Any CPU.ActiveCfg = Release|Any CPU {37E8E802-A354-4114-BFC1-6E1357DA605B}.Release|Any CPU.Build.0 = Release|Any CPU + {37E8E802-A354-4114-BFC1-6E1357DA605B}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU + {37E8E802-A354-4114-BFC1-6E1357DA605B}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU {BC81EA37-8EE6-4BF9-B8A9-B30497AEF8B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BC81EA37-8EE6-4BF9-B8A9-B30497AEF8B1}.Debug|Any CPU.Build.0 = Debug|Any CPU {BC81EA37-8EE6-4BF9-B8A9-B30497AEF8B1}.Release|Any CPU.ActiveCfg = Release|Any CPU {BC81EA37-8EE6-4BF9-B8A9-B30497AEF8B1}.Release|Any CPU.Build.0 = Release|Any CPU + {BC81EA37-8EE6-4BF9-B8A9-B30497AEF8B1}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU + {BC81EA37-8EE6-4BF9-B8A9-B30497AEF8B1}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU {F2F8032B-A31D-4E33-A05E-F2CDCBFAA75D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F2F8032B-A31D-4E33-A05E-F2CDCBFAA75D}.Debug|Any CPU.Build.0 = Debug|Any CPU {F2F8032B-A31D-4E33-A05E-F2CDCBFAA75D}.Release|Any CPU.ActiveCfg = Release|Any CPU {F2F8032B-A31D-4E33-A05E-F2CDCBFAA75D}.Release|Any CPU.Build.0 = Release|Any CPU + {F2F8032B-A31D-4E33-A05E-F2CDCBFAA75D}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU + {F2F8032B-A31D-4E33-A05E-F2CDCBFAA75D}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU {DAF07AA8-C5C9-4963-98F7-2C3285064DAD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DAF07AA8-C5C9-4963-98F7-2C3285064DAD}.Debug|Any CPU.Build.0 = Debug|Any CPU {DAF07AA8-C5C9-4963-98F7-2C3285064DAD}.Release|Any CPU.ActiveCfg = Release|Any CPU {DAF07AA8-C5C9-4963-98F7-2C3285064DAD}.Release|Any CPU.Build.0 = Release|Any CPU + {DAF07AA8-C5C9-4963-98F7-2C3285064DAD}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU + {DAF07AA8-C5C9-4963-98F7-2C3285064DAD}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU {EB1A5D32-F264-4BCE-BEB7-0B97085075BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EB1A5D32-F264-4BCE-BEB7-0B97085075BE}.Debug|Any CPU.Build.0 = Debug|Any CPU {EB1A5D32-F264-4BCE-BEB7-0B97085075BE}.Release|Any CPU.ActiveCfg = Release|Any CPU {EB1A5D32-F264-4BCE-BEB7-0B97085075BE}.Release|Any CPU.Build.0 = Release|Any CPU + {EB1A5D32-F264-4BCE-BEB7-0B97085075BE}.Release-Signed|Any CPU.ActiveCfg = Release-Signed|Any CPU + {EB1A5D32-F264-4BCE-BEB7-0B97085075BE}.Release-Signed|Any CPU.Build.0 = Release-Signed|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/NuGet/Numerics.Signed/MathNet.Numerics.Signed.nuspec b/build/NuGet/Numerics.Signed/MathNet.Numerics.Signed.nuspec new file mode 100644 index 00000000..354dd9af --- /dev/null +++ b/build/NuGet/Numerics.Signed/MathNet.Numerics.Signed.nuspec @@ -0,0 +1,23 @@ + + + + MathNet.Numerics.Signed + 1.0.0 + Math.NET Numerics (Strong Name) + Math.NET Numerics, signed and thus with a strong name. We strongly discourage using this package and recommend using MathNet.Numerics instead, which is unsigned and weakly named. + Math.NET Numerics, signed and thus with a strong name. We strongly discourage using this package and recommend using MathNet.Numerics instead, which is unsigned and weakly named. + Marcus Cuda, Christoph Ruegg, Jurgen Van Gael + Christoph Ruegg + http://numerics.mathdotnet.com/ + http://www.mathdotnet.com/images/MathNet128.png + http://mathnetnumerics.codeplex.com/license + false + math numeric statistics probability integration interpolation linear algebra matrix fft signed strongname + + + + + + + + \ No newline at end of file diff --git a/build/NuGet/nuget-signed.proj b/build/NuGet/nuget-signed.proj new file mode 100644 index 00000000..331c5c64 --- /dev/null +++ b/build/NuGet/nuget-signed.proj @@ -0,0 +1,56 @@ + + + + + + $(MSBuildProjectDirectory)/../.. + $(MSBuildProjectDirectory)/../../out/lib + $(MSBuildProjectDirectory)/../../out/packages/NuGet + $(MSBuildProjectDirectory)/Numerics.Signed + $(MSBuildProjectDirectory)/../../tools/NuGet/nuget.exe + + + + + + + + + + + + + + + + + + + + + + + + + + %(NumericsAssemblyInfo.Version) + + + + + $(NumericsAssemblyVersion.Substring(0, $(NumericsAssemblyVersion.LastIndexOf('.')))) + + + + + + + + + + + \ No newline at end of file diff --git a/src/Examples/Examples.csproj b/src/Examples/Examples.csproj index fc7ec043..3b594d8b 100644 --- a/src/Examples/Examples.csproj +++ b/src/Examples/Examples.csproj @@ -52,6 +52,22 @@ 4 AllRules.ruleset + + bin\Release-Signed\ + TRACE + true + pdbonly + AnyCPU + bin\Release\Examples.dll.CodeAnalysisLog.xml + true + GlobalSuppressions.cs + prompt + AllRules.ruleset + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets + true + ;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules + true + diff --git a/src/FSharp/FSharp.fsproj b/src/FSharp/FSharp.fsproj index 43b2c15a..bf850432 100644 --- a/src/FSharp/FSharp.fsproj +++ b/src/FSharp/FSharp.fsproj @@ -34,6 +34,15 @@ MathNet.Numerics.FSharp.XML + + pdbonly + true + true + TRACE + 3 + ..\..\out\lib\Net40\MathNet.Numerics.FSharp.xml + bin\Release-Signed\ + diff --git a/src/FSharpExamples/FSharpExamples.fsproj b/src/FSharpExamples/FSharpExamples.fsproj index 6b257ead..fef511c7 100644 --- a/src/FSharpExamples/FSharpExamples.fsproj +++ b/src/FSharpExamples/FSharpExamples.fsproj @@ -30,6 +30,14 @@ TRACE 3 + + pdbonly + true + true + TRACE + 3 + bin\Release-Signed\ + diff --git a/src/FSharpUnitTests/FSharpUnitTests.fsproj b/src/FSharpUnitTests/FSharpUnitTests.fsproj index 34b6fed9..c6f7cdcf 100644 --- a/src/FSharpUnitTests/FSharpUnitTests.fsproj +++ b/src/FSharpUnitTests/FSharpUnitTests.fsproj @@ -30,6 +30,14 @@ TRACE 3 + + pdbonly + true + true + TRACE + 3 + bin\Release-Signed\ + diff --git a/src/Numerics.IO/Numerics.IO.csproj b/src/Numerics.IO/Numerics.IO.csproj index d939ce49..78b36f01 100644 --- a/src/Numerics.IO/Numerics.IO.csproj +++ b/src/Numerics.IO/Numerics.IO.csproj @@ -12,24 +12,44 @@ MathNet.Numerics.IO v4.0 512 + + ..\MathNet.Numerics.snk + false + ..\..\out\debug\Net40\ + + false true full false - ..\..\out\debug\Net40\ - DEBUG;TRACE + DEBUG;TRACE;SYSNUMERICS prompt 4 + ..\..\out\lib\Net40\ + ..\..\out\lib\Net40\MathNet.Numerics.IO.xml + + false pdbonly true - ..\..\out\lib\Net40\ - TRACE + TRACE;SYSNUMERICS prompt 4 + AllRules.ruleset + + + ..\..\out\lib\Net40\ ..\..\out\lib\Net40\MathNet.Numerics.IO.xml + + true + pdbonly + true + TRACE;SYSNUMERICS;STRONGNAME + prompt + 4 + AllRules.ruleset diff --git a/src/Numerics.IO/Properties/AssemblyInfo.cs b/src/Numerics.IO/Properties/AssemblyInfo.cs index b0cdc2d9..95669881 100644 --- a/src/Numerics.IO/Properties/AssemblyInfo.cs +++ b/src/Numerics.IO/Properties/AssemblyInfo.cs @@ -44,6 +44,10 @@ using System.Runtime.InteropServices; [assembly: ComVisible(false)] [assembly: Guid("5d559feb-5f06-4401-b48b-c08b78f8582a")] [assembly: NeutralResourcesLanguage("en")] +#if STRONGNAME +[assembly: InternalsVisibleTo("MathNet.Numerics.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed2314a577643d859571b8b9307c6ff2670525c4598fbb307e57ea65ebf5d4417284cb3da9181636480b623f4db8cc3c1947244ba069df0df86e2431621f51a488f9929519a1c5d0ae595f6e2d0e4094685f0c1229ff658360acbb9f63f1a0258e984dda00dc7ad4fd16dbb550ec1ef8a11df138402b7c1998ee224e652c839b")] +#else [assembly: InternalsVisibleTo("MathNet.Numerics.UnitTests")] +#endif [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Numerics/Numerics.csproj b/src/Numerics/Numerics.csproj index 2d505507..da85deac 100644 --- a/src/Numerics/Numerics.csproj +++ b/src/Numerics/Numerics.csproj @@ -12,8 +12,6 @@ MathNet.Numerics v4.0 512 - false - ..\MathNet.Numerics.snk 3.5 @@ -34,12 +32,17 @@ 1.0.0.%2a false true + + ..\MathNet.Numerics.snk + false + ..\..\out\debug\Net40\ + + false true full false - ..\..\out\debug\Net40\ TRACE;DEBUG;SYSNUMERICS prompt 4 @@ -48,13 +51,28 @@ AllRules.ruleset + ..\..\out\lib\Net40\ + ..\..\out\lib\Net40\MathNet.Numerics.xml + + false pdbonly true - ..\..\out\lib\Net40\ TRACE;SYSNUMERICS prompt 4 + AllRules.ruleset + + + ..\..\out\lib\Net40\ ..\..\out\lib\Net40\MathNet.Numerics.xml + + true + pdbonly + AnyCPU + true + TRACE;SYSNUMERICS;STRONGNAME + prompt + 4 AllRules.ruleset @@ -456,7 +474,9 @@ true - + + + @@ -469,4 +489,4 @@ --> - \ No newline at end of file + diff --git a/src/Numerics/Properties/AssemblyInfo.cs b/src/Numerics/Properties/AssemblyInfo.cs index 24578f27..02725ff0 100644 --- a/src/Numerics/Properties/AssemblyInfo.cs +++ b/src/Numerics/Properties/AssemblyInfo.cs @@ -44,6 +44,10 @@ using System.Runtime.InteropServices; [assembly: ComVisible(false)] [assembly: Guid("7b66646f-f0ee-425d-9065-910d1937a2df")] [assembly: NeutralResourcesLanguage("en")] +#if STRONGNAME +[assembly: InternalsVisibleTo("MathNet.Numerics.UnitTests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100ed2314a577643d859571b8b9307c6ff2670525c4598fbb307e57ea65ebf5d4417284cb3da9181636480b623f4db8cc3c1947244ba069df0df86e2431621f51a488f9929519a1c5d0ae595f6e2d0e4094685f0c1229ff658360acbb9f63f1a0258e984dda00dc7ad4fd16dbb550ec1ef8a11df138402b7c1998ee224e652c839b")] +#else [assembly: InternalsVisibleTo("MathNet.Numerics.UnitTests")] +#endif [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/UnitTests/UnitTests.csproj b/src/UnitTests/UnitTests.csproj index bd6934b7..2454cda4 100644 --- a/src/UnitTests/UnitTests.csproj +++ b/src/UnitTests/UnitTests.csproj @@ -12,31 +12,43 @@ MathNet.Numerics.UnitTests v4.0 512 + + ..\MathNet.Numerics.snk + false + ..\..\out\test\debug\Net40\ + + false true full false - ..\..\out\test\debug\Net40\ - DEBUG;TRACE + DEBUG;TRACE;SYSNUMERICS prompt 4 AnyCPU + ..\..\out\test\Net40\ + + false pdbonly true - ..\..\out\test\Net40\ - TRACE + TRACE;SYSNUMERICS prompt 4 + AllRules.ruleset - - false - - - - + + ..\..\out\test\Net40\ + + true + pdbonly + true + TRACE;SYSNUMERICS;STRONGNAME + prompt + 4 + AllRules.ruleset