找不到Blazor的类型或名称空间名称"App"(您是否缺少using指令或程序集引用?) [英] Blazor the type or namespace name 'App' could not be found (are you missing a using directive or an assembly reference?)
问题描述
我已经在Microsoft Visual Studio Community 2019版本16.1.3中的Blazor中设置了基本应用程序,并且尝试了.NET Core SDK 3.0.100-preview5-011568和SDK 3.0.100-preview6-012264的两个版本
I have setup the basic application in Blazor in Microsoft Visual Studio Community 2019 Version 16.1.3 and I have tried both of the versions of .NET Core SDK 3.0.100-preview5-011568 and SDK 3.0.100-preview6-012264.
我还安装了Blazor扩展,但是当我在不对文件进行任何修改的情况下进行构建时,构建失败并显示以下错误:
Also I have installed the Blazor extension but when I am building without any modification in any files, the build fails with the following error:
找不到类型或名称空间"App".
"The type or namespace "App" could not be found.
任何帮助将不胜感激.谢谢.
Any help will be highly appreciated. Thanks.
推荐答案
要使用Blazor,您需要具有VS2019预览版或通过选中
To use Blazor you need to have VS2019 preview edition or enable preview features on VS2019 by checking
工具->选项->环境->预览功能->使用.NET Core SDK的预览
Tools -> Options -> Environment -> Preview Features -> Use previews of the .NET Core SDK
或在较早版本的VS2019上
or on the older versions of VS2019
工具->选项->项目和解决方案-> .NET Core->使用.NET Core SDK的预览
Tools -> Options -> Projects and Solutions -> .NET Core -> Use previews of the .NET Core SDK
复选框,然后重新加载解决方案并进行构建.
checkbox, then reload the solution and build.
这篇关于找不到Blazor的类型或名称空间名称"App"(您是否缺少using指令或程序集引用?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!