-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Current behavior
When creating a blank Uno app with a simple source generator, and referencing it under all heads, the macOS and iOS builds fail with the error message:
"C:\Users\agodfrey\source\repos\test\SourceGeneratorErrorMacOSiOS\SourceGeneratorErrorMacOSiOS.sln" (default target) (1:2) ->
"C:\Users\agodfrey\source\repos\test\SourceGeneratorErrorMacOSiOS\SourceGeneratorErrorMacOSiOS.iOS\SourceGeneratorErrorMacOSiOS.iOS.csproj" (default target) (3:6) ->
(_UnoSourceGenerator target) ->
MSBUILD : error : Failed to read [C:\Users\agodfrey\source\repos\test\SourceGeneratorErrorMacOSiOS\SourceGenerator\bin\iPhone\Debug\netstandard2.0\SourceGenerator.dll], Could not find a part of the path 'C:\Users
\agodfrey\source\repos\test\SourceGeneratorErrorMacOSiOS\SourceGenerator\bin\iPhone\Debug\netstandard2.0\SourceGenerator.dll'. [C:\Users\agodfrey\source\repos\test\SourceGeneratorErrorMacOSiOS\SourceGeneratorErrorM
acOSiOS.iOS\SourceGeneratorErrorMacOSiOS.iOS.csproj]
torErrorMacOSiOS.macOS\SourceGeneratorErrorMacOSiOS.macOS.csproj" (default target) (6:6) -> MSBUILD : error : Failed to read [C:\Users\agodfrey\source\repos\test\SourceGeneratorErrorMacOSiOS\SourceGentorErrorMacOSiOS.macOS\SourceGeneratorErrorMacOSiOS.macOS.csproj" (default target) (6:6) -> MSBUILD : error : Failed to read [C:\Users\agodfrey\source\repos\test\Source MSBUILD : error : Failed to read [C:\Users\agodfrey\source\repos\test\SourceGeneratorErrorMacOSiOS\SourceGenerator\bin\iPhoneSimulator\Debug\netstandard2.0\SourceGenerator.dll], Could not find a part of the path'C:\Users\agodfrey\source\repos\test\SourceGeneratorErrorMacOSiOS\SourceGenerator\bin\iPhoneSimulator\Debug\netstandard2.0\SourceGenerator.dll'. [C:\Users\agodfrey\source\repos\test\SourceGeneratorErrorMacOSiOS\SourceGeneratorErrorMacOSiOS.macOS\SourceGeneratorErrorMacOSiOS.macOS.csproj]
No other project heads have this issue.
Expected behavior
All project heads should build successfully
How to reproduce it (as minimally and precisely as possible)
-
Download and unzip this premade solution:
SourceGeneratorErrorMacOSiOS.zip -
In a terminal, run
msbuild -r
. Observe the error message. -
Open "SourceGeneratorErrorMacOSiOS.iOS.csproj" and "SourceGeneratorErrorMacOSiOS.macOS.csproj" and on line 5, remove the text
OutputItemType="Analyzer" ReferenceOutputAssembly="true"
from the source generator's project reference. -
Run
msbuild -r
again. The build is successful.
Workaround
Unknown
Works on UWP/WinUI
Yes
Environment
No response
NuGet package version(s)
No response
Affected platforms
iOS, macOS
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
You may need to delete all bin/obj folders between builds if using MSBuild 17.0.