ASP.NET Core 3.0 未在 Visual Studio 2019 上显示 [英] ASP.NET Core 3.0 not showing on Visual Studio 2019

查看:46
本文介绍了ASP.NET Core 3.0 未在 Visual Studio 2019 上显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想测试新的 Blazor 服务器端框架(又名 Razor 组件).

我安装了 Visual Studio 2019 RC,然后安装了 .Net Core 3.0 预览版 2,遵循

这是 dotnet --list-sdks 命令的输出:

编辑

出于某种原因,我安装了 Blazor VSIX 包(WebAssembly - 不完全是我想要的,但我还是安装了它),现在 ASP.NET Core 3.0 直接出现了.但是,仅适用于 blazor 模板:

我不明白.有什么明显的我遗漏了吗?

解决方案

Tools -> Options 中有一个选项可以启用 .NET Core SDK 的预览版本.在 VS Preview 运输渠道中,它处于开启状态(默认情况下,不可设置).在 VS Release 频道中,它默认为关闭,您可以选择加入.

(注意:它在屏幕截图中被禁用,因为我安装了预览版.)

这样做的原因是允许您自定义使用已发布版本的 .NET Core(例如 2.1,当前的 LTS)的项目是否将使用来自尚未发布质量的较新 SDK 的工具.

>

在 16.1 之前,此选项位于工具 -> 选项 -> 项目和解决方案 -> .NET Core 页面上.

I want to test the new Blazor server-side framework (aka Razor Components).

I installed Visual Studio 2019 RC, and then the .Net Core 3.0 preview 2, following this official tutorial.

After the install, I only see the ASP.NET Core 2.0 and the 2.1 on the "Create a new ASP.NET Core Web Application" page. The 3.0 is not showing up.

I started to mess around, trying to install other packages from this page, uninstalled and reinstalled Visual Studio 2019, updated to the .NET Core Preview 3, installed several times the x64 and x86 packages in different orders, copy/paste the .Net Core binaries to random folders and so on. Nothing works. The ASP.NET Core 3.0 does not show up.

Here is what my VS looks like when creating a project (the yellow message appeared latter after some messing around with the packages, so it is not the real problem):

Here is the output of the dotnet --list-sdks command:

EDIT

For some reason, I installed the Blazor VSIX package (the WebAssembly - not exactly what I want, but I installed it anyways) and now the ASP.NET Core 3.0 simply shows up. However, just for the blazor templates:

I don't understand. Is there anything obvious I'm missing?

解决方案

There is an option in Tools -> Options that enables preview versions of the .NET Core SDK. In the VS Preview shipping channel, it is on (by default, and not settable). In the VS Release channel, it defaults to off and you can opt-in.

(Note: it's disabled in the screenshot because I have a Preview build installed.)

The reason for this is to allow you to customize whether a project using a released version of .NET Core (such as 2.1, the current LTS) will use tooling from the newer not-yet-release-quality SDK.

Prior to 16.1, this option was located on the Tools -> Options -> Projects and Solutions -> .NET Core page.

这篇关于ASP.NET Core 3.0 未在 Visual Studio 2019 上显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