Assembly Processor crashs with Locked Files
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Version:
4.1.01898 ( probably also previous 4.1 versions )
Platform(s): Does the problem occur on Windows, Android...?
Windows
Android ( SauronTheBlack will add his context as comment )
Describe the bug
The Assembly Processor wants to copy the source generator dll even though it has referenceoutput=false so it should ignore it
After 10 tries it fails.
On Android same erorr occurs on release version.
To Reproduce
Steps to reproduce the behavior:
- add a source generator to your project and reload/rebuild
( see github thread with manio https://discord.com/channels/500285081265635328/1152231113431978097 )
Expected behavior
should ignore the source generator or not lock the file.
Screenshots
If applicable, add screenshots to help explain your problem (use GitHub drag & drop)
Log and callstacks`
'C:\Users\ixlle\source\repos\StrideDiagnostics\StrideDiagnostics\bin\Debug\netstandard2.0\StrideDiagnostics.dll' because it is being used by another process. Die Datei wird durch "Stride.NuGetLoader (15372)" gesperrt.
[C:\Program Files\dotnet\sdk\6.0.408\Microsoft.Common.CurrentVersion.targets(4632,5)]: Warning: "obj\Debug\netstandard2.0\StrideDiagnostics.dll" konnte nicht in "bin\Debug\netstandard2.0\StrideDiagnostics.dll" kopiert werden. Wiederholung 10 wird in 1000 ms gestartet. The process cannot access the file 'C:\Users\ixlle\source\repos\StrideDiagnostics\StrideDiagnostics\bin\Debug\netstandard2.0\StrideDiagnostics.dll' because it is being used by another process. Die Datei wird durch "Stride.NuGetLoader (15372)" gesperrt.
[C:\Program Files\dotnet\sdk\6.0.408\Microsoft.Common.CurrentVersion.targets(4632,5)]: Error: "obj\Debug\netstandard2.0\StrideDiagnostics.dll" konnte nicht in "bin\Debug\netstandard2.0\StrideDiagnostics.dll" kopiert werden. Die zulässige Anzahl von Wiederholungen von 10 wurde überschritten. Fehler. Die Datei wird durch "Stride.NuGetLoader (15372)" gesperrt.
[C:\Program Files\dotnet\sdk\6.0.408\Microsoft.Common.CurrentVersion.targets(4632,5)]: Error: Die Datei "obj\Debug\netstandard2.0\StrideDiagnostics.dll" kann nicht in "bin\Debug\netstandard2.0\StrideDiagnostics.dll" kopiert werden. The process cannot access the file 'C:\Users\ixlle\source\repos\StrideDiagnostics\StrideDiagnostics\bin\Debug\netstandard2.0\StrideDiagnostics.dll' because it is being used by another process.
Additional context
"Die Datei wird durch "Stride.NuGetLoader (15372)" gesperrt."
the file gets locked by Stride.NugetLoader
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with a source generator and reload/rebuild on Windows, then inspect the Assembly Processor and Stride.NuGetLoader interaction described in the report. Use the logged Microsoft.Common.CurrentVersion.targets copy failure and the locked StrideDiagnostics.dll as the observable failure. Done means the source generator DLL is not unnecessarily copied or locked, and the rebuild completes without the retry errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100