0

I have a project that is in a zip that was originally coded on a windows 7 OS.I have since moved to windows 10 and I am trying to continue working on the project on my Windows 10 PC. The issue is that somehow the path is still set as old path and as a result the build fails.

Failed to read NuGet.Config due to unauthorized access. Path: 'C:\Users\abc\RiderProjects\myproject\NuGet.Config'. ---> System.UnauthorizedAccessException: Access to the path 'C:\Users\abc\RiderProjects\myproject' is denied.

The path C:\Users\abc\RiderProjects\myproject should be C:\Users\xyz\RiderProjects\myproject.I looked within the project if i can find hardcoded references to the old path but in vain but i can see references to old path in /bin and /obj folder.

I already tried the following:

1.Look for hardcoded references to old path within solution directory

2.Clean solution

user2650277
  • 6,289
  • 17
  • 63
  • 132

1 Answers1

0

I had to do the following to fix the issue in that specific order.

1.Remove obj and bin folders from every project.A proper gitignore file should be added before commiting to a git repository.In my case since I got the project in a zip , there was some obj file in some projects in the solution

2.Clean the solution

3.Rebuild the project

user2650277
  • 6,289
  • 17
  • 63
  • 132