After a few debug sessions i can't compile the project anymore.
Compile gives several access errors like error below for some system assemblies, all 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". Access to the path 'bin\roslyn\System.Collections.Immutable.dll' is denied.
Restart to the VS doesn't solve. The project uses IIS express to run and there is no IIS express process running.
Only solution is reboot.
I am using VS2017, update 2
I'm actually facing the same problem. In my case it was the VBCSCompiler.exe, which makes sense because "Roslyn" (found in the path name) is the internal name of the ".NET Compiler Platform". So I was able to solve the build problem by terminating this process.
But this is just a workaround. I still don't know why the process keeps running and keeps file handles after I stopped the debugging.
Update Microsoft.CodeDom.Providers.DotNetCompilerPlatform to version 1.0.6 or latest. You refer to the link https://github.com/aspnet/RoslynCodeDomProvider/issues/10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With