-1

i copied a project from one computer to another. If i open the Project i get a error-message "Das angegebene SDK "Microsoft.NET.Sdk.Web" wurde nicht gefunden." Tanslate: "SDK ..Web not found".

I searched in another questions like here. But i don't have a global.json and i don't know, where i must place it.

And i think the problem is another where. on source computer, the solution can be load. only on target computer i can't load.

Edit: I installed the latest Update of Visual Studio 2017 Community

Taladan
  • 429
  • 1
  • 8
  • 20
  • seems like maybe you are using a later update of VS on your new machine. https://andrewlock.net/the-sdk-microsoft-net-sdk-web-specified-could-not-be-found/ – DaniDev Nov 21 '17 at 17:06
  • I installed the latest update first. – Taladan Nov 21 '17 at 17:56
  • read through the articles they are consistent with the SO post you mentioned. the original link I sent links to: https://andrewlock.net/the-net-core-2-0-preview-1-version-numbers-and-global-json/ I would read that one closely as well – DaniDev Nov 21 '17 at 18:01
  • the Global.json file is a VS Core attribute if your project solution file was created for/by Core originally it should be in the same folder as your solution file: .sln – DaniDev Nov 21 '17 at 18:23
  • I searched for global.json file. But i don't found one. If I prove the information correctly, i should delete the file. – Taladan Nov 22 '17 at 10:20
  • was the project a .net Core project originally? – DaniDev Nov 22 '17 at 16:47

3 Answers3

1

In the VS installer, make sure you selected the workloads for cross-platform and web development so the required components are added to your VS installation.

Martin Ullrich
  • 94,744
  • 25
  • 252
  • 217
1

I had some different Versions of Core installed. But only the oldest one was used. The command dotnet --version shows me the problem. After deinstalling the old version, i can run my app :).

Taladan
  • 429
  • 1
  • 8
  • 20
0

I had already uninstalled some out of date SDK versions. It turns out that left a dotnet.exe with no related sdk folder at C:\Program Files (x86)\dotnet\dotnet.exe. My machine like most is 64bit and newer sdks are installed at C:\Program Files\dotnet. The cmd path was preferring the older version. I renamed the folder C:\Program Files (x86)\dotnet to C:\Program Files (x86)\dotnet.old (I'm not 100% sure something doesn't crop up that needs the files there so just to be safe). Everything then works.

James Ellis-Jones
  • 3,042
  • 21
  • 13