Long story short, I need to kill the VBCSCompiler.exe on a Azure pipeline Ubuntu agent after the nuget restore task is completed. On windows2019 agent i dont need to do that but on ubuntu i am running into an issue:
warning MSB3021: Unable to copy file "/home/vsts/work/1/s/packages/Microsoft.Net.Compilers.2.4.0/build/../tools/csc.exe" to "/bin/roslyn/csc.exe". Access to the path '/bin/roslyn' is denied. [/home/vsts/work/1/s/Bobby.ProjectA/Bobby.ProjectA.csproj]
so according to Levi in this post here, I need to add a <Target Name="CheckIfShouldKillVBCSCompiler"> lines to the .csproj file. i added them like this:
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
But that didnt do anything to unlock the /bin/roslyn path.
I am thinking that this has to be added in the BeforeBuild target lines (e.g. nest them), so i attempted this:
But i ended up with error: e
rror MSB4067: The element <PropertyGroup> beneath element <Target> is unrecognized.
Hi @Cataster , we suggest you continue to follow up previous thread on stack overflow, and then you can ask more details which could make it work in your project.
will do, thanks!
For future readers: I believe you are looking for the CallTarget task.
Sign in to comment