Access denied to roslyn folder when compiling MVC project in VS 2017
After several debugging sessions, I can no longer compile the project.
Compilation gives several access errors like below error for some system assemblies related to roslyn bin folder:
Error MSB3021: Unable to copy file ... \ packages \ Microsoft.Net.Compilers.2.2.0 \ tools \ System.Collections.Immutable.dll "to" bin \ roslyn \ System.Collections.Immutable.dll ". Accessing the path 'bin \ roslyn \ System.Collections.Immutable.dll' is negated.
Restarting VS does not resolve. The project uses IIS express service to start and there is no IIS express delivery process.
Only the solution is reloaded.
I am using VS2017 Update 2
source to share
I am actually facing the same problem. In my case, it was VBCSCompiler.exe, which makes sense because "Roslyn" (found in the pathname) is the internal name of ".NET Compiler Platform". So I was able to fix the build issue by completing this process.
But this is just a workaround. I still don't know why the process keeps running and continues working on files after I stop debugging.
source to share
Update Microsoft.CodeDom.Providers.DotNetCompilerPlatform to version 1.0.6 or later. You are referring to the link https://github.com/aspnet/RoslynCodeDomProvider/issues/10
source to share