Resources from WPF App.xaml file aren't loaded if an Application does not have StartupUri attribute - by Serdis

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


3
0
Sign in
to vote
ID 772087 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 11/24/2012 7:31:23 AM
Access Restriction Public

Description

In certain circumstances code generation tool omits to generate code that loads resources from app.xaml

At least the circumstances is:
Application has no StartupUri attribute set in App.xaml
AND
there is only one resoure in <Application.Resources> section of App.xaml
Sign in to post a comment.
Posted by Microsoft on 12/3/2012 at 5:16 PM
There is a workaround discussed in the "StackOverflow" link mentioned by "Serdis". The work around it to use the "Startup" event rather than the "OnStartup" override.

The App.InitializeComponent() is generated if you set *either* the "StartupUri" or "Startup" event on the App Element in App.Xaml.
Posted by Helen [MSFT] on 11/25/2012 at 8:26 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Macy [MSFT] on 11/24/2012 at 7:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Posted by Serdis on 11/24/2012 at 7:35 AM
It's a long-lasting bug

See http://stackoverflow.com/questions/543414/wpf-app-xaml-file-does-not-get-parsed-if-my-app-does-not-set-a-startupuri and http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/0d3fd0d8-ea9a-47d9-9e10-89db8b0243c3/