Skip to content

Commit 4a15542

Browse files
author
Ryan Nowak
committed
Workaround for not being able to build in VS
Workaround for: #12653 This isn't a great fix for the this problem but it makes it possible to build the solution. You'll still see errors when you first open the solution but they will go away when VS does a restore. We'll continue the discussion separately about the right fix for this.
1 parent c23b9fe commit 4a15542

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</ItemGroup>
2727

2828
<ItemGroup>
29-
<ProjectReference Condition="'$(BuildNodeJS)' != 'false'" Include="$(RepoRoot)src\Components\Web.JS\Microsoft.AspNetCore.Components.Web.JS.npmproj" ReferenceOutputAssembly="false" />
29+
<ProjectReference Condition="'$(BuildNodeJS)' != 'false' and '$(BuildingInsideVisualStudio)' != 'true'" Include="$(RepoRoot)src\Components\Web.JS\Microsoft.AspNetCore.Components.Web.JS.npmproj" ReferenceOutputAssembly="false" />
3030
<Reference Include="Microsoft.AspNetCore.Components" />
3131
<Reference Include="Microsoft.Extensions.CommandLineUtils.Sources" />
3232
<Reference Include="Microsoft.Extensions.FileProviders.Composite" />

src/Components/Directory.Build.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<!-- Add a project dependency without reference output assemblies to enforce build order -->
1010
<!-- Applying workaround for https://github.com/microsoft/msbuild/issues/2661 and https://github.com/dotnet/sdk/issues/952 -->
1111
<ProjectReference
12-
Condition="'$(ReferenceBlazorBuildLocally)' == 'true' and '$(BuildNodeJS)' != 'false'"
12+
Condition="'$(ReferenceBlazorBuildLocally)' == 'true' and '$(BuildNodeJS)' != 'false' and '$(BuildingInsideVisualStudio)' != 'true'"
1313
Include="$(RepoRoot)src\Components\Web.JS\Microsoft.AspNetCore.Components.Web.JS.npmproj"
1414
ReferenceOutputAssemblies="false"
1515
SkipGetTargetFrameworkProperties="true"

src/Components/Server/src/Microsoft.AspNetCore.Components.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
SkipGetTargetFrameworkProperties="true"
3030
UndefineProperties="TargetFramework"
3131
Private="false"
32-
Condition="'$(BuildNodeJS)' != 'false'" />
32+
Condition="'$(BuildNodeJS)' != 'false' and '$(BuildingInsideVisualStudio)' != 'true'" />
3333
</ItemGroup>
3434

3535
<PropertyGroup>

0 commit comments

Comments
 (0)