New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to copy roslyn files due to file lock from VBCSCompiler.exe #57
Comments
Is this a web site project? |
Yes, it happens on a web site project. |
VBCSCompiler.exe is the Roslyn compiler service process which is used to do asp.net runtime compilation. You can kill this process before publishing, or use CheckIfShouldKillVBCSCompiler in [sitename].publishproj. |
Ahh, so, it is necessary to include CheckIfShouldKillVBCSCompiler in the MSBuild pipeline? I thought that it would be done automatically by RoslynCodeDomProvider at buildtime or before/while publishing! Will try that then. |
Hmm, but I'm a little bit unsure if it shouldn't work anyway. We have the publish settings in our csproj file, and in there, we have
right at the top of the file as it was included by the NuGet installation anyway. Aditionally, we have
at the end, so, it should get an error when it doesn't see the props file. All web projects are MVC.NET with framework 4.6.1. The projects are under So, am I wrong? Is there any possibility to check if he tries to kill the VBCSCompiler.exe processes? |
Ahh, I see what you mean! In CheckIfShouldKillVBCSCompiler, you check if the VBCSCompiler in But because we use web deploy, it should always be killed in our development environment. I did that now with the following lines in our *.csproj (we don't have a *.publishproj in our solution; should we have one in our web projects with ASP.NET MVC 5?):
which works fine for us. Thank you very much for your support; you can close the ticket now. I'll leave it open, as I'm not sure if you're able to answer my question reguarding the *.publishproj file if I'll do it. |
If there is csproj file under your web app folder, then this is a web application project(not web site project). For web application project, you don't need *.publishproj file, because the publishing task can be put into the csproj. |
Ahh, yeah, sorry for the confussion by my little mistake! I've reproduced it once more and add you a build log from visual studio. As I don't want to show the customers name, I've replaced all "dangerous" informations with Amstrad. Hope that it's still readable. And to avoid any more confussion: The web deploy target is www.dev-am.de as in the first screenshots, but that points to a local IIS instance with 127.0.0.1 which is under C:\inetpub\wwwroot\dev-standalone\Website. |
Thanks for the log file. I'll take a look and see what I can do. |
Thank you very much! Just to keep you informed: With this workaround, we sometimes have the issue that we get a "Reference not set to an object" error while building. As source, visual studio shows the Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props. Don't know the line number at the moment, I think it was one of the kill targets. I try to reproduce it and provide you an msbuild log including this error. |
Had the described error message right now. Here is a screenshot of the error and the msbuild log. Hope that you have a better solution in the long term. And sorry for the zip file, but the log is too big for uploading them as single txt (~30MB) as I were building the whole solution at that time. EDIT: Sorry, I saw that this error is fixed by #54. So, nevermind. :) |
I have problems at the moment even with my workaround. I'm a little bit confused what does fail here...? I had to kill VBCSCompiler.exe by hand. Even stopping the IIS app pool didn't helped. Here is the log: |
As I mentioned in issue #58, the VBCSCompiler.exe process is started by asp.net to do the runtime compilation on the web server which fails the publish because of the file lock. The workaround is only for the lock issue at build time on your dev box or CI box. If fully pre-compiling the views is not an option for you, you may consider to specify the TTL of Roslyn compiler server(you can find more info here) to have VBCSCompiler process auto shutdown sooner. |
same here only for bin/roslyn/Microsoft.CodeAnalysis.VisualBasic.dll on Visual Studio 2017 on webform project in c# |
Even we are on version 2.0.0, we experience some issues with locks from the VBCSCompiler.exe (see logs).
We're unsure what we could do to assist you to analyse the issue..?
The text was updated successfully, but these errors were encountered: