简体   繁体   中英

“Access to the path 'Calculations.pdb' is denied.” But access is fine for all the other files

We have C# code that gets compiled dynamically and saved in a folder, let's say Assembly. The program is run as administrator.

When we rebuild the assembly, we delete all the files in the folder Assembly. There is no problem when deleting the .cs and .dll files, but the .pdb file (as in the title) doesn't get deleted and the exception is thrown.

Why do I have this problem only with the pdb file?

It seems the pdb file's symbols were loaded in Visual Studio, and thus when I was debugging it couldn't be deleted. I was debugging to see what the error was. So when I didn't load the symbols automatically anymore, it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM