Permalink
Browse files

Added ability to easily sign assemblies.

- Exclude assemblies that shouldn't be signed.
- Removed Owin host from asp.net samples. Use ASP.NET host instead.
  • Loading branch information...
1 parent 0c18316 commit c508f86094aceebe561c8987a89a98bc9fd9562d @davidfowl davidfowl committed Oct 12, 2012
Showing with 44 additions and 63 deletions.
  1. +13 −7 Build/Build.proj
  2. +1 −0 Microsoft.AspNet.SignalR.sln
  3. +4 −23 ...soft.AspNet.SignalR.Hosting.AspNet.Samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples.csproj
  4. +0 −3 samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples/packages.config
  5. +1 −1 samples/Microsoft.AspNet.SignalR.Hosting.AspNet45.Samples/Global.asax
  6. +6 −23 ...ft.AspNet.SignalR.Hosting.AspNet45.Samples/Microsoft.AspNet.SignalR.Hosting.AspNet.Samples.csproj
  7. +0 −4 samples/Microsoft.AspNet.SignalR.Hosting.AspNet45.Samples/packages.config
  8. +1 −0 ...ft.AspNet.SignalR.Hosting.Console.Samples/Microsoft.AspNet.SignalR.Hosting.Console.Samples.csproj
  9. +1 −0 ....AspNet.SignalR.Hosting.Console45.Samples/Microsoft.AspNet.SignalR.Hosting.Console.Samples.csproj
  10. +5 −0 src/Common/Microsoft.AspNet.SignalR.targets
  11. +1 −0 src/Microsoft.AspNet.SignalR.Client.Silverlight/Microsoft.AspNet.SignalR.Client.Silverlight.csproj
  12. +1 −0 src/Microsoft.AspNet.SignalR.Client.Silverlight5/Microsoft.AspNet.SignalR.Client.Silverlight5.csproj
  13. +1 −0 src/Microsoft.AspNet.SignalR.Client.WP7/Microsoft.AspNet.SignalR.Client.WP7.csproj
  14. +1 −0 src/Microsoft.AspNet.SignalR.Client.WP71/Microsoft.AspNet.SignalR.Client.WP71.csproj
  15. +4 −1 src/Microsoft.AspNet.SignalR.Core/Properties/AssemblyInfo.cs
  16. +1 −0 src/Microsoft.AspNet.SignalR.Redis/Microsoft.AspNet.SignalR.Redis.csproj
  17. +2 −1 src/Microsoft.AspNet.SignalR.Server.Routing/Microsoft.AspNet.SignalR.Server.Routing.csproj
  18. +1 −0 src/Microsoft.AspNet.SignalR.Server/Microsoft.AspNet.SignalR.Server.csproj
