Skip to content

Conversation

@StefanOssendorf
Copy link
Contributor

This PR adds NRT's to WPF and MAUI. More specifically to the shared XAML project.

I launched the WpfExample project without any issues.
I also tried to launch MauiExample and SimpleNTier but couldn't start them. They seem broken in their current state (without my changes from this PR).

Any other apps I can try to verify the working?
I'll try to package everything locally and use it in our app at work. That should cover a large portion.
Because of that I'll make this a draft PR so you can start reviewing until I get that test with our app done.

Note: Sadly WPF itself isn't NRT annotated yet. So maybe we get some errors in the future when they start adding NRTs.

@Bowman74
Copy link
Contributor

@StefanOssendorf
What problems are you having running the MauiExample app? I just tried it off the main branch and it worked for me without issues. Here it is running in the iOS simulator.

Screenshot 2025-06-24 at 11 32 18 PM

@StefanOssendorf
Copy link
Contributor Author

I only tried the Windows one to start.

@Bowman74
Copy link
Contributor

@StefanOssendorf
Weird, that one works for me too. Any specific error you are getting? Sometimes with MAUI I've found after an update if things are not cleaned from the obj and bin directories it won't run properly ... for reasons.

Screenshot 2025-06-25 at 12 14 16 AM

@Bowman74
Copy link
Contributor

@StefanOssendorf
Oh darn, after midnight. Let me know if there is anything I can do to help when I wake back up. :)

@StefanOssendorf
Copy link
Contributor Author

Well. Now I can start the Win Version 🤔🤷‍♂️

@Bowman74
Copy link
Contributor

Well. Now I can start the Win Version 🤔🤷‍♂️

Nadie lo sabe.

@StefanOssendorf
Copy link
Contributor Author

StefanOssendorf commented Jun 30, 2025

@rockfordlhotka @Bowman74
I think that's blocker or at least tough. I've added a new resource for an exception.
But now since MAUI depends on a published nuget version that resource is not available for MAUI but only for WPF.
How do we handle such things?

@Bowman74
Copy link
Contributor

Good news, bad news. Working exactly as intended, yeah! Bad news, how it was intended to work doesn't handle interface changes for code CSLA libraries until pushed to nuget.org. Boo.

What I will do is change the reference in the csproj file to use the nuget package in a release build and the project reference in a debug build. That should fix it.

@rockfordlhotka @StefanOssendorf if you don't mind I'll push this modest change to this branch so we can see if it works right here.

@Bowman74
Copy link
Contributor

@StefanOssendorf @rockfordlhotka
Sorry I put a few commits to your branch but the CI build now works for this situation. Debug builds now use the project file and Release builds use the nuget package.

I did find that the main CSLA project does not target any of the Android/iOS/MacCatalyst/etc platforms so I had to modify to not specify a target or the CSLA compile would die
I also discovered the .Net 8 MacCatalyst settings in the project file specified too old a version of MacCatalyst, older than what net8.0-maccatalyst, actually supports. So the new CI build it better in the fact that it revealed that problem.

When this PR is merged it will correct the deficiencies in the CI build (and new release scheme) so it can handle unreleased changes to the CSLA public surface that it would need to compile.

@rockfordlhotka
Copy link
Member

@StefanOssendorf @rockfordlhotka Sorry I put a few commits to your branch but the CI build now works for this situation. Debug builds now use the project file and Release builds use the nuget package.

Teamwork and collaboration - how novel an idea!?!

@rockfordlhotka rockfordlhotka requested a review from Copilot June 30, 2025 23:44
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces nullable reference type (NRT) annotations to both the WPF and MAUI portions of the project and updates project files and code across multiple components accordingly. Key changes include updating class and property signatures to be nullable‐aware, adding compiler warnings as errors for nullability, and improving exception handling with additional argument checks.

Reviewed Changes

Copilot reviewed 28 out of 29 changed files in this pull request and generated 2 comments.

File Description
docs/NRT Work In Progress Tacking.md Updated status of XAML projects to mark WPF/Maui as complete
Source/Csla.Xaml.Shared/XamlOptions.cs Introduces the XamlOptions class (missing a class body)
Source/Csla.Xaml.Shared/BusyAnimation.cs Adds nullability annotations and includes recursive FindChild helper improvements
... Various files: update of public API, added nullability, and exception checks
Files not reviewed (1)
  • Source/Csla/Properties/Resources.Designer.cs: Language not supported

/// <summary>
/// Configuration options for AddXaml method
/// </summary>
public class XamlOptions; No newline at end of file
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The declaration of XamlOptions is missing a class body, which may lead to compilation errors. Consider defining the class with a proper body even if empty, for example: 'public class XamlOptions { }'.

Suggested change
public class XamlOptions;
public class XamlOptions
{
}

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care what we do here but I know we have other declarations that way.

@Bowman74
Copy link
Contributor

Teamwork and collaboration - how novel an idea!?!

@rockfordlhotka Thanks to @StefanOssendorf for alerting me to this. The changes to the Release build on their own, not a problem. The changes to the CI build on their own, also not a problem. But the two of them together led to this situation I hadn't thought of! Lol.

@StefanOssendorf StefanOssendorf marked this pull request as ready for review July 1, 2025 11:37
@StefanOssendorf StefanOssendorf requested a review from a team as a code owner July 1, 2025 11:37
@rockfordlhotka rockfordlhotka merged commit 1ffd775 into main Jul 6, 2025
3 checks passed
@rockfordlhotka rockfordlhotka deleted the dev/1233-add-nrt-to-csla-xaml-shared branch July 6, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants