diff --git a/build/CodeSign.props b/build/CodeSign.props new file mode 100644 index 0000000000..8a8b7c9b0e --- /dev/null +++ b/build/CodeSign.props @@ -0,0 +1,278 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/build/CodeSign.targets b/build/CodeSign.targets new file mode 100644 index 0000000000..f42dcd8afc --- /dev/null +++ b/build/CodeSign.targets @@ -0,0 +1,53 @@ + + + + $(CodeSignDependsOn);CollectFileSignInfo + + + + + <_RepositoryProject Remove="@(_RepositoryProject)" /> + <_RepositoryProject Include="$(MSBuildProjectFullPath)" Condition="'%(Repository.Identity)' != ''"> + RepositoryRoot=%(Repository.RootPath) + %(Repository.Build) + + + + + + AssemblySigningCertName=$(AssemblySigningCertName); + AssemblySigning3rdPartyCertName=$(AssemblySigning3rdPartyCertName); + PowerShellSigningCertName=$(PowerShellSigningCertName); + PackageSigningCertName=$(PackageSigningCertName); + VsixSigningCertName=$(VsixSigningCertName); + JarSigningCertName=$(JarSigningCertName); + ArtifactsDir=$(ArtifactsDir); + BuildDir=$(BuildDir) + + + + + + + + + + <_FilesToSign Include="@(_RepoFileSignInfo)" Condition="'%(_RepoFileSignInfo.IsFileToSign)' == 'true' AND ('$(_ReposWereBuilt)' == 'true' OR '%(_RepoFileSignInfo.Container)' != '' ) " /> + + + + + + + + + + + <_FileSignInfo Include="@(FilesToSign)" IsFileToSign="true" /> + <_FileSignInfo Include="@(FilesToExcludeFromSigning)" IsFileToExcludeFromSign="true" /> + + + diff --git a/build/RepositoryBuild.targets b/build/RepositoryBuild.targets index 9014f33209..f3c6920044 100644 --- a/build/RepositoryBuild.targets +++ b/build/RepositoryBuild.targets @@ -35,6 +35,7 @@ Properties="BuildGroup=%(BatchedRepository.BuildGroup);BuildNumber=$(BuildNumber);IsFinalBuild=$(IsFinalBuild);Configuration=$(Configuration)" /> + <_ReposWereBuilt>true <_NoBuildRepos>true @@ -80,7 +81,8 @@ $(RepositoryBuildArguments) /p:DotNetRestoreSourcePropsPath=$(GeneratedRestoreSourcesPropsPath) $(RepositoryBuildArguments) /p:DotNetPackageVersionPropsPath=$(GeneratedPackageVersionPropsPath) - $(RepositoryBuildArguments) /p:SignType=$(SignType) + + $(RepositoryBuildArguments) /p:SignType= $(RepositoryBuildArguments) /p:BuildNumber=$(BuildNumber) $(RepositoryBuildArguments) /p:Configuration=$(Configuration) $(RepositoryBuildArguments) /p:IsFinalBuild=$(IsFinalBuild) diff --git a/build/SharedFx.targets b/build/SharedFx.targets index 84a2da2728..1fce8b8d9f 100644 --- a/build/SharedFx.targets +++ b/build/SharedFx.targets @@ -4,6 +4,9 @@ $(RepositoryRoot)src\Framework\Framework.UnitTests\Framework.UnitTests.csproj $([MSBuild]::NormalizePath($(UnitTestFxProject))) + $(CodeSignDependsOn);GetSharedFxFilesToSign + _BuildSharedFxProjects;TestSharedFx + $(BuildSharedFxDependsOn);CodeSign @@ -14,7 +17,19 @@ - + + + + + + + + + + + + + diff --git a/build/repo.props b/build/repo.props index f96923abea..9c9564fd8e 100644 --- a/build/repo.props +++ b/build/repo.props @@ -57,4 +57,5 @@ + diff --git a/build/repo.targets b/build/repo.targets index cfb9044bab..498ff1fa6f 100644 --- a/build/repo.targets +++ b/build/repo.targets @@ -4,6 +4,7 @@ + @@ -16,7 +17,7 @@ $(CleanDependsOn);CleanArtifacts;CleanRepoArtifacts $(RestoreDependsOn);InstallDotNet $(CompileDependsOn);BuildRepositories;BuildSharedFx - $(PackageDependsOn);CheckExpectedPackagesExist + $(PackageDependsOn);CheckExpectedPackagesExist;CodeSign $(TestDependsOn);_TestRepositories $(GetArtifactInfoDependsOn);ResolveRepoInfo @@ -34,11 +35,17 @@ $(DesignTimeBuildProps);MicrosoftNETCoreApp20PackageVersion=$(MicrosoftNETCoreApp20PackageVersion); - + <_RepositoryProject Include="$(MSBuildProjectFullPath)" Condition="'%(Repository.Identity)' != ''"> + RepositoryRoot=%(Repository.RootPath) + %(Repository.Build) + + + + + Properties="$(DesignTimeBuildProps);Configuration=$(Configuration);BuildNumber=$(BuildNumber);DesignTimeBuild=true;" + BuildInParallel="true"> @@ -46,17 +53,18 @@ Targets="GetArtifactInfo" Properties="$(DesignTimeBuildProps);Configuration=$(Configuration);BuildNumber=$(BuildNumber);DesignTimeBuild=true" SkipNonexistentTargets="true" - Condition="'@(ProjectToBuild)' != ''"> + BuildInParallel="true"> - - - + BuildInParallel="true" + Condition="@(_RepositoryProject->Count()) != 0"> + +