Nope, it's still there.
I copied "IX PatchBay 3.0.GUI.dll" to three new files named according to the number of inputs and outputs, ie. "IX PatchBay 3.0 12x4.GUI.dll"
At first it seems that everything works fine. I can create instances of the various machines and the GUI opens fine but at some point I'll create an instance and opening the parameter window throws the exception:
Message=The component 'GUI.PatchbayGUI' does not have a resource identified by the URI '/IX Patchbay 3.0.GUI;component/ix%20patchbay%203.0.gui..xaml'.
Source=PresentationFramework
StackTrace:
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
at GUI.PatchbayGUI.InitializeComponent()
at GUI.PatchbayGUI..ctor()
at GUI.MachineGUIFactory.CreateGUI(IMachineGUIHost host)
It looks like loading the same dll with a different name causes a resource id conflict with the previously loaded dlls. The exception happens in this auto-generated function...
Code: Select all
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/IX Patchbay 3.0.GUI;component/ix%20patchbay%203.0.gui..xaml", System.UriKind.Relative); // DO I NEED TO GENERATE THIS STRING AT RUNTIME?
#line 1 "..\..\IX Patchbay 3.0.GUI..xaml"
System.Windows.Application.LoadComponent(this, resourceLocater); // EXCEPTION THROWN HERE
#line default
#line hidden
}
I found a
related thread on stackoverflow but it's a slightly different problem and I don't understand it well enough to adapt the workaround for my situation.
A professional opinion could save me hours of stab-in-the-dark coding. Could I sidestep the issue by loading the xaml from a file instead of embedding it as a resource?
HELP!