Skip to content

Can't build BasicTestApp and run Blazor E2E test #60849

Closed
@Regenhardt

Description

@Regenhardt

I'm tying to add an E2E test, but I have difficulties getting everything to build. One of the culprits is BasicTestApp and I suspect that there is a general problem with my setup, something I didn't do that I should have done.

The actual change is in JSInterop, which builds fine. JSInterop.Tests is green too. What am I doing wrong?

Visual Studio: VS Community 17.14.0 Preview 1.1
.NET SDK: 10.0.100-preview.2.25109.3
VS started via startvs.cmd file.

Warning:

'..\..\..\Web.JS\dist\Debug\blazor.webview.js' does not exist and won't be included in the build.

VS build error:

System.InvalidOperationException: No file exists for the asset at either location 'C:\Repo\aspnetcore\src\Components\Web.JS\dist\Debug\blazor.webassembly.js' or 'C:\Repo\aspnetcore\src\Components\Web.JS\dist\Debug\blazor.webassembly.js'.
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.ResolveFile(String identity, String originalItemSpec)
   at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssets.Execute()

Terminal build output:

BasicTestApp failed with 1 error(s) (6.5s)
    C:\Repo\aspnetcore\.dotnet\sdk\10.0.100-preview.2.25109.3\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(109,5): error :
      System.InvalidOperationException: No file exists for the asset at either location 'C:\Repo\aspnetcore\src\Components\Web.JS\dist\Debug\blazor.webassembly.js' or 'C:\Repo\aspnetcore\src\Components\Web.JS\dist\Debug\blazor.webassembly.js'.
         at Microsoft.AspNetCore.StaticWebAssets.Tasks.StaticWebAsset.ResolveFile(String identity, String originalItemSpec)
         at Microsoft.AspNetCore.StaticWebAssets.Tasks.DefineStaticWebAssets.Execute()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs: Author FeedbackThe author of this issue needs to respond in order for us to continue investigating this issue.area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions