0

I am trying to publish a web app to IIS and I am getting this error in my publishing profile. dotnet tool restore screenshot

Underneath that it gives me the path to my dotnet-tools.json file and says, "...dotnet-tools.json came from another cmputer and might be blocked to help protect this computer. For more information, including how to unblock, see https://aka.ms/motw.

I went to the site listed, but frankly everything there was way over my head. I have Googled and read multiple posts, but cannot seem to find a solution. One post said to right click on the file, the properties and on the General tab, check the "unblock" box near the bottom. I have no such box on my file!

Any assistance would be greatly appreciated! Thank you.

MelB
  • 141
  • 1
  • 12

1 Answers1

0

Clean the solution then rebuild the solution or go to the project folder find "bin" folder and delete it, then clean and rebuild the solution.

Jutyar
  • 1
  • 2
  • Do you mean "cleaN"? I have done that and a rebuild and still get the error. – MelB Nov 30 '22 at 20:12
  • yes, try to delete bin folder and then clean and rebuild Have you tried to make a new publish profile? – Jutyar Dec 01 '22 at 10:13
  • I deleted bin folder. Cleaned solution. Rebuilt solution. Still get the same error. – MelB Dec 01 '22 at 15:34
  • then, probably some packages are missing in your application, such as Microsoft.EntityFrameworkCore.Tools or Microsoft.EntityFrameworkCore.Design, I had the same problem last year and I forgot how I fixed it, try this and let me know if it didn't work! – Jutyar Dec 01 '22 at 16:20
  • Nope. Nothing works yet. I found this link about a name possibly being wrong? but don't know what they mean or how to check. Do you have any idea? https://stackoverflow.com/questions/48440223/assets-file-project-assets-json-not-found-run-a-nuget-package-restore/48440777#48440777 – MelB Dec 01 '22 at 17:06
  • As I said probably the packages in top meenu go to "Tools" -> "NuGet Package Manager" -> "Manage NuGet Console" Manage NuGet Console windows will open usually at the bottom of your VS windows than run PM> dotnet restore it will restore and update your packages – Jutyar Dec 01 '22 at 18:14
  • I have run dotnet restore. It returns this: Determining projects to restore... All projects are up-to-date for restore. But I still have the error. Is there something that has to be done after that step? I am new to programming, so please explain in detail. Thanks. – MelB Dec 01 '22 at 18:24
  • I am on 7.0 packages and I did not have this problem before I updated VS to its latest version. I then also updated to 7.0. Maybe I should try rolling back to 6.9 packages? – MelB Dec 01 '22 at 18:26
  • Or maybe it was the last VS update that did it? I tried uninstalling it and reinstalling it. That did not help either. – MelB Dec 01 '22 at 18:26
  • I wish I could, but cannot due to my employer. – MelB Dec 01 '22 at 19:04