Avoid importing incompatible .props files for signing build

(cherry picked from commit c2ca512189)
This commit is contained in:
Daniel Plaisted 2017-09-05 15:10:15 -07:00 committed by Nick Guerrera
parent faca86fe62
commit 0586375cf8
2 changed files with 25 additions and 11 deletions

View file

@ -36,9 +36,6 @@ tools\TestAssetsDependencies\TestAssetsDependencies.csproj
<Import Project="build/BranchInfo.props" />
<Import Project="build/BundledTools.props" />
<Import Project="build/BundledSdks.props" />
<Import Project="build/BundledTemplates.props" />
<Import Project="build/DependencyVersions.props" />
<Import Project="build/Version.props" />
<Import Project="build/Branding.props" />
@ -49,13 +46,23 @@ tools\TestAssetsDependencies\TestAssetsDependencies.csproj
<Import Project="build/MSBuildExtensions.props" />
<Import Project="build/SetupPreviousStage.props" />
<Import Project="build/OutputDirectories.props" />
<Import Project="build/BuildDefaults.props" />
<Import Project="build/VersionBadge.props" />
<Import Project="build/BundledRuntimes.props" />
<Import Project="build/CrossGen.props" />
<Import Project="build/BackwardsCompatibilityRuntimes.props" />
<Import Project="build/AzureInfo.props" />
<Import Project="build/InstallerInfo.props" />
<Import Project="build/GenerateResxSource.targets" />
<ImportGroup Condition=" '$(BuildingSigningProject)' != 'true' ">
<!-- These imports aren't required for signing, and some of them have syntax which isn't supported in MSBuild 14,
which is what the signing build uses -->
<Import Project="build/BundledTools.props" />
<Import Project="build/BundledSdks.props" />
<Import Project="build/BundledTemplates.props" />
<Import Project="build/BuildDefaults.props" />
<Import Project="build/VersionBadge.props" />
<Import Project="build/BundledRuntimes.props" />
<Import Project="build/CrossGen.props" />
<Import Project="build/BackwardsCompatibilityRuntimes.props" />
<Import Project="build/AzureInfo.props" />
<Import Project="build/InstallerInfo.props" />
<Import Project="build/GenerateResxSource.targets" />
</ImportGroup>
</Project>

View file

@ -1,5 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project InitialTargets="SetSigningProperties" DefaultTargets="SignFiles" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<!-- The signing infrastructure runs using MSBuild 14, which doesn't support some of the new syntax we're using. So set the BuildingSingingProject
property here to avoid importing files we don't need for signing which would cause errors if imported when using MSBuild 14. -->
<BuildingSigningProject>true</BuildingSigningProject>
</PropertyGroup>
<Import Project="..\dir.props" />
<Import Project="MicroBuild.props" />
<Import Project="$(MicroBuildPropsAndTargetsPath)MicroBuild.Core.props" />