Skip to content

Try different MSBuild things to make build work #17427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/Components/Blazor/Build/src/ReferenceFromSource.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,23 @@
<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
adding a runtime dependency on the .dll (to be equivalent to a <PackageDependency>
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>
Expand Down