We have created the blazor(client side) project in visual studio 2019 and run the application.
It throws the build error as
The type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?)
1>Done building project "WebApplication1.csproj" -- FAILED.
Note: We didn't add any of our codes in created project, we just build the created project and facing the above issue.
Steps to reproduce the behavior:
For your reference, we have attached the created sample below
out Visual studio version: VS 2019 (16.0.2)
.net core preview 4 installed
Blazor extensions installed
Can you please suggest how to resolve this issue in our side?
You need latest preview version of VS to work with Blazor. Now it is 16.1.0 Preview 2.0.
The latest VS 2019 preview is _not_ needed. The issue (at least as of today, May 6, 2019) is that the .NET Core v3.0.100-preview5 needs to be installed. Go to https://dotnet.microsoft.com/download/dotnet-core/3.0 and click the .NET Core Installer link under Windows.
Then, you can build Blazor apps in both VS 2019 16.1.0 Preview and VS 2019 16.0.3 (non-preview), although using the non-preview version requires selecting the "Use previews of the .NET Core SDK" checkbox under .NET Core in Tools > Options.
Hope this helps!
The latest VS 2019 preview is not needed
I'm afraid this is incorrect. The latest preview is needed to get the correct tooling experience.
Closing as this will not occur with the correct version of VS.
For those of you coming late to the party, the "Use previews of the .NET Core SDK" checkbox has now moved to "Tools -> Options -> Environment -> Preview Features"
as per: https://developercommunity.visualstudio.com/content/problem/576973/use-previews-of-the-net-core-sdk-checkbox-is-now-m.html
You need latest _preview_ version of VS to work with Blazor. Now it is 16.1.0 Preview 2.0.
What about Visual Code? Any ideas?
Most helpful comment
For those of you coming late to the party, the "Use previews of the .NET Core SDK" checkbox has now moved to "Tools -> Options -> Environment -> Preview Features"
as per: https://developercommunity.visualstudio.com/content/problem/576973/use-previews-of-the-net-core-sdk-checkbox-is-now-m.html