Uno: WASM head not running in VS 2019 with default template

Created on 5 Oct 2019  路  5Comments  路  Source: unoplatform/uno

Current behavior

Started a new project in VS 2019 16.3.2 with the default Uno platform app project. Am able to run Android and UWP heads, but WASM head fails to load in Firefox and new Edge. In new Edge, clearly get this error message:

An error occurred while starting the application.
DirectoryNotFoundException: C:\code\LD45\TheProjectName\TheProjectName.Wasm\bin\Debug\netstandard2.0\dist\
Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(string root, ExclusionFilters filters)

DirectoryNotFoundException: C:\code\LD45\TheProjectName\TheProjectName.Wasm\bin\Debug\netstandard2.0\dist\
Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(string root, ExclusionFilters filters)
Uno.Wasm.Bootstrap.Cli.Server.Startup.Configure(IApplicationBuilder app, IConfiguration configuration) in Startup.cs
Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()

Show raw exception details
.NET Core 4.6.28008.01 X64 v4.0.0.0    |   Microsoft.AspNetCore.Hosting version 2.2.0-rtm-35687    |    Microsoft Windows 10.0.17763

Verified that dist directory indeed doesn't exist.

Expected behavior

Base template to run 'Hello, World!' example.

How to reproduce it (as minimally and precisely as possible)

See above.

Environment

VS 2019 16.3.2
Windows 10 v17763.737

Uno Template Package: 1.45.0.1865

Affected platform(s):

  • [ ] iOS
  • [ ] Android
  • [x] WebAssembly
  • [ ] Windows
  • [ ] Build tasks

Visual Studio

  • [ ] 2017 (version: )
  • [x] 2019 (version: 16.3.2)
  • [ ] for Mac (version: )

Relevant plugins

  • [ ] Resharper (version: )

Anything else we need to know?

kinbug triagduplicate

Most helpful comment

Ah, this is related/possible duplicate of #1376. I had .NET Core 2.2 installed but for VS 2017, you apparently need a different version of the SDK for VS 2019. So, once I installed that version of the .NET Core 2.2 SDK, I was able to run the sample.

All 5 comments

Ah, this is related/possible duplicate of #1376. I had .NET Core 2.2 installed but for VS 2017, you apparently need a different version of the SDK for VS 2019. So, once I installed that version of the .NET Core 2.2 SDK, I was able to run the sample.

I was also previously prompted to install the .NET 4.6.2 developer pack, but that showed up in the output with a link.

I can confirm that fixed the issue for me as well on VS 2019

Ugh, that's no good folks. Thanks for letting us know that you ran into problems. Now that UnoConf is over I'll pickup https://github.com/unoplatform/uno/pull/1384 once again. Closing as duplicate of existing.

If you see any inaccuracies in the getting started documentation, please send in a pull-request btw :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MartinZikmund picture MartinZikmund  路  3Comments

PylotLight picture PylotLight  路  3Comments

MelbourneDeveloper picture MelbourneDeveloper  路  3Comments

chrisevans9629 picture chrisevans9629  路  4Comments

SuperJMN picture SuperJMN  路  3Comments