2
votes

i have a visual studio asp.net core v1.1 solution and want to build it with the 'developer command prompt for VS 2017'. Therefore i am using the following commands:

  • cd (path\rootfolder of the VS Project)
  • dotnet build

The result is always: Couldn't find 'project.json' in current directory

My dotnet --info result is:

  • .NET Command Line Tools (1.0.0-preview2-1-003177)

The Project has no project.json file due its usage of asp.net core v1.1. So all projects within the Solution have their own *.csproj files.

Does anyone have an Idea what could possibly go wrong?

2

2 Answers

3
votes

You have outdated tools. To build the new *.csproj structure, you need the latest tools installed. Since VS 2017 comes already with these tools preinstalled, I suspect that you have the older tools installed with a different architecture.

For example you maybe have x64 version of 1.0.0-preview2-1-003177 and preview4 in x86. Check the respective folders in C:\Program Files\dotnet\sdk (for x64) and C:\Program Files (x86)\dotnet\sdk (for x86) the uninstall the old one (Control Panel > Programs and Features)

1
votes

Now DotNetCore Projects Packages are included in <projectName>.csproj File

enter image description here