gpt4 book ai didi

c# - 无法在 Windows 10 上构建 WIX 项目

转载 作者:可可西里 更新时间:2023-11-01 03:13:30 25 4
gpt4 key购买 nike

我的 WIX 安装程序项目使用 Visual Studio 2015 在 Windows 8.1 上成功构建。.NET 版本为 4.5.1。但是当我升级到 Windows 10 时,我无法构建我的项目。

我不知道问题是因为 Windows 10 还是其他原因。当我构建我的项目时,我收到以下错误:

Error The "WixAssignCulture" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with in the project file, or in the *.tasks files located in the "C:\Program Files (x86)\MSBuild\14.0\bin" directory. ProSafeInstaller C:\Program Files (x86)\MSBuild\Microsoft\WiX\v3.x\wix2010.targets 2340

Error The "ReadRegistry" task could not be loaded from the assembly C:\Program Files (x86)\MSBuild..\WiX Toolset v3.8\bin\WixTasks.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 具有构建依赖性。如果您在“程序和功能”中启用“.NET Framework 3.5”功能,您应该能够构建您的 WiX 项目。

  1. 在控制面板中,打开程序和功能
  2. 点击打开或关闭 Windows 功能
  3. 选择 .NET Framework 3.5 并单击确定
  4. 等待功能安装,然后重建您的项目

Here是关于 WiX 的相关错误报告。

关于c# - 无法在 Windows 10 上构建 WIX 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35132076/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com