Skip to content

Commit c1cc586

Browse files
committed
Fixup build failures
1 parent 5ff734d commit c1cc586

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

src/Components/Blazor/Build/src/Microsoft.AspNetCore.Blazor.Build.csproj

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,16 @@
2727
</ItemGroup>
2828

2929
<ItemGroup>
30-
<ProjectReference Condition="'$(BuildNodeJS)' != 'false' and '$(BuildingInsideVisualStudio)' != 'true'"
30+
<!-- Add a project dependency without reference output assemblies to enforce build order -->
31+
<!-- Applying workaround for https://github.com/microsoft/msbuild/issues/2661 and https://github.com/dotnet/sdk/issues/952 -->
32+
<ProjectReference
3133
Include="$(RepoRoot)src\Components\Web.JS\Microsoft.AspNetCore.Components.Web.JS.npmproj"
32-
ReferenceOutputAssembly="false"
34+
ReferenceOutputAssemblies="false"
3335
SkipGetTargetFrameworkProperties="true"
34-
UndefineProperties="TargetFramework" />
36+
UndefineProperties="TargetFramework"
37+
Private="false"
38+
Condition="'$(BuildNodeJS)' != 'false' and '$(BuildingInsideVisualStudio)' != 'true'" />
39+
3540
<Reference Include="Microsoft.Build.Framework" ExcludeAssets="Runtime" />
3641
<Reference Include="Microsoft.Build.Utilities.Core" ExcludeAssets="Runtime" />
3742
<Reference Include="System.Reflection.Metadata" Condition="'$(TargetFramework)' == 'net46'" />

src/Components/Blazor/Build/src/targets/Blazor.MonoRuntime.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757

5858
<ItemGroup>
5959
<MonoWasmFile Include="$(DotNetWebAssemblyRuntimePath)*" />
60-
<BlazorJSFile Include="$(BlazorJsPath)" />
61-
<BlazorJSFile Include="$(BlazorJSMapPath)" />
60+
<BlazorJSFile Include="$(BlazorJSPath)" />
61+
<BlazorJSFile Include="$(BlazorJSMapPath)" Condition="Exists('$(BlazorJSMapPath)')" />
6262

6363
<BlazorOutputWithTargetPath Include="@(MonoWasmFile)">
6464
<TargetOutputPath>$(BlazorRuntimeWasmOutputPath)%(FileName)%(Extension)</TargetOutputPath>

src/Components/Web.JS/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
node_modules/
22
dist/Debug/
3-
dist/Release/blazor.webassembly.js

src/Components/Web.JS/Microsoft.AspNetCore.Components.Web.JS.npmproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
Private="false" />
2222
</ItemGroup>
2323

24+
<Target Name="GetTargetPath" />
25+
2426
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), Directory.Build.targets))\Directory.Build.targets" />
2527

2628
</Project>

src/Components/Web.JS/dist/Release/blazor.server.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/dist/Release/blazor.webassembly.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)