Skip to content

Commit

Permalink
Enable and disable skip strong name
Browse files Browse the repository at this point in the history
Add build targets:
  EnableSkipStrongNames
  DisableSkipStrongNames
Allow run sample with delay signed product assemblies.
  • Loading branch information
congysu committed Nov 10, 2014
1 parent 7c44bd7 commit ebed566
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
1 change: 1 addition & 0 deletions .nuget/NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
</solution>
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="buildTools" value="https://www.myget.org/F/30de4ee06dd54956a82013fa17a3accb/" />
</packageSources>
</configuration>
4 changes: 4 additions & 0 deletions .nuget/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.SkipStrongNames" version="1.0.0" />
</packages>
23 changes: 23 additions & 0 deletions DomainFramework.msbuild
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="tools\DF.tasks.targets"/>
<UsingTask TaskName="SkipStrongNames.CheckSkipStrongNamesStatus" AssemblyFile="$(SkipStrongNamesExe)" />

<ItemGroup>
<SolutionsToBuild Include="DomainFramework.sln">
Expand All @@ -13,8 +14,30 @@
<NuGetFolder>.nuget</NuGetFolder>
<NuGetExe>$(NuGetFolder)\NuGet.exe</NuGetExe>
<CodeAnalysis Condition=" '$(CodeAnalysis)' == '' and '$(Configuration)' != 'Release' ">true</CodeAnalysis>
<SkipStrongNamesExe>$(MSBuildThisFileDirectory)packages\Microsoft.Web.SkipStrongNames.1.0.0\tools\SkipStrongNames.exe</SkipStrongNamesExe>
<SkipStrongNamesXml>$(MSBuildThisFileDirectory)tools\SkipStrongNames.xml</SkipStrongNamesXml>
</PropertyGroup>

<Target Name="RestoreSkipStrongNames" DependsOnTargets="DownloadNuGet">
<Exec Command='"$(NuGetExe)" restore .nuget\packages.config -PackagesDirectory packages -NonInteractive -Verbosity detailed -ConfigFile .nuget\NuGet.Config' />
</Target>

<Target Name="EnableSkipStrongNames" DependsOnTargets="RestoreSkipStrongNames">
<Exec Command='"$(SkipStrongNamesExe)" -e "$(SkipStrongNamesXml)"' />
<CheckSkipStrongNamesStatus AssembliesFile="$(SkipStrongNamesXml)">
<Output TaskParameter="Status" PropertyName="Status" />
</CheckSkipStrongNamesStatus>
<Message Text="SkipStrongNames: $(Status)" Importance="High" />
</Target>

<Target Name="DisableSkipStrongNames" DependsOnTargets="RestoreSkipStrongNames">
<Exec Command='"$(SkipStrongNamesExe)" -d "$(SkipStrongNamesXml)"' />
<CheckSkipStrongNamesStatus AssembliesFile="$(SkipStrongNamesXml)">
<Output TaskParameter="Status" PropertyName="Status" />
</CheckSkipStrongNamesStatus>
<Message Text="SkipStrongNames: $(Status)" Importance="High" />
</Target>

<Target Name="DownloadNuGet" Condition=" '$(NotDownloadNuget)' != 'true' ">
<DownloadNuGet Condition="" OutputFileName="$(NuGetExe)" MinimumVersion="2.7.0" />
</Target>
Expand Down
8 changes: 8 additions & 0 deletions tools/SkipStrongNames.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<assemblies defaultPublicKeyToken="31bf3856ad364e35">
<assembly name="Microsoft.Data.Domain"/>
<assembly name="Microsoft.Data.Domain.Conventions"/>
<assembly name="Microsoft.Data.Domain.EntityFramework"/>
<assembly name="Microsoft.Data.Domain.Security"/>
<assembly name="System.Web.OData.Domain"/>
</assemblies>

0 comments on commit ebed566

Please sign in to comment.