Very weird exception: Cannot load resource in Generic.xaml when using .NET Framework >= 4.0 and Visual Studio 2015
ricardopieper opened this issue · 0 comments
Note: I wrote all this text below, and then I saw this:
https://connect.microsoft.com/VisualStudio/feedback/details/1329814/visual-studio-cannot-launch-application
Disabling UI debugging solves the issue. No problem for me, I don't use that feature.
I'll keep the text though.
Edit: Thanks for the NumericUpDown. You saved me.
Hello!
I installed WPFControls through NuGet using Visual Studio 2015. I'm getting an exception at runtime when I run the app inside VS. It says that the resource referenced by TAlex.WPF.Controls;component/Themes/NumericUpDown.xaml at Generic.xaml
could not be found. It happens only when I run it inside Visual Studio 2015, and only when I run it on 2015, Debug or Release. 2013 works just fine. Also, running outside Visual Studio works fine.
The error in portuguese is:
{"Não é possível localizar o recurso 'talex.wpf.controls;v2.0.1.0;themes/talex.wpf.controls;component/themes/numericupdown.xaml'."}
In english it just means Cannot locate resource ....
.
The path is a little odd: themes/talex.wpf.controls;component/themes/numericupdown.xaml, seems to be repeating the /themes folder.
I'm using .NET 4.5 in my project, and WPFControls seems to be using 4.0. But then I cloned the earliest WPFControls repo, in which the version is 1.4.1.0. I noticed that the library is compiled with .NET 3.5, while the demo project uses .NET 3. If I run it inside VS2015, it runs fine out of the box.
Then upgraded the demo project to .NET 4 and 4.5, and the same error happens:
{"Não é possível localizar o recurso (cannot locate resource) 'talex.wpf.controls;v1.4.1.0;themes/talex.wpf.controls;component/themes/numericupdown.xaml'."}
If I use .NET 3.5 in both projects, it works fine.
Then I tried the same using Visual Studio 2013. It works fine even when I crank up the .NET to 4.6.
Any ideas? I tried changing the source value at Generic.xaml but no avail. It must be something wrong with Visual Studo 2015 and the debugger it attaches.