View
@@ -19,8 +19,14 @@
<ZipExe>$(ToolsPath)7za920\7za.exe</ZipExe>
<ScriptTempPath>$(ArtifactsDir)\Microsoft.AspNet.SignalR.Client.JS\Scripts</ScriptTempPath>
<LocalToolsPath></LocalToolsPath>
+ <KeyFile>$(ProjectRoot)\35MSSharedLib1024.snk</KeyFile>
</PropertyGroup>
-
+
+ <!-- Add extra properties to the build for signing -->
+ <PropertyGroup Condition="Exists('$(KeyFile)')">
+ <ExtraProperties>_SignAssembly=true;_DelaySign=true;AssemblyOriginatorKeyFile=$(KeyFile)</ExtraProperties>
+ </PropertyGroup>
+
<PropertyGroup>
<!-- Build number is of the format (CurrentYear - VersionStartYear + 1)(2 digit month)(2 digit day) -->
<BuildDate>$([MSBuild]::Add(1, $([MSBuild]::Subtract($([System.DateTime]::Now.Year), $(VersionStartYear)))))$([System.DateTime]::Now.ToString("MMdd"))</BuildDate>
@@ -91,31 +97,31 @@
<MakeDir Directories="$(TestResultsPath)" Condition="!Exists('$(TestResultsPath)')" />
<MakeDir Directories="$(DocsPath)" Condition="!Exists('$(DocsPath)')" />
</Target>
-
+
<Target Name="Build" DependsOnTargets="CreateOutputDir">
<MSBuild Projects="$(ProjectRoot)\Microsoft.AspNet.SignalR.sln"
Targets="Build"
- Properties="Configuration=$(Configuration);ArtifactsDir=$(ArtifactsDir);" />
+ Properties="Configuration=$(Configuration);ArtifactsDir=$(ArtifactsDir);$(ExtraProperties)" />
<MSBuild Projects="$(ProjectRoot)\Microsoft.AspNet.SignalR.WP7.sln"
Targets="Build"
Condition="(Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight for Phone\') And Exists('$(MSBuildExtensionsPath)\Silverlight for Phone\v4.0\Microsoft.Silverlight.WindowsPhone71.Overrides.targets')) Or (Exists('$(LocalToolsPath)\WP7'))"
- Properties="Configuration=$(Configuration);ArtifactsDir=$(ArtifactsDir);" />
+ Properties="Configuration=$(Configuration);ArtifactsDir=$(ArtifactsDir);$(ExtraProperties)" />
<MSBuild Projects="$(ProjectRoot)\Microsoft.AspNet.SignalR.Silverlight.sln"
Targets="Build"
Condition="(Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v4.0') And Exists('$(MSBuildExtensionsPath)\Microsoft\Silverlight\v5.0\Microsoft.Silverlight.CSharp.targets')) Or (Exists('$(LocalToolsPath)\Silverlight'))"
- Properties="Configuration=$(Configuration);ArtifactsDir=$(ArtifactsDir);" />
+ Properties="Configuration=$(Configuration);ArtifactsDir=$(ArtifactsDir);$(ExtraProperties)" />
<MSBuild Projects="$(ProjectRoot)\Microsoft.AspNet.SignalR.WinRT.sln"
Targets="Build"
Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\WindowsXaml')"
- Properties="Configuration=$(Configuration);ArtifactsDir=$(ArtifactsDir);" />
+ Properties="Configuration=$(Configuration);ArtifactsDir=$(ArtifactsDir);$(ExtraProperties)" />
<MSBuild Projects="$(ProjectRoot)\Microsoft.AspNet.SignalR45.sln"
Targets="Build"
Condition="Exists('$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v11.0\Web')"
- Properties="Configuration=$(Configuration);ArtifactsDir=$(ArtifactsDir);" />
+ Properties="Configuration=$(Configuration);ArtifactsDir=$(ArtifactsDir);$(ExtraProperties)" />
</Target>
<Target Name="BuildDocs" DependsOnTargets="CreateOutputDir">
@@ -8,6 +8,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{1E4BA77C-4977-40AA-B297-3A2CB9990ABF}"
ProjectSection(SolutionItems) = preProject
Build\Build.proj = Build\Build.proj
+ src\Common\Microsoft.AspNet.SignalR.targets = src\Common\Microsoft.AspNet.SignalR.targets
Build\Microsoft.AspNet.SignalR.versions.targets = Build\Microsoft.AspNet.SignalR.versions.targets
ReleaseNotes.md = ReleaseNotes.md
EndProjectSection
@@ -41,25 +41,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="EntityFramework">
- <HintPath>..\..\packages\EntityFramework.4.1.10331.0\lib\EntityFramework.dll</HintPath>
- </Reference>
<Reference Include="HtmlSanitizationLibrary">
<HintPath>..\..\packages\AntiXSS.4.0.1\lib\net35\HtmlSanitizationLibrary.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.AspNet.Owin, Version=0.7.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\packages\Microsoft.AspNet.Owin.0.7\lib\Microsoft.AspNet.Owin.dll</HintPath>
- </Reference>
<Reference Include="Microsoft.CSharp" />
- <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- <HintPath>..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
- </Reference>
- <Reference Include="Owin.Startup, Version=0.4.0.0, Culture=neutral, PublicKeyToken=f585506a2da1fef4, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\packages\Owin.Startup.0.4\lib\net40\Owin.Startup.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Web" />
@@ -245,18 +230,14 @@
<Folder Include="App_Data\" />
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\src\Microsoft.AspNet.SignalR.Hosting.AspNet\Microsoft.AspNet.SignalR.Hosting.AspNet.csproj">
+ <Project>{0e513ae2-bea8-40cf-b9f2-102b351f2fb2}</Project>
+ <Name>Microsoft.AspNet.SignalR.Hosting.AspNet</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\src\Microsoft.AspNet.SignalR.Hosting.Common\Microsoft.AspNet.SignalR.Hosting.Common.csproj">
<Project>{3b71f0ae-d4b6-4f47-bf62-333d45615673}</Project>
<Name>Microsoft.AspNet.SignalR.Hosting.Common</Name>
</ProjectReference>
- <ProjectReference Include="..\..\src\Microsoft.AspNet.SignalR.Server.Routing\Microsoft.AspNet.SignalR.Server.Routing.csproj">
- <Project>{37c04b69-0989-458a-b80c-a1ed574adbe4}</Project>
- <Name>Microsoft.AspNet.SignalR.Server.Routing</Name>
- </ProjectReference>
- <ProjectReference Include="..\..\src\Microsoft.AspNet.SignalR.SqlServer\Microsoft.AspNet.SignalR.SqlServer.csproj">
- <Project>{efcf27ec-cb9b-4f3a-91be-154b8ab5b5e0}</Project>
- <Name>Microsoft.AspNet.SignalR.SqlServer</Name>
- </ProjectReference>
<ProjectReference Include="..\..\src\Microsoft.AspNet.SignalR.Core\Microsoft.AspNet.SignalR.Core.csproj">
<Project>{1B9A82C4-BCA1-4834-A33E-226F17BE070B}</Project>
<Name>Microsoft.AspNet.SignalR.Core</Name>
@@ -10,8 +10,5 @@
<package id="jQuery.Templates" version="0.1" />
<package id="jQuery.UI.Combined" version="1.8.13" />
<package id="json2" version="1.0" />
- <package id="Microsoft.AspNet.Owin" version="0.7" targetFramework="net40" />
- <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net40" />
<package id="Newtonsoft.Json" version="4.5.4" />
- <package id="Owin.Startup" version="0.4" targetFramework="net40" />
</packages>
@@ -1 +1 @@
-<%@ Application Codebehind="Global.asax.cs" Inherits="SignalR.Hosting.AspNet.Samples.Global" Language="C#" %>
+<%@ Application Codebehind="Global.asax.cs" Inherits="Microsoft.AspNet.SignalR.Hosting.AspNet.Samples.Global" Language="C#" %>
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
@@ -45,30 +45,13 @@
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
- <Reference Include="EntityFramework">
- <HintPath>..\..\packages\EntityFramework.4.1.10331.0\lib\EntityFramework.dll</HintPath>
- </Reference>
<Reference Include="HtmlSanitizationLibrary">
<HintPath>..\..\packages\AntiXSS.4.0.1\lib\net35\HtmlSanitizationLibrary.dll</HintPath>
</Reference>
- <Reference Include="Microsoft.AspNet.Owin, Version=0.7.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\packages\Microsoft.AspNet.Owin.0.7\lib\Microsoft.AspNet.Owin.dll</HintPath>
- </Reference>
<Reference Include="Microsoft.CSharp" />
- <Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
- <Private>True</Private>
- </Reference>
- <Reference Include="Microsoft.WebSockets.Owin, Version=0.7.0.0, Culture=neutral, processorArchitecture=MSIL">
- <SpecificVersion>False</SpecificVersion>
- <HintPath>..\..\packages\Microsoft.WebSockets.Owin.0.7\lib\Microsoft.WebSockets.Owin.dll</HintPath>
- </Reference>
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\..\packages\Newtonsoft.Json.4.5.4\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
- <Reference Include="Owin.Startup">
- <HintPath>..\..\packages\Owin.Startup.0.4\lib\net40\Owin.Startup.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Web" />
@@ -234,14 +217,14 @@
<Folder Include="App_Data\" />
</ItemGroup>
<ItemGroup>
+ <ProjectReference Include="..\..\src\Microsoft.AspNet.SignalR.Hosting.AspNet45\Microsoft.AspNet.SignalR.Hosting.AspNet45.csproj">
+ <Project>{6f53f576-0e35-4e89-8d4d-b6b40084a16c}</Project>
+ <Name>Microsoft.AspNet.SignalR.Hosting.AspNet45</Name>
+ </ProjectReference>
<ProjectReference Include="..\..\src\Microsoft.AspNet.SignalR.Hosting.Common\Microsoft.AspNet.SignalR.Hosting.Common.csproj">
<Project>{3b71f0ae-d4b6-4f47-bf62-333d45615673}</Project>
<Name>Microsoft.AspNet.SignalR.Hosting.Common</Name>
</ProjectReference>
- <ProjectReference Include="..\..\src\Microsoft.AspNet.SignalR.Server.Routing\Microsoft.AspNet.SignalR.Server.Routing.csproj">
- <Project>{37c04b69-0989-458a-b80c-a1ed574adbe4}</Project>
- <Name>Microsoft.AspNet.SignalR.Server.Routing</Name>
- </ProjectReference>
<ProjectReference Include="..\..\src\Microsoft.AspNet.SignalR.Core\Microsoft.AspNet.SignalR.Core.csproj">
<Project>{1B9A82C4-BCA1-4834-A33E-226F17BE070B}</Project>
<Name>Microsoft.AspNet.SignalR.Core</Name>
@@ -293,4 +276,4 @@
<Copy SourceFiles="..\..\src\Microsoft.AspNet.SignalR.Client.JS\bin\jquery.signalR.js" DestinationFiles="Scripts\jquery.signalR.js" Condition=" '$(OS)' == 'Windows_NT' " />
<Copy SourceFiles="..\..\src\Microsoft.AspNet.SignalR.Client.JS\bin\jquery.signalR.min.js" DestinationFiles="Scripts\jquery.signalR.min.js" Condition=" '$(OS)' == 'Windows_NT' " />
</Target>
-</Project>
+</Project>
@@ -10,9 +10,5 @@
<package id="jQuery.Templates" version="0.1" />
<package id="jQuery.UI.Combined" version="1.8.13" />
<package id="json2" version="1.0" />
- <package id="Microsoft.AspNet.Owin" version="0.7" targetFramework="net45" />
- <package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
- <package id="Microsoft.WebSockets.Owin" version="0.7" targetFramework="net45" />
<package id="Newtonsoft.Json" version="4.5.4" />
- <package id="Owin.Startup" version="0.4" targetFramework="net45" />
</packages>
@@ -13,6 +13,7 @@
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<RestorePackages>true</RestorePackages>
+ <DisableSigning>true</DisableSigning>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -13,6 +13,7 @@
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
+ <DisableSigning>true</DisableSigning>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -3,4 +3,9 @@
<PropertyGroup Condition="'$(ArtifactsDir)' != ''">
<OutputPath>$(ArtifactsDir)\$(MSBuildProjectName)</OutputPath>
</PropertyGroup>
+ <PropertyGroup Condition="'$(_SignAssembly)' == 'true' And '$(DisableSigning)' != 'true'">
+ <DefineConstants>$(DefineConstants);SIGNED</DefineConstants>
+ <SignAssembly>true</SignAssembly>
+ <DelaySign>true</DelaySign>
+ </PropertyGroup>
</Project>
@@ -18,6 +18,7 @@
<ValidateXaml>true</ValidateXaml>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<RestorePackages>true</RestorePackages>
+ <DisableSigning>true</DisableSigning>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
</PropertyGroup>
<!-- This property group is only here to support building this project using the
@@ -19,6 +19,7 @@
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
+ <DisableSigning>true</DisableSigning>
</PropertyGroup>
<!-- This property group is only here to support building this project using the
MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs
@@ -20,6 +20,7 @@
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
+ <DisableSigning>true</DisableSigning>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -20,6 +20,7 @@
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
+ <DisableSigning>true</DisableSigning>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -3,5 +3,8 @@
[assembly: AssemblyTitle("Microsoft.AspNet.SignalR.Core")]
[assembly: AssemblyDescription("Async signaling library for .NET to help build real-time, multi-user interactive web applications.")]
-[assembly: InternalsVisibleTo("Microsoft.AspNet.SignalR.ScaleOut")]
+#if SIGNED
+[assembly: InternalsVisibleTo("Microsoft.AspNet.SignalR.Tests, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
+#else
[assembly: InternalsVisibleTo("Microsoft.AspNet.SignalR.Tests")]
+#endif
@@ -13,6 +13,7 @@
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
+ <DisableSigning>true</DisableSigning>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -11,8 +11,9 @@
<AssemblyName>Microsoft.AspNet.SignalR.Server.Routing</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
- <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
+ <DisableSigning>true</DisableSigning>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -13,6 +13,7 @@
<FileAlignment>512</FileAlignment>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
<RestorePackages>true</RestorePackages>
+ <DisableSigning>true</DisableSigning>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">

0 comments on commit c508f86

Please sign in to comment.