0

I have made a WPF project which uses components which require .Net 4.0 and another that requires .Net 4.5

I have set my project to target .Net 4.5

I have made an setup.exe with both InnoSetup and MSI (InstallShield) installer.

It seems that only pc's with Visual Studio installed, can open the program after installing it.

I have also tried to install "Microsoft .Net Framework 4.5 Multi-Targeting Pack" thinking, that maybe that was required - but the program is still unable to load...

Any ideas?

EDIT

Windows event log

Program: BingTestWPF.exe
Framework-version: v4.0.30319
Beskrivelse: Denne proces blev afsluttet pga. en ubehandlet undtagelse.
Undtagelsesoplysninger: System.Windows.Markup.XamlParseException
Stak:
ved System.Windows.Markup.WpfXamlLoader.Load(System.Xaml.XamlReader,     System.Xaml.IXamlObjectWriterFactory, Boolean, System.Object, System.Xaml.XamlObjectWriterSettings, System.Uri)
ved System.Windows.Markup.WpfXamlLoader.LoadBaml(System.Xaml.XamlReader, Boolean, System.Object, System.Xaml.Permissions.XamlAccessLevel, System.Uri)
ved System.Windows.Markup.XamlReader.LoadBaml(System.IO.Stream, System.Windows.Markup.ParserContext, System.Object, Boolean)
ved System.Windows.Application.LoadBamlStreamWithSyncInfo(System.IO.Stream, System.Windows.Markup.ParserContext)
ved System.Windows.Application.LoadComponent(System.Uri, Boolean)
ved System.Windows.Application.DoStartup()
ved System.Windows.Application.<.ctor>b__1(System.Object)
ved System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
ved MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
ved System.Windows.Threading.DispatcherOperation.InvokeImpl()
ved System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
ved System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
ved System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
ved System.Windows.Threading.DispatcherOperation.Invoke()
ved System.Windows.Threading.Dispatcher.ProcessQueue()
ved System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
ved MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
ved MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
ved System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
ved MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
ved System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
ved MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
ved MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
ved MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
ved System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
ved System.Windows.Application.RunInternal(System.Windows.Window)
ved System.Windows.Application.Run()
ved BingTestWPF.App.Main()`


Assembly list :

DlhSoft.Data.Controls
DlhSoft.Data.Core
DlhSoft.HierarchicalData.Controls
DlhSoft.HierarchicalData.Core
DlhSoft.ProjectData.Core
DlhSoft.ProjectData.GanttChart.Controls
DlhSoft.ProjectData.Management.Controls
Microsoft.CSharp
Microsoft.Maps.MapControl.WPF
PresentationCore
PresentationFramework
SpreadsheetGear2012.Core
System
System.Core
System.Data
System.Data.DataSetExtensions
System.Drawing
System.EnterpriseServices
System.Web.Services
System.Windows.Forms
System.Xaml
System.Xml
System.Xml.Linq
WindowsBase`

Regards

rollekn
  • 63
  • 1
  • 1
  • 4
  • 5
    Is there any error message? What components / assemblies have you referenced (full list)? – Marc Gravell Nov 14 '13 at 09:55
  • Is it a debug build or release build? – Jite Nov 14 '13 at 09:57
  • there can be a lot of reasons for the application crash (.net frameworks version issues/os version /Visual C++ Redistributableetc.) if you dont provide us the error message (can be found in the event manager) this will be only guess work – makc Nov 14 '13 at 10:00
  • @MarcGravell No error messages - the installation will succeed, but nothing shows up when trying to launch program. It comes up in task manager, then dissappears. Every .dll file which is referenced to in the project, are used when creating the setup.exe – rollekn Nov 14 '13 at 10:01
  • @Jite It's a debug release – rollekn Nov 14 '13 at 10:01
  • 1
    @user2724352: Does the Windows event log show anything? – O. R. Mapper Nov 14 '13 at 10:01
  • "Every .dll file which is referenced to in the project, are used when creating the setup.exe" yes, but that doesn't mean that everything **you are using** is there; most likely one of the things *you* are referencing has an onwards dependency to GAC or COM or System32. So again: what components / assemblies have you referenced (full list)? – Marc Gravell Nov 14 '13 at 10:08
  • 1
    Another approach is to watch the "fusion" / assembly-load logs (in the debugger is usually fine) to see which assemblies your app is loading. It can be **a lot** more than just the ones you think you are referencing. – Marc Gravell Nov 14 '13 at 10:09
  • If its built in debug-mode it might be the issue, build it as release and see if that does any difference. – Jite Nov 14 '13 at 10:31
  • @MarcGravell check my edit - not sure if this is what you meant – rollekn Nov 14 '13 at 10:36
  • @makc i've edited the question so that it contains the error from windows log now – rollekn Nov 14 '13 at 12:48
  • unfortunately the error doesn't give enough info, what OS are the wpf app running on ? make sure all the dll's are available and are of the right version, do you have dependency on c++ dlls? – makc Nov 14 '13 at 13:29
  • I tried both Win7 and Win8... Not using c++ dlls that i know of ... I've tried almost every solution that i could find here on stackoverflow - none of them have worked so far – rollekn Nov 14 '13 at 13:36
  • you can try remote debugging – makc Nov 15 '13 at 12:20

1 Answers1

0

I solved this, by installing the redistributional package to the machine. It seems im using some dll assemblies, because the project was set to 64 bit.

However, if I set the application to run on 32-bit, these were not needed, and the application could run without that package.

rollekn
  • 63
  • 1
  • 1
  • 4