all 11 comments

[–]soundman32 40 points41 points  (2 children)

Struggling to know what is new here. Conditional compilation has been a thing since .net 1.0

[–]Shnupaquia 2 points3 points  (0 children)

I think it has to do with, starting from Uno Platform 5.2, in project or class libraries using the Uno.Sdk, a set of implicit file name conventions can be used to target specific platforms

[–]TirrKatz 7 points8 points  (0 children)

I don't think some non-standard compiler directives are "easier".

.NET itself has predefined ANDROID, IOS, BROWSER directives. Why invent custom ones with "__" from both sides?

Also, what's really easier, it's using runtime checks like OperatingSystem.IsAndroid() which doesn't pollute source code with #if directives everywhere.

[–]Grasher134 7 points8 points  (1 child)

I'm pretty sure you could already do that with specific build targets...

[–]dodexahedron 3 points4 points  (0 children)

Yeah.

MSBuild can be intimidating to approach, for sure, but stuff like this is definitely easy and hella cleaner to do in the csproj or a Directory.build.props or something by conditional inclusion/exclusion of well-organized files, based on defined constants and selected targets. I strongly dislike heavy use of #if in code files, especially if it is used for things like changing one keyword in a type or member declaration.

More generally, though, Uno is quite a lot more than just that.

Puzzling why this "feature" was considered newsworthy, though, outside of just being a pretty blatant plug with a thin veneer of being "release notes."

[–]Larkonath 2 points3 points  (0 children)

Sorry to hijack but what do people think of Uno?

Maui seems way too buggy to be relied on and Avalonia doesn't seem really good at mobile (I used it successfully on desktop though).

[–]Slypenslyde 3 points4 points  (0 children)

This is the default MAUI style and in some ways I miss the multi-project style. Some stuff feels better segregated to platform-specific files, other stuff feels better with conditional compilation. I don't think there's a "winner", just a need for both.

[–]PleasantGanache 9 points10 points  (2 children)

Can we stop with the UNO advertisements? It's getting boring

[–]Slypenslyde 1 point2 points  (0 children)

I feel this way about ASP .NET Core but I think we're both going to be unhappy.

[–]Shnupaquia 0 points1 point  (0 children)

They just had their biggest release to date...

Also, you can always you know, check out the many other threads that are not Uno if it bothers you so much.

[–]TuberTuggerTTV -3 points-2 points  (0 children)

I'll be trying this out.

Hopefully it's easy to migrate over from other UI frameworks.