-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Intermittent NSwag failure on .NET 8.0 #4998
Comments
Update - I see the error on my local machine too, although much less frequently than on Azure DevOps pipeline.
|
The error happens intermittently. That is usually because of parallelism. If you can't add the former as a dependency on the latter, perhaps you can try to set the build order explicitly in Visual Studio... just a thought. |
I added the following project dependency as suggested. I am still getting the error above that Wenning mentions. EndProject |
(I'm a coworker of Serena and Wenning) We're trying some other changes on our end, and will come back to this ticket if we are still stuck after. Thanks again, NSwag team. |
I don't use .sln mods, but the .csproj way <ProjectReference Include="...\BillComposer.BL.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference> |
@vvdb-architecture Thanks for the suggestion, but we are still getting the same error with the change. The issue probably is not related to the possible parallel building of projects based on the evidences we have at hand:
The Debug folders apparently are created and accessed by NSwag build, so it comes down to the two questions that I raised 3 weeks ago that have not been answered: |
The file contention issue appears to have been introduced in NSwag.MSBuild version 14.0.0 with which I saw the file contention error even for net6.0-windows build. There is no issue with version 13.20.0. |
Too bad. Other suggestions: could it be because of a recursive build? Do you have In general, updating from 13.x to 14.x requires some work. There's a thread at the top of the issues list that contains more information, alas in a more scattered way. |
|
But if |
Oh, I see; I misread your previous message. I believe setting |
To report back to the community, below is what we have done to get it working with version 14.*:
|
My application is seeing intermittent build failure after being migrated to .NET 8.0 with NSwag.MSBuild upgraded to 14.1.0. So far we have been seeing the error only when the application is built by Azure DevOps pipeline and not when built locally.
The error seems to be started with a file access error: "The process cannot access the file 'D:\csg-azure-agent_work\1241\s\Bin\Debug\net8.0-windows\BillComposer.BL.deps.json' because it is being used by another process. [D:\csg-azure-agent_work\1241\s\src\BillComposer.BL\BillComposer.BL.csproj]".
The file access error has always been on the same file in the failed builds. I am not sure why NSwag needs to access that file in Debug folder when the command file specifies Release build: "dotnet "D:\Cache.nuget\packages\nswag.msbuild\14.1.0\buildTransitive../tools/Net80/dotnet-nswag.dll" run nswag.json /variables:Configuration=Release"
Below are the .csproj snippet that is relavant to NSwag:
Below is the content of nswag.json file:
The text was updated successfully, but these errors were encountered: