I have a WPF application which loads other WPF applications. I want to know at runtime if a particular application is WPF application or non WPF application, so that exception can be raised accordingly for Non WPF application. Any way to figure out if particular solution is WPF or not ?
views:
48answers:
2
+2
A:
You can use the Assembly.GetReferencedAssemblies() on the external WPF application assembly and see if it references PresentationCore and PresentationFramework, which are the core of WPF. However they can be referenced to do internal things and not to show a WPF UI. You have no way of knowing that.
Julien Lebosquain
2009-10-05 09:51:53
A:
Thanks for your response. Do you think it would be better if I use EnvDTE to do this. I guess all WPF project have ProjectTypeGUID as {60DC8134-EBA5-43B8-BCC9-BB4BC16C2548} So may be if somehow I get this for application and compare it with above mentioned GUID. So any suggestion on how I can approach this ?
Thanks.
WPFer
2009-10-06 06:22:36