2

I cannot run my new .netcore mvc application. The dependencies always show warning icon. Warning icon

And I got this error message when run my new asp.net mvc application Error message after a few hours of searching, I got a few answers. but the answer still cannot be applied to run my application. I have tried using dotnet restore, nuget restore, dotnet build, etc. but still no one solved this problem. when I run dotnet restore this message appears Error after restore

when I run nuget restore this message appears Error nuget restore

Previously I used Microsoft Visual Studio 2017. I uninstalled it and replaced it with Microsoft Visual Studio 2019. Was there something conflict when I installed Microsoft Visual Studio 2019?

I just want to run my application. but I don't know what's wrong with my application?

Hopefully some of you can help me. Thank you in advance

naticap
  • 379
  • 1
  • 5
  • 19
  • I can remove the error message about configuration "Debug|MCD" is Invalid. here the step to remove this error message. 1. Open "Control Panel > System and Security > System" 2. Click "Advanced System Setting" (you need to open advanced setting using administrator role) 3. Click "Environtment Variables" 4. On System Variables, Delete Variable "Platform" with value "MCD" This is can solved the error but I get another error when run `dotnet restore`. The error look like this `error while retrieving package metadata for 'Microsoft.AspNetCore.Razor.Language.2.2.0' from source` – naticap Jul 16 '19 at 14:35
  • I got the answer above based on this source [link](https://stackoverflow.com/questions/5563560/the-specified-solution-configuration-debugbnb-is-invalid) – naticap Jul 16 '19 at 14:42
  • I fix this issues, here the step: first, download nuget.exe from [from here](https://www.nuget.org/downloads). next go to where download folder you choose for nuget exe. then install missing package in my case the command look like this `nuget.exe install Microsoft.AspNetCore.Razor.Language.2.2.0`. After all missing package was installed, open your project solution and open package manager console and type `dotnet restore`. And now rebuild your project and run. Thanks all – naticap Aug 31 '19 at 17:39

2 Answers2

9

In order to fix this error, open visual studio, then select Tools > NuGet Package Manager > Package Manager Console. Once the Package Manager Console window is open, simply type the below command press enter button.

dotnet restore

Pranaya Rout
  • 301
  • 3
  • 6
1
  • dotnet restore {Directory of Solution}{Name of the solution}

  • Hit Enter

  • It will work, restore all the nuget packages/dependencies