nwheels-io / NuLink

The missing LINK feature of NuGet: develop & test packages as if they were part of the main project
MIT License
53 stars 15 forks source link

System.IO.IOException: Access to the path - nuget when creating a nulink #32

Open MeaningOfLights opened 1 year ago

MeaningOfLights commented 1 year ago

Hi Felix,

I'm hitting an Access Denied issue similar to https://github.com/nwheels-io/NuLink/issues/24 except it occurs when running in Admin!

I've given Everyone full control of the folder and it still fails.

Any suggestions?

image

MeaningOfLights commented 1 year ago

I quickly checked the code as the stacktrace indicates the error occurred Moving a folder.

Then I decided to create the folder for the backup, I then ran the command and it worked:

image

image

MeaningOfLights commented 1 year ago

I'll see if I can design something open source to add to this project. It'd be handly to specify a directory to recursively iterate through looking for csprojs and particular NuGet Refs and then doing the SymLinks. It would be great to create a small file of what directoies have been short-cut so the old/current SymLinks can be easily removed. There's also an issue where I noticed the pdb file isn't copied along with the proj DLL and you have to do that manually.

MeaningOfLights commented 1 year ago

When you have an instance of Visual Studio open that is locking the NuGet package then this problem occurs. Simply close any instance that could cause a FileLock and retry!