无法在.NET Framework 4.7中创建项目

时间:2022-07-09 20:41:59

I'm trying to create a new Azure WebJobs project targeting .NET Framework 4.7 but it's not available in the drop down -- see below:

我正在尝试创建一个针对.NET Framework 4.7的新Azure WebJobs项目,但它在下拉列表中不可用 - 请参阅下文:

无法在.NET Framework 4.7中创建项目

And if I try to install .NET Framework 4.7, I get the message that it's already installed on my computer -- see below: 无法在.NET Framework 4.7中创建项目

如果我尝试安装.NET Framework 4.7,我会收到它已经安装在我的计算机上的消息 - 见下文:

Any idea why?

知道为什么吗?

P.S. This may or may not be relevant but my ultimate objective is to create a WebJob that can use class libraries that are created in .NET Core 2.0. If I understand it correctly, .NET Framework 4.7 can use class libraries that support .NET Standard 2.0. I didn't necessarily do anything special when I created my class libraries in .NET Core 2.0. Not sure if I should assume they automatically target .NET Standard 2.0 or I need to specify it somewhere.

附:这可能相关也可能不相关,但我的最终目标是创建一个可以使用在.NET Core 2.0中创建的类库的WebJob。如果我理解正确,.NET Framework 4.7可以使用支持.NET Standard 2.0的类库。当我在.NET Core 2.0中创建类库时,我没有必要做任何特别的事情。不确定我是否应该假设它们自动以.NET Standard 2.0为目标,或者我需要在某处指定它。

Also, the version of Visual Studio I'm using is Visual Studio 2017 - 15.3.3

此外,我正在使用的Visual Studio版本是Visual Studio 2017 - 15.3.3

1 个解决方案

#1


3  

You need to install the 4.7 Framework Developer Pack, not just the framework itself. If you are using Windows 10 with the latest updates it will show up in the installer for Visual Studio, if you do not have it you can install the SDK manually from here.

您需要安装4.7 Framework Developer Pack,而不仅仅是框架本身。如果您使用的是带有最新更新的Windows 10,它将显示在Visual Studio的安装程序中,如果您没有它,则可以从此处手动安装SDK。

That being said, if you are writing stuff in .NET Core 2.0 you don't need .NET framework 4.7, you need .NET Core 2.0. Go install that SDK instead so you can create .NET Core 2.0 programs.

话虽这么说,如果你在.NET Core 2.0中编写东西,你不需要.NET framework 4.7,你需要.NET Core 2.0。去安装该SDK,以便您可以创建.NET Core 2.0程序。

#1


3  

You need to install the 4.7 Framework Developer Pack, not just the framework itself. If you are using Windows 10 with the latest updates it will show up in the installer for Visual Studio, if you do not have it you can install the SDK manually from here.

您需要安装4.7 Framework Developer Pack,而不仅仅是框架本身。如果您使用的是带有最新更新的Windows 10,它将显示在Visual Studio的安装程序中,如果您没有它,则可以从此处手动安装SDK。

That being said, if you are writing stuff in .NET Core 2.0 you don't need .NET framework 4.7, you need .NET Core 2.0. Go install that SDK instead so you can create .NET Core 2.0 programs.

话虽这么说,如果你在.NET Core 2.0中编写东西,你不需要.NET framework 4.7,你需要.NET Core 2.0。去安装该SDK,以便您可以创建.NET Core 2.0程序。