Skip to content

Errors when trying to publish .NET 6 Preview 6 Blazor WASM application to Azure Storage from VS 2019 Preview #34353

Closed
@tholtermann

Description

@tholtermann

Prior to .NET 6 preview we were able to publish our Blazor WASM application to a folder from VS 2019 preview and copy the published files over to Azure storage. Then we could run the app from Azure Storage.

The publish settings are:

image

With .NET 6 preview (6.0.100-preview.6.21355.2), these same steps cause the following errors.

  1. Severity Code Description Project File Line Suppression State
    Error Assets file ‘….\obj\publish\browser-wasm\project.assets.json’ doesn’t have a target for ‘net6.0’. Ensure that restore has run and that you have included ‘net6.0’ in the TargetFrameworks for your projec

  2. Severity Code Description Project File Line Suppression State
    Error The imported project “C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\microsoft.netcore.app.runtime.mono.browser-wasm\6.0.0-preview.6.21352.12\runtimes\browser-wasm\native\src\Emcc.props” was not found. Confirm that the expression in the Import declaration “C:\Program Files %28×86%29\Microsoft Visual Studio\2019\Preview\Common7\IDE\microsoft.netcore.app.runtime.mono.browser-wasm\6.0.0-preview.6.21352.12\runtimes\browser-wasm\native\src\Emcc.props” is correct, and that the file exists on disk.

Note: If I change the publish settings to use "framework-dependent" for Deployment Mode and "Portable" for Target Runtime then the .NET 6 project will publish to the folder. However, are these ideal when deploying to Azure Storage? Shouldn't this be deployed as "Self-contained" and "browser-wasm"?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions