user7496931
user7496931

Reputation: 1519

Can't create a web app with .NET Core 3.1 on Visual Studio (Mac)

I'm brand new to Visual Studio IDE and learning C#. I'm following Microsoft's Web apps/Razor Pages Tutorial and i've already installed Visual Studio and dotnet 3.1

I'm attempting to start a new project but for some reason I can't seem to click the "create" button. Nothing happens. I am able to create a project with 3.0 but this causes some versioning issues with eventual packages that I'll be installing.

Here's information on my dotnet versioning:

dotnet --info

.NET Core SDK (reflecting any global.json):
 Version:   3.1.100
 Commit:    cd82f021f4

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  10.15
 OS Platform: Darwin
 RID:         osx.10.15-x64
 Base Path:   /usr/local/share/dotnet/sdk/3.1.100/

Host (useful for support):
  Version: 3.1.0
  Commit:  65f04fb6db

.NET Core SDKs installed:
  3.0.101 [/usr/local/share/dotnet/sdk]
  3.1.100 [/usr/local/share/dotnet/sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.App 3.0.1 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.14 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.0.1 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 3.1.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

And here is where the project creation is halted:

Project creation stall

Upvotes: 2

Views: 2596

Answers (2)

MattjeS
MattjeS

Reputation: 1397

What I've done as a workaround is create the project as dotnet core 3.0. And then simply edit the csproj files to target 3.1:

<PropertyGroup>
    <TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

Upvotes: 0

Riedi
Riedi

Reputation: 76

Visual Studio Mac will only support .net core 3.1 with the new version 8.4. You can switch the update channel to preview and do the updates. After installing the preview updates the creation of projects with .net core 3.1 works for me.

Upvotes: 5

Related Questions