Installshield 限量版要求 .Net 框架文件和程序不是 运行 没有 visual studio

Installshield limited edition asking for .Net framework files and program not running without visual studio

我在 VS 2013 社区版中有一个解决方案,我最近添加了一个带有 Installshield 限量版的安装项目。

当我重新构建解决方案时(在发布 x64 模式下),installshield 项目警告我以下文件:

Warning -6245: One or more of the project's components contain .NET properties that require the .NET Framework.  It is recommended that the release include the .NET Framework. 16  ISEXP : warning : -6245: One or more of the project's components contain .NET properties that require the .NET Framework.  It is recommended that the release include the .NET Framework.

Warning -6248: Could not find dependent file Microsoft.ServiceBus, or one of its dependencies of component PLATOS.Primary_output    18  ISEXP : warning : -6248: Could not find dependent file Microsoft.ServiceBus, or one of its dependencies of component PLATOS.Primary_output

Warning -6248: Could not find dependent file Microsoft.VisualStudio.CodeMarkers.dll, or one of its dependencies of component PLATOS.Primary_output  19  ISEXP : warning : -6248: Could not find dependent file Microsoft.VisualStudio.CodeMarkers.dll, or one of its dependencies of component PLATOS.Primary_output

Warning -6248: Could not find dependent file Newtonsoft.Json, or one of its dependencies of component PLATOS.Primary_output 20  ISEXP : warning : -6248: Could not find dependent file Newtonsoft.Json, or one of its dependencies of component PLATOS.Primary_output

Warning -6248: Could not find dependent file System.Data.SQLite, or one of its dependencies of component PLATOS.Primary_output  21  ISEXP : warning : -6248: Could not find dependent file System.Data.SQLite, or one of its dependencies of component PLATOS.Primary_output

Warning -6248: Could not find dependent file System.Net.Http.Formatting, or one of its dependencies of component PLATOS.Primary_output  22  ISEXP : warning : -6248: Could not find dependent file System.Net.Http.Formatting, or one of its dependencies of component PLATOS.Primary_output

Warning -6248: Could not find dependent file System.Web.Http, or one of its dependencies of component PLATOS.Primary_output 23  ISEXP : warning : -6248: Could not find dependent file System.Web.Http, or one of its dependencies of component PLATOS.Primary_output

在 Installshield 安装向导中,我选择安装程序查找 .Net 4.5。所以我不明白那些警告。

当我在未安装 Visual Studio(但安装了最新的 Net 框架 (4.5.2))的计算机上安装带有设置的软件时,程序打开(我在任务管理器中看到)并在不显示 GUI 的情况下关闭。而且,当我只是将\bin\release文件夹复制到没有Visual studio的计算机上时,程序仍然不会运行。

我的猜测是程序以某种方式需要 installshield 警告我的文件,但这些文件不应该由 .Net 4.5 安装吗?

我看到其他线程通过在发布模式下编译解决了问题,但我已经在这样做了,所以我不知道哪里出了问题。

感谢任何帮助。

您的程序似乎引用了 Microsoft.VisualStudio.CodeMarkers 程序集,顾名思义,该程序集并未分布在 .Net 框架中,而是在 Visual Studio.

在您的解决方案中,您可以通过打开 "References" 文件夹来查看项目的引用。删除 Microsoft.VisualStudio.CodeMarkers,构建您的项目,看看有什么问题。右键单击此引用,select "properties",然后在 属性 窗格中的 "local copy" 字段中,select "True"。对 Microsoft.ServiceBus.

做同样的事情

此外,请确保您的 nuget 包(如 Newtonsoft.Json)包含在您的 InstallShield 安装程序中以供分发。

请post你的安装脚本,我会帮助你。 在我们解决您的 installshield LE 是否损坏、生成错误文件、调用不正确的 dll 或某处存在不稳定问题之前,我们需要知道此解决方案是否曾在任何机器上成功构建。

如果解决方案从未离开过这个系统,并且在某个时候已经成功构建,那么您的 bin 中可能有合法文件,但 MS .Net Framework 文件夹下的临时文件夹包含错误文件(但让我们还没有去那里)。

你提到你已经发布了,所以有一些问题:

(1) 这个解决方案是从另一台安装了 Windows Visual Studio SDK 的机器上提取的吗?

(2) 这个解决方案最初是用命令行构建器构建的吗?

(3) 如果移动了解决方案,是否有任何其他包在恢复时抱怨但不在上面的错误列表中? (例如,它可能仅在输出中显示)。

(4) 当您进入 Installshield UI 时,您是否看到任何缺少的依赖项?

请确保您在加载解决方案时完成了恢复包的步骤。

我建议安装 Visual Studio SDK,看看您是否能获得更多线索或缩小问题范围。

澄清一下,根据您目前告诉我们的内容,检查恢复包错误和安装 SDK 是重要的故障排除步骤。

下一个合乎逻辑的步骤是在构建时通过扫描确认依赖关系和/或任何已恢复的包都被正确引用,这样你就可以缩小这一长串抱怨包的范围(恕我直言,这只是把事情搞得一团糟) .

我几乎不想提这个,因为它更像是一种解决方法,取决于您是否曾经在此系统上成功构建过,但如果更糟,您可以使用 Installshield UI 来在您的 obj\Release 文件夹中添加最新的 DLL 并重新构建。

付费版本曾经有一个完整的示例项目,但我已经有几年没有使用 installshield 了。

嗯,好久不见,我发现了问题

首先,为了确保万无一失,请使用 NuGet 管理器安装所有依赖项。 (只要有可能)

然后就像我的情况一样,我用 C++CLI 包装了 C++,我使用 VS 2013,手动安装 Visual C++ Redistributable Packages for Visual Studio 2013

这使得程序可以在新格式化的 windows 7.

上正确执行