Try different MSBuild things to make build work (#17427)

Fixes https://github.com/aspnet/AspNetCore/issues/17418
This commit is contained in:
Pranav K 2019-11-26 16:42:55 -08:00 committed by GitHub
parent 6c961ae4e2
commit 3c6dc1c516
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 2 deletions

View File

@ -20,6 +20,14 @@
<Reference Include="Microsoft.AspNetCore.Blazor.Mono" />
</ItemGroup>
<Target Name="_BuildBlazorBuildProject" BeforeTargets="ResolveProjectReferences">
<!--
The Blazor.Build project cross-compiles and we need the output of all TFMs to be available in the build output.
We can't represent this in any good way using ProjectReference elements, but we can try and build it instead.
-->
<MSBuild Projects="$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Blazor.Build.csproj" />
</Target>
<!-- This is used as a P2P when building the repo. Normal Blazor projects will get this as a reference through the Blazor.Build package -->
<ItemGroup>
<!-- Ensures these projects are built before the consuming project, but without
@ -27,9 +35,8 @@
given that the packed version of this project wouldn't add a .dll reference) -->
<ProjectReference Include="$(MSBuildThisFileDirectory)Microsoft.AspNetCore.Blazor.Build.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<!-- Optimization. Do not require framework compatibility between these projects. -->
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
<UndefineProperties>TargetFramework</UndefineProperties>
<Properties>TargetFramework=$(DefaultNetCoreTargetFramework)</Properties>
</ProjectReference>
<ProjectReference Include="$(MSBuildThisFileDirectory)..\..\DevServer\src\Microsoft.AspNetCore.Blazor.DevServer.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>