问题描述
我的 WIX 安装程序项目已在 Windows 8.1 和 Visual Studio 2015 上成功构建..NET 版本是 4.5.1.但是当我升级到 Windows 10 时,我无法构建我的项目.
My WIX installer project was successfully building on windows 8.1 with Visual Studio 2015. .NET version is 4.5.1. But when I upgraded to windows 10 I could not build my project.
我不知道问题是因为 Windows 10 还是其他原因.当我构建我的项目时,我收到以下错误:
I don't know wether the problem is because of windows 10 or something else.When I build my project I receive the following errors:
错误WixAssignCulture";未找到任务.检查以下内容: 1.) 项目文件中的任务名称与任务类的名称相同.2.)任务类是公共的";并实现 Microsoft.Build.Framework.ITask 接口.3.) 在项目文件或位于C:Program Files (x86)MSBuild14.0in"中的 *.tasks 文件中正确声明了任务目录.ProSafeInstaller C:Program Files (x86)MSBuildMicrosoftWiXv3.xwix2010.targets 2340
错误ReadRegistry";无法从程序集 C:Program Files (x86)MSBuild..WiX Toolset v3.8inWixTasks.dll 加载任务.无法加载文件或程序集Microsoft.Build.Utilities,Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a"或其依赖项之一.Не удается найти указанный файл.确认声明正确,程序集及其所有依赖项都可用,并且任务包含实现 Microsoft.Build.Framework.ITask 的公共类.自定义操作.
Error The "ReadRegistry" task could not be loaded from the assembly C:Program Files (x86)MSBuild..WiX Toolset v3.8inWixTasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. Не удается найти указанный файл. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. CustomActions.
推荐答案
WiX 对 NETFX v3.5 有一个 build 依赖.如果您在程序和功能"中启用.NET Framework 3.5"功能,您应该能够构建您的 WiX 项目.
WiX has a build dependency on NETFX v3.5. If you enable the ".NET Framework 3.5" feature in "Programs and Features", you should be able to build your WiX projects.
- 在控制面板中,打开程序和功能
- 点击打开或关闭 Windows 功能
- 选择 .NET Framework 3.5 并点击确定
- 等待功能安装,然后重新构建您的项目
这里是有关 WiX 的相关错误报告.
Here is a relevant bug report on WiX.
这篇关于无法在 Windows 10 上构建 WIX 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!