Provide a way to not include the SDK Resolver

When building the entire stack for a non windows target, the windows
resolver packages will not be present (and in the case of a windows
build, you'd only have one architecture anyway). Provide a way to opt
out of including the resolver. It's only interesting for Visual
Studio insertion cases, which is something the community at large
doesn't need to worry about.
This commit is contained in:
Matt Ellis 2017-05-11 17:58:28 -07:00 committed by Nick Guerrera
parent 0b1a5b10c2
commit 428d541627
3 changed files with 6 additions and 3 deletions

View file

@ -5,6 +5,7 @@
<IncludeNuGetPackageArchive Condition=" '$(IncludeNuGetPackageArchive)' == '' ">true</IncludeNuGetPackageArchive>
<SkipBuildingInstallers Condition=" '$(SkipBuildingInstallers)' == '' ">false</SkipBuildingInstallers>
<IncludeAspNetCoreRuntime Condition="'$(IncludeAspNetCoreRuntime)' == ''">true</IncludeAspNetCoreRuntime>
<IncludeMSBuildSdkResolver Condition="'$(IncludeMSBuildSdkResolver)' == ''">true</IncludeMSBuildSdkResolver>
<UsePortableLinuxSharedFramework Condition=" '$(UsePortableLinuxSharedFramework)' == '' AND '$(OSPlatform)' == 'linux' ">true</UsePortableLinuxSharedFramework>
<IncludeSharedFrameworksForBackwardsCompatibilityTests Condition=" $(IncludeSharedFrameworksForBackwardsCompatibilityTests) == '' AND '$(Rid)' != 'linux-x64' ">true</IncludeSharedFrameworksForBackwardsCompatibilityTests>
<HighEntropyVA>true</HighEntropyVA>

View file

@ -14,11 +14,12 @@
Targets="Publish" />
<!-- Build MSBuildSdkResolver for all target frameworks (so we can build and test it x-plat) -->
<MSBuild Projects="$(SrcDirectory)/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj" />
<MSBuild Projects="$(SrcDirectory)/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj"
Condition="'$(IncludeMSBuildSdkResolver)' != 'false'" />
<!-- Publish MSBuildSdkResolver for net46 (to prepare it for the VS insertion nupkg packaging) -->
<MSBuild Projects="$(SrcDirectory)/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj"
Condition="'$(OS)' == 'Windows_NT'"
Condition="'$(IncludeMSBuildSdkResolver)' == 'true' and '$(OS)' == 'Windows_NT'"
Properties="TargetFramework=net46"
Targets="Publish" />
</Target>

View file

@ -68,7 +68,8 @@
<Target Name="SetupRestoreSrcPackagesInputsOutputs">
<ItemGroup>
<RestoreSrcPackagesInput Include="$(RepoRoot)/src/**/*.csproj" Exclude="$(RepoRoot)/src/**/%24projectName%24.csproj"/>
<RestoreSrcPackagesInput Include="$(RepoRoot)/src/**/*.csproj" Exclude="$(RepoRoot)/src/**/%24projectName%24.csproj" />
<RestoreSrcPackagesInput Remove="$(RepoRoot)/src/Microsoft.DotNet.MSBuildSdkResolver/Microsoft.DotNet.MSBuildSdkResolver.csproj" Condition="'$(IncludeMSBuildSdkResolver)' == 'false'" />
</ItemGroup>
</Target>