Trying to run preview 3 commands on project.json projects could give clearer error
See original GitHub issueSteps to reproduce
- Create a project.json-based project.
- Run a preview 3 command like
dotnet restore
,dotnet build
ordotnet run
on it.
Expected behavior
Clear error message explaining that the project is not compatible and suggesting dotnet migrate
.
Actual behavior
>dotnet restore
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
>dotnet build
Microsoft (R) Build Engine version 15.1.0.0
Copyright (C) Microsoft Corporation. All rights reserved.
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
>dotnet run
Couldn't find a project to run. Ensure a project exists in E:\Users\Svick\git\core\samples\helloworld.
Or pass the path to the project using --project
This is confusing to users that don’t know the difference between the various Preview versions or about the switch from project.json to msbuild, for example: https://github.com/dotnet/core/issues/363.
Environment data
dotnet --info
output:
.NET Command Line Tools (1.0.0-preview3-004056)
Product Information:
Version: 1.0.0-preview3-004056
Commit SHA-1 hash: ccc4968bc3
Runtime Environment:
OS Name: Windows
OS Version: 10.0.14393
OS Platform: Windows
RID: win10-x64
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:7 (5 by maintainers)
Top Results From Across the Web
Sample projects no longer build · Issue #363 · dotnet/core
The sample projects use project.json. It looks like you're on SDK preview3 (or newer), which switched to msbuild. To build and run those ......
Read more >Getting Error "Your project must have an Android package ...
I get the following error,. Your project must have an Android package set in app.json. So I looked at expos tutorial page and...
Read more >Getting "Error detecting project version" when project is run ...
I have created a process. It works when I run it. I published that project, run it in the UiPath Robot and it...
Read more >Error: SFDX Deploy source to org
So i went to the package.xml file and right click > SFDX:Retreive Source in Manifest from org and it worked. Then you can...
Read more >R.I.P project.json - Out with the new, in with the old
The tooling to work with ASP.NET Core was in an early preview and at the time we had DNVM and DNU commands. These...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
+1.
I would propose:
This seems like a duplicate of https://github.com/dotnet/cli/issues/4628.