Can not delete \\bin\\roslyn\\VBCSCompiler.exe - Access is denied

醉酒当歌 提交于 2019-12-02 16:06:12

Same problem here - solution for me was closing VS, open task manager and end all instances of VBCSCompiler.exe as mentionend here: https://developercommunity.visualstudio.com/content/problem/71302/binroslyn-files-locked-during-build.html

In the 'Manage NuGET Packages' window I downgraded Microsoft.Net.Compilers to 2.3.0 (from 2.3.1) and also downgraded Microsoft.CodeDom.Providers.DotNetCompilerPlatform to 1.0.4 (from 1.0.5) and the Roslyn directory/files were no longer marked as readonly and no longer locked by the exe.

I have killed the process in task manager and rebuilt the solution which gets me back on track, but I have found that frequently building the entire solution before debugging has stopped it all together. I am currently working on an n-tier application and I was encountering this numerous times a day and I haven't had the issue since I made sure to build the application after any changes and especially before debugging. Though, I don't get why this would work since the VS builds the solution before debugging but it has done the trick for me.

I accidentally found this in Task Manager:

Windows Explorer > (expand Windows Explorer) > Roslyn Right-click Roslyn and select End Task

Note: Even closing all Windows Explorer windows will not stop Roslyn. You must do this in Task Manager.

I killed the visual studio instance from Task manager then it got deleted.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!