adambuchweitz
Topic Author
Posts: 5
Joined: 12 May 2023, 22:01

Unity: Xaml.Dependencies throws errors after updating to 3.2.9

10 Oct 2025, 22:42

I'm attempting to update from version from 3.2.6 to 3.2.9, and I'm getting errors now with declaring dependencies. Here is what I've had, and has worked as expected:
    <noesis:Xaml.Dependencies>
        <noesis:Dependency Source="/Assets/Dialogs/Alert/Alert.xaml"/>
    </noesis:Xaml.Dependencies>
After updating, I'm given the following errors:

Cannot create 'System.Collections.Generic.List`1[[NoesisGUIExtensions.Dependency, Noesis.NoesisGUI, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]', component not registered

Cannot set value for 'noesis:Preloader.Dependencies', invalid value '' for property type 'System.Collections.Generic.List`1[[NoesisGUIExtensions.Dependency, Noesis.NoesisGUI, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]]'

As you can probably guess, I use them to instantiate dialogs at runtime. I'm hoping the dependencies haven't been deprecated. Did the syntax change?

Thanks!
 
User avatar
jsantos
Site Admin
Posts: 4823
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity: Xaml.Dependencies throws errors after updating to 3.2.9

13 Oct 2025, 11:32

It seems we broke something related to this in version 3.2.9. A ticket has been created for it: #4411.

We’ll fix that, but indeed, Xaml.Dependencies isn’t needed at all. You can simply have strong references to the required XAML inside a ScriptableObject and load them from there.
 
adambuchweitz
Topic Author
Posts: 5
Joined: 12 May 2023, 22:01

Re: Unity: Xaml.Dependencies throws errors after updating to 3.2.9

13 Oct 2025, 18:16

Thanks for the info. Does the ScriptableObject need to be instantiated to hold the strong reference? Most of my codebase is pure C# and avoids GameObjects everywhere possible, so the way
I have been opening dialogs looks something like this:
public class DialogCoordinator
{
  private Grid  _grid;
  
  public DialogCoordinator(Grid grid) => _grid = grid;
  
  public OpenPopup() =>
    _grid.Children.Add(new Alert());
}
Where Alert is a Xaml + code-behind combo:
public partial class Alert : UserControl
{
  public Alert() => InitializeComponent();
  
  private void InitializeComponent() => NoesisUnity.LoadComponent(this);
}
 
User avatar
jsantos
Site Admin
Posts: 4823
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity: Xaml.Dependencies throws errors after updating to 3.2.9

14 Oct 2025, 12:30

How are you handling other resources in Unity, such as meshes and textures? Unity typically requires hard references to these assets.
Does the ScriptableObject need to be instantiated to hold the strong reference?
No, that’s not necessary. You can also use the Preloaded Assets section in the project settings for this purpose.
 
adambuchweitz
Topic Author
Posts: 5
Joined: 12 May 2023, 22:01

Re: Unity: Xaml.Dependencies throws errors after updating to 3.2.9

15 Oct 2025, 17:47

How are you handling other resources in Unity, such as meshes and textures? Unity typically requires hard references to these assets.
A couple hard references in XAML files, a few prefabs instantiated through Resources, and a whole lot of downloaded content loaded in at runtime, generated by users.
No, that’s not necessary. You can also use the Preloaded Assets section in the project settings for this purpose.
I have put MainWindow.xaml in the Preloaded Assets section, but instantiation (via `NoesisUnity.LoadComponent(this)` fails with:
[NOESIS] Xaml not found 'Assets/Menu/Noesis/MainWindow.xaml'
I tried variations of loading by keys "MainWindow" with and without extension, with and without full pathing, with and without "assets"

How exactly should a Xaml be instantiated after it's preloaded in this way? I don't believe that's in the docs.
 
User avatar
jsantos
Site Admin
Posts: 4823
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity: Xaml.Dependencies throws errors after updating to 3.2.9

15 Oct 2025, 17:54

You can use the Load method of NoesisXaml for this purpose:
public class NoesisXaml: ScriptableObject
{
    public object Load()
    {
        RegisterDependencies();

        NoesisUnity.Init();
        return Noesis.GUI.LoadXaml(new MemoryStream(content), uri);
    }
 
User avatar
stonstad
Posts: 263
Joined: 06 Jun 2016, 18:14
Location: United States
Contact:

Re: Unity: Xaml.Dependencies throws errors after updating to 3.2.9

17 Oct 2025, 16:37

Hi there! Will there be a patch release for this fix?
 
User avatar
jsantos
Site Admin
Posts: 4823
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity: Xaml.Dependencies throws errors after updating to 3.2.9

17 Oct 2025, 18:13

Yes, 3.2.10 is coming next week.
 
adambuchweitz
Topic Author
Posts: 5
Joined: 12 May 2023, 22:01

Re: Unity: Xaml.Dependencies throws errors after updating to 3.2.9

20 Oct 2025, 21:17

Yes, 3.2.10 is coming next week.
Thank you so much! I spent some time trying to load manually, and it works fine for individual dependencies, but becomes convoluted when a xaml contains deps which contain deps, etc.
 
User avatar
jsantos
Site Admin
Posts: 4823
Joined: 20 Jan 2012, 17:18
Contact:

Re: Unity: Xaml.Dependencies throws errors after updating to 3.2.9

22 Oct 2025, 00:26

We already released 3.2.10.

Thanks everyone for the feedback!

Who is online

Users browsing this forum: No registered users and 7 guests