diff --git a/build/CodeSign.props b/build/CodeSign.props new file mode 100644 index 0000000000..5da99c0af1 --- /dev/null +++ b/build/CodeSign.props @@ -0,0 +1,285 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 ac35ac9606..c6adf74217 100644 --- a/build/RepositoryBuild.targets +++ b/build/RepositoryBuild.targets @@ -34,6 +34,7 @@ Properties="BuildGroup=%(BatchedRepository.BuildGroup);BuildNumber=$(BuildNumber);IsFinalBuild=$(IsFinalBuild);Configuration=$(Configuration)" /> + <_ReposWereBuilt>true <_NoBuildRepos>true @@ -79,7 +80,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..1310977f3d 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,16 @@ - + + + + + + + + + + diff --git a/build/repo.props b/build/repo.props index 0e6bae96c6..03d0f44095 100644 --- a/build/repo.props +++ b/build/repo.props @@ -58,4 +58,5 @@ + diff --git a/build/repo.targets b/build/repo.targets index ae5cdc3aec..0f7af1e464 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 @@ -35,11 +36,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"> @@ -47,17 +54,18 @@ Targets="GetArtifactInfo" Properties="$(DesignTimeBuildProps);Configuration=$(Configuration);BuildNumber=$(BuildNumber);DesignTimeBuild=true" SkipNonexistentTargets="true" - Condition="'@(ProjectToBuild)' != ''"> + BuildInParallel="true"> - - - + BuildInParallel="true" + Condition="@(_RepositoryProject->Count()) != 0"> + +