Cannot start asp.net core project generated using Yeoman generator

I created an Asp.Net Core project using Yeoman Generator using yo aspnet, but the project cannot be started.

MSBUILD: error MSB1003: specify the project or solution file. The current working directory does not contain a project or solution file.

enter image description here

+4
source share
4 answers

Please do the following:

npm uninstall -g generator-aspnet
npm install -g yo bower # (optional)
npm install -g generator-aspnet@0.2.6

check if the latest version of the SDK is installed, not the LTS.

Thanks, Steve Smith, Scott Addy, Rick Anderson, Noel Rice and Shane Boyer for the good tutorial.

Tutorial link: https://docs.microsoft.com/en-us/aspnet/core/client-side/yeoman

+6
source

. , Yeoman project.json .csproj 1.0.0-preview3-004056.

, dotnet 3 , MSBUILD .csproj .

project.json .csproj, :
dotnet migrate

:
dotnet restore
dotnet build
dotnet run

.

+3

, , , , - project.json XML, Preview3, , Preview 3 . dotnet .

, dotnet , \Program Files\dotnet\sdk

(. ), . , global.json :

{
  "projects": [ "your-project-name" ],
  "sdk": {
    "version": "1.0.0-preview2-003131"
  }
}

:

  • , sdk ( 2 3121).
  • , yoeman.
+2

The problem is that the latest Yeoman generates the need for an updated version of .NetCore because .NetCore has stopped project.json and now only supports .csproj and MsBuild. I had this problem on a Mac and the latest version of .NetCore was installed and it worked perfectly for me. You can get the latest version of SKD from the link . I installed macOS (x64) PKG .

0
source

Source: https://habr.com/ru/post/1662824/


All Articles