microsoft / azuredevopslabs

Learn how you can plan smartly, collaborate better, and ship faster with a set of modern development services with Azure DevOps.
https://www.azuredevopslabs.com
MIT License
806 stars 903 forks source link

dotnet build fails on self hosted agent due to missing temp folder #647

Open Vamic opened 1 year ago

Vamic commented 1 year ago

We set up a VMSS agent pool and enountered an issue when trying to build our solution giving the following error:

##[error]ROSLYNCODETASKFACTORYCSHARPCOMPILER(0,0): Error CS2012: Cannot open 'C:\Users\AzDevOps\AppData\Local\Temp\MSBuildTempAzDevOps\2fduy4at.lwr.dll' for writing -- 'Could not find a part of the path 'C:\Users\AzDevOps\AppData\Local\Temp\MSBuildTempAzDevOps\2fduy4at.lwr.dll'.' This was resolved by running mkdir %LocalAppData%\Temp\MSBuildTempAzDevOps before the build task

Not sure if it's an issue with msbuild or devops but there were no results on google for this issue so at least now a solution can be found.