Open JohanLarsson opened 5 years ago
I see this about once a day.
@sharwell Should the annotator bail and assume that the only other process that will be causing this is another build of the same project, and that the file being written is what the annotator would have written anyway?
Or should it retry?
This started happening repeatedly until I restarted VS.
Got this with 1.0.0-alpha.138
. Repro: https://github.com/GuOrg/Gu.Wpf.ToolTips
Severity Code Description Project File Line Suppression State
Error MSB4018 The "AnnotatorBuildTask" task failed unexpectedly.
System.IO.IOException: The file 'obj\Debug\netcoreapp3.1\annotated\Microsoft.CSharp.xml' already exists.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite, Boolean checkHost)
at System.IO.File.Copy(String sourceFileName, String destFileName)
at TunnelVisionLabs.ReferenceAssemblyAnnotator.AnnotatorBuildTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() Gu.Wpf.ToolTips C:\Users\ds2346\.nuget\packages\tunnelvisionlabs.referenceassemblyannotator\1.0.0-alpha.138\build\TunnelVisionLabs.ReferenceAssemblyAnnotator.targets 89
This is going to be possible in parallel build scenarios until file-system locking is used.
I was going to say, I don't think it's project-specific. It crops up and requires a VS restart maybe once a day for me no matter what the project is.
From the name I'm guessing it can be something in this nice package. Repro in this commit https://github.com/GuOrg/Gu.Wpf.UiAutomation/tree/a5b789bf37742a9edd098d187d8a8362a80e43a8
I think I have only seen it after git clean and start Visual Studio