Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The component does not have a resource identified by the uri" when starting .NET 5 app without debugger #4090

Open
Skyppid opened this issue Jan 27, 2021 · 3 comments
Labels
Bug Product bug (most likely) Investigate Requires further investigation by the WPF team.

Comments

@Skyppid
Copy link

Skyppid commented Jan 27, 2021

  • .NET Core Version: .NET 5 (5.0.102)
  • Windows version: Windows 10 x64 (latest)
  • Does the bug reproduce also in WPF for .NET Framework 4.8?: Not using .NET Framework anymore, but it does not reproduce in Core 3.1.

After initial issues with .NET 5 which I now could fix I face the problem that I cannot start our application without debugger anymore. As soon as I change all projects to TFM "net5.0-windows" (app is windows only) I get the exception:

System.Exception: Die Komponente "SomeApp.SplashScreen" verfügt nicht über eine Ressource, die vom URI "/SomeApp;V2021.0.191.22089;component/splashscreen.xaml" identifiziert wird.
at void System.Windows.Application.LoadComponent(object component, Uri resourceLocator)
at void SomeApp.SplashScreen.InitializeComponent() in F:/Arbeit/SomeApp vNext/SomeApp vNext/SomeApp GF/SplashScreen.xaml:line 1
at new SomeApp.SplashScreen() in F:/Arbeit/SomeApp vNext/SomeApp vNext/SomeApp GF/SplashScreen.xaml.cs:line 12
at void SomeApp.App.OnStartup(StartupEventArgs e)+() => { } in F:/Arbeit/SomeApp vNext/SomeApp vNext/SomeApp GF/App.xaml.cs:line 228
at void DevExpress.Xpf.Core.SplashScreenManager+ThreadContainerImpl.ShowWindow(object startupParam)
at void System.Threading.ThreadHelper.ThreadStart_Context(object state)
at void System.Threading.ThreadHelper.ThreadStart(object obj)

When I start with the debugger attached, it starts without any issues and works perfectly fine. To rule out that this is a DevExpress issue I can only tell that we're using the correct .NET Core packages and furthermore it works perfect with .Net Core 3.1. We're using latest DevExpress Core 20.2.5 packages.

Actual behavior: Instant crash when the first window (SplashScreen) is being initialized, error stack trace above.

Expected behavior: Start without any exceptions.

Minimal repro: I cannot share the project as it is company property. I simply changed all TFMs of our solution from netcoreapp3.1 to net5.0-windows. That's all. One thing has been changed though: I added <ProduceReferenceAssembly>false</ProduceReferenceAssembly> to every project since we don't need them and our plugin-system has issues when it finds assemblies twice.

@ryalanms ryalanms added the Investigate Requires further investigation by the WPF team. label Feb 1, 2021
@ryalanms ryalanms added this to the 6.0.0 milestone Feb 1, 2021
@ryalanms ryalanms added the Bug Product bug (most likely) label Feb 1, 2021
@ryalanms
Copy link
Member

ryalanms commented Feb 1, 2021

Thanks, @Skyppid. Do you have a minimal repro I can look at?

@Skyppid
Copy link
Author

Skyppid commented Feb 3, 2021

@ryalanms I don't think so. Would be way too much work to trim it down and in my experience such issues then never reproduce. What I can tell is that on my colleagues computer it does work flawlessly.

I tried deleting the obj and bin folders and rebuild completely but it doesn't work. My colleague can start it without an exception, on my machine it crashes.

Can I give you any system info dump from both machines which might be helpful in finding the cause?

@chuongmep
Copy link

I have a same problem in here, please review, chuongmep/RevitAddInManager#7
I think Microsoft should acknowledge and fix this so that programmers don't spend a lot of time searching. Problem when I'm trying to use this same DLL in two different assemblies that both get loaded by another application.

@karelz karelz removed this from the 6.0.0 milestone Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Product bug (most likely) Investigate Requires further investigation by the WPF team.
Projects
None yet
Development

No branches or pull requests

4 participants