简体   繁体   English

发布的项目需要安装Visual Studio

[英]Published project requires visual studio installed

I have made a WPF project which uses components which require .Net 4.0 and another that requires .Net 4.5 我已经制作了一个WPF项目,该项目使用需要.Net 4.0的组件和需要.Net 4.5的组件。

I have set my project to target .Net 4.5 我已将项目设置为目标.Net 4.5

I have made an setup.exe with both InnoSetup and MSI (InstallShield) installer. 我已经用InnoSetup和MSI(InstallShield)安装程序制作了一个setup.exe。

It seems that only pc's with Visual Studio installed, can open the program after installing it. 似乎只有安装了Visual Studio的PC才能在安装后打开程序。

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... 我还尝试安装“ Microsoft .Net Framework 4.5多目标包”的想法,也许这是必需的-但该程序仍然无法加载...

Any ideas? 有任何想法吗?

EDIT 编辑

Windows event log 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`

Regards 问候

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. 似乎我正在使用某些dll程序集,因为该项目设置为64位。

However, if I set the application to run on 32-bit, these were not needed, and the application could run without that package. 但是,如果我将应用程序设置为在32位上运行,则不需要它们,并且该应用程序可以在没有该程序包的情况下运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 已发布程序上的 NullReferenceException 但在 Visual Studio 中没有 - NullReferenceException on published program but not in Visual Studio 未安装带有Unity Project目标框架的Visual Studio 15 - Visual Studio 15 with Unity Project Target Framework Not Installed 无法在 Visual Studio 17 中运行使用安装项目安装的应用程序 - Cannot run application installed using Setup Project in Visual Studio 17 使用Visual Studio 2017构建的.NET 4.7.2 C#控制台应用程序的ILRepack需要在Windows 7上安装框架 - ILRepack of .NET 4.7.2 C# console app built with Visual Studio 2017 requires framework installed on Windows 7 如何在未安装Visual Studio的其他计算机上运行Visual Studio项目 - how to run visual studio project in other computer which does not have visual studio installed in it Visual Studio需要Windows 10吗? - Visual Studio requires windows 10? Kinect SDK需要Visual Studio吗? - Kinect SDK requires Visual Studio? Visual Studio外部引用在发布的网站上不起作用 - Visual Studio External references not working on published website 发布 Visual Studio 应用程序时 SoundPlayer 不工作 - SoundPlayer not working when visual studio application is published 创建Xamarin.Forms跨平台应用程序时出现“此项目需要Visual Studio更新才能加载”错误 - “This project requires a Visual Studio update to load” error when creating a Xamarin.Forms Cross-Platform Application
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM