Skip to content

Commit

Permalink
Fixing Signing issues (#3104)
Browse files Browse the repository at this point in the history
* fixing signing issues

* signing issues and project search

* adding the right properties for signing that were left

* more updates for delay sign

* fx signing running test earlier
  • Loading branch information
shahabhijeet authored Apr 19, 2017
1 parent 4352356 commit 6c2113e
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 34 deletions.
2 changes: 1 addition & 1 deletion build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Target Name="Restore" DependsOnTargets="$(RestoreTraversedProjectsDependsOn)" />
<Target Name="Build" DependsOnTargets="$(BuildTraversedProjectsDependsOn)" />
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />
<Target Name="FullBuild" DependsOnTargets="Clean;Build;RunTests;Package" />
<Target Name="FullBuild" DependsOnTargets="Clean;Build" />
<Target Name="RunTests" DependsOnTargets="$(RunTestProjectsDependsOn)" />
<Import Project="Directory.Build.targets" />
</Project>
6 changes: 6 additions & 0 deletions src/SDKs/AzSdk.reference.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
<PackageReference Include="Microsoft.Rest.ClientRuntime.Azure" Version="[3.3.5,4.0.0)" />
<PackageReference Include="Microsoft.Rest.ClientRuntime" Version="[2.3.6,3.0.0)" />
</ItemGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<NoWarn>1591;1701;1573</NoWarn>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
<!--
Expand Down
6 changes: 6 additions & 0 deletions src/SDKs/AzSdk.test.reference.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@
<!-- This is needed for discovering tests in test explorer -->
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
</ItemGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<NoWarn>1591;1701;1573</NoWarn>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions src/SDKs/dirs.proj
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Compute\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)ContainerRegistry\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)CustomerInsights\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)DataLake.Analytics\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)DataLake.Store\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)DataLake.Analytics\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)DevTestLabs\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Dns\Management.Dns\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)EventHub\**\*Tests.csproj" ProjectType="Test"/>
Expand Down Expand Up @@ -99,6 +98,7 @@
</ItemGroup>

<!--
<ProjectToBuild Include="$(MSBuildThisFileDirectory)DataLake.Store\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Monitor\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)RecoveryServices\**\*Tests.csproj" ProjectType="Test"/>
<ProjectToBuild Include="$(MSBuildThisFileDirectory)Search\DataPlane\**\*Tests.csproj" ProjectType="Test"/>
Expand Down
29 changes: 3 additions & 26 deletions tools/buildTargets/common.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,11 @@
<AddNugetReferenceForCIandCmdlineBuild>true</AddNugetReferenceForCIandCmdlineBuild>
<SkipBuildingTestProject>false</SkipBuildingTestProject>
<!-- <DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences> -->
</PropertyGroup>

<PropertyGroup Label="DebugBuildOptions" Condition=" '$(Configuration)|$(Platform)'=='Debug|AnyCPU' ">
<SignAssembly>true</SignAssembly>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>
<PropertyGroup Label="ReleaseBuildOptions" Condition=" '$(Configuration)|$(Platform)'=='Release|AnyCPU' ">
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>$(LibraryToolsFolder)\MSSharedLibKey.snk</AssemblyOriginatorKeyFile>
<NoWarn>1591</NoWarn>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='net452' ">
<DefineConstants>FullNetFx</DefineConstants>
<OutputPath>bin\$(Configuration)\</OutputPath>
<GenerateDocumentationFile Condition=" '$(GenerateDocumentationFile)' == '' ">true</GenerateDocumentationFile>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
<DefineConstants>NETSTANDARD14</DefineConstants>
<OutputPath>bin\$(Configuration)\</OutputPath>
<GenerateDocumentationFile Condition=" '$(GenerateDocumentationFile)' == '' ">true</GenerateDocumentationFile>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<NoWarn>1591;1701;1573</NoWarn>
</PropertyGroup>

<Choose>
<When Condition=" '$(BuildingInsideVisualStudio)' == 'true' ">
Expand Down
7 changes: 4 additions & 3 deletions tools/buildTargets/common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
PreBuildStaticAnalysis;
RestoreLatestProjects;
BuildLatestProjects;
Test
PreSign;
</BuildTraversedProjectsDependsOn>
<RestoreTraversedProjectsDependsOn>
Expand Down Expand Up @@ -119,7 +120,7 @@
</ItemGroup>

<Message Text="Final Tests to run.... @(FinalTestsToRun)" />
<Exec Command="dotnet test %(FinalTestsToRun.Identity) -l trx;LogFileName=$(LibraryRoot)TestResults\%(FinalTestsToRun.Filename).trx --no-build" Condition="@(FinalTestsToRun) != ''" ContinueOnError="false" WorkingDirectory="%(FinalTestsToRun.RootDir)%(FinalTestsToRun.Directory)" />
<Exec Command="dotnet test %(FinalTestsToRun.Identity) -l trx;LogFileName=$(LibraryRoot)TestResults\%(FinalTestsToRun.Filename).trx " Condition="@(FinalTestsToRun) != ''" ContinueOnError="false" WorkingDirectory="%(FinalTestsToRun.RootDir)%(FinalTestsToRun.Directory)" />
</Target>

<Target Name="Package">
Expand Down Expand Up @@ -174,8 +175,8 @@
<KVSamples Include="$(LibrarySourceFolder)\SDKs\KeyVault\dataPlane\Microsoft.Azure.KeyVault.Samples\**\*.*csproj"/>
</ItemGroup>
<ItemGroup Condition=" '$(Scope)' != 'All'">
<ScopedProjects Include="$(LibrarySourceFolder)\$(Scope)\*.csproj" Exclude="$(LibrarySourceFolder)\$(Scope)\*.Test*.csproj" />
<ScopedTestProjects Include="$(LibrarySourceFolder)\$(Scope)\*.Test*.csproj" />
<ScopedProjects Include="$(LibrarySourceFolder)\$(Scope)\**\*.csproj" Exclude="$(LibrarySourceFolder)\$(Scope)\*Tests*\*.Test*.csproj" />
<ScopedTestProjects Include="$(LibrarySourceFolder)\$(Scope)\*Test*\*.Test*.csproj" />
</ItemGroup>
<ItemGroup>
<SDKProject Include="%(ScopedProjects.Identity)" Condition=" '%(ScopedProjects.ProjectType)' != 'Test' and '%(ScopedProjects.ExcludeFromBuild)' != 'true' "/>
Expand Down
4 changes: 2 additions & 2 deletions tools/buildTargets/signing.targets
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
WindowsSdkPath="$(WindowsSdkPath)"
Assembly="%(DelaySignedAssembliesToValidate.Identity)"
ExpectedTokenSignature="$(StrongNameToken)"
ExpectedDelaySigned="false"
ExpectedDelaySigned="true"
ContinueOnError="false"
Condition="'@(DelaySignedAssembliesToValidate)' != ''"/>

Expand All @@ -37,7 +37,7 @@
WindowsSdkPath="$(WindowsSdkPath)"
Assembly="%(DelaySignedAssembliesToValidate.Identity)"
ExpectedTokenSignature="$(StrongNameToken)"
ExpectedDelaySigned="true"
ExpectedDelaySigned="false"
ContinueOnError="false"
Condition="'$(CodeSign)' == 'true' and '@(DelaySignedAssembliesToValidate)' != ''"/>
</Target>
Expand Down

0 comments on commit 6c2113e

Please sign in to comment.