I have a UserControl user element that is on the Assembly assembly. I have a WPF application that creates UserControl program code. I have already added a link to the Assembly. However, at runtime, I get ff. an exception:
Cannot locate resource 'usercontrol.xaml'.
at MS.Internal.AppModel.ResourcePart.GetStreamCore(FileMode mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream(FileMode mode, FileAccess access)
at System.IO.Packaging.PackagePart.GetStream()
at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
...
I changed the build action for UserControl.xaml to EmbeddedResource, but this caused compilation problems, so I returned it to the default settings. I tried this in .NET 3 and 4 to no avail. Does anyone have an idea?
source
share