我制作了一个 WPF 项目,它使用需要 .Net 4.0 的组件和另一个需要 .Net 4.5 的组件
我已将我的项目设置为 .Net 4.5
我已经使用 InnoSetup 和 MSI (InstallShield) 安装程序制作了 setup.exe。
似乎只有安装了Visual Studio的电脑,安装后才能打开程序。
我还尝试安装“Microsoft .Net Framework 4.5 Multi-Targeting Pack”,这可能是必需的 - 但程序仍然无法加载......
有任何想法吗?
编辑
Windows 事件日志
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`
问候