Skip to content

Source Generators doesn't work well with dotnet watch (OSOE-1203) #360

@barthamark

Description

@barthamark

When using dotnet watch on a project where the Source Generator is added as part of the HL submodule, and I make a "rude edit" that makes the watcher build the solution, it will fail and stuck with this error:

C:\Program Files\dotnet\sdk\8.0.416\Microsoft.Common.CurrentVersion.targets(4857,5): warning MSB3026: Could not copy "obj\Debug\netstandard2.0\Lombiq.HelpfulLibraries.SourceGenerators.dll" to "bin\Debu 
g\netstandard2.0\Lombiq.HelpfulLibraries.SourceGenerators.dll". Beginning retry 5 in 1000ms. The process cannot access the file 'D:\Repos\Lombiq\LMBQ\src\Libraries\Lombiq.HelpfulLibraries\Lombiq.Helpfu 
lLibraries.SourceGenerators\bin\Debug\netstandard2.0\Lombiq.HelpfulLibraries.SourceGenerators.dll' because it is being used by another process. The file is locked by: ".NET Host (13424)" [D:\Repos\Lomb 
iq\LMBQ\src\Libraries\Lombiq.HelpfulLibraries\Lombiq.HelpfulLibraries.SourceGenerators\Lombiq.HelpfulLibraries.SourceGenerators.csproj]  

Jira issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions