Closed xperiandri closed 2 years ago
@jeromelaban, blocking issue
The file is created here: https://github.com/unoplatform/uno/blob/546441d12f12e27cd07fc75851039c7404efc2cf/src/SourceGenerators/Uno.UI.SourceGenerators/Content/Uno.UI.SourceGenerators.props#L423
It's likely that there's a way to determine that the currently built project is not CSharp.
That is strange that it is created even though it is empty
It's not strange, it's used in the VS Code scenario. It's generating a .cs file, so this is why F# does not like this much.
So do you suggest just adding a condition that disables the target for non C# projects?
Thanks!
@xperiandri did this fix your build issue?
I'll check and let you know. From the change I supposed so and didn't check yet.
Yes, builds. Checked with 4.1.0-dev.324
Current behavior
Uno generates empty
uno.reload.cookie.g.cs
file causing F# not to builderror FS0226: The file extension of 'obj\Debug\net6.0\uno.reload.cookie.g.cs' is not recognized. Source files must have extension .fs, .fsi, .fsx, .fsscript, .ml or .mli.
Expected behavior
Uno.Core/Uno.UI/Uno.WinUI does not generate any C# file if project does not contain any XAML file
How to reproduce it (as minimally and precisely as possible)
net6.0
Workaround
No
Works on UWP/WinUI
Yes
Environment
Uno.WinUI / Uno.WinUI.WebAssembly / Uno.WinUI.Skia
NuGet package version(s)
4.0.*
Affected platforms
iOS, Android, WebAssembly, macOS, Skia (WPF), Skia (GTK on Linux/macOS/Windows), Skia (Tizen)
IDE
Visual Studio 2022
IDE version
17.1 preview
Relevant plugins
No response
Anything else we need to know?
No response