21

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.

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:

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.

Community
  • 1
  • 1
Anton23
  • 2,079
  • 5
  • 15
  • 28
  • I had some issues moving to windows 10 which were resolved by upgrading from Wix3.8 to 3.9/3.10. While my issues were unrelated to this, might be worth a shot if you can try it on an VM or something. – Patrick Allwood Feb 01 '16 at 13:55
  • I tried with WiX Toolset v3.10. but still had a same problem – Anton23 Feb 01 '16 at 13:56
  • Did you manage to resolve the issue?? I am facing the same problem here – nozzleman Feb 04 '16 at 07:42

2 Answers2

52

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.

  1. In the control panel, open Programs and Features
  2. Click Turn Windows features on or off
  3. Select .NET Framework 3.5 and click OK
  4. Wait for the feature to install and then rebuild your project

Here is a relevant bug report on WiX.

martin
  • 825
  • 10
  • 15
  • THX Man! That's solved it. I would give you more than one Upvote, if I could... ;-) – gReX Mar 18 '16 at 09:08
  • 1
    I tried with this [4.0 build](http://wixtoolset.org/releases/v4-0-3922-0/) on a fresh Windows 10 machine with Visual Studio 2015 Update 2. The dependency on .NET Framework 3.5 is still present. I was unable to compile my wix project until I turned on the 3.5 framework feature. After enabling it and changing the schema of my .wxs file to ``, it compiled fine. – avanti Apr 11 '16 at 20:49
  • This also worked when I was trying to use MSBuild to build an InstallShield project – kay Jul 29 '16 at 19:07
  • 2
    I installed the Visual Studio 2017 WIX extension and tried to build a wix project and it failed even with .NET 3.5 installed. – Joel McBeth Mar 10 '17 at 18:46
  • 2
    This is the answer. – str8ball Jul 13 '21 at 18:50
  • I'm using the WiX Toolset extension for VS 2022, v1.0.0.20 (only available at the github project page for the extension as of this comment), and this also worked for me. – William Jul 27 '22 at 20:45
0

In my cases - VS2013 + Win10 + Wix Toolkit 3.9, I've already installed the .NET 3.5 but the error happened. Then I've modified the .wixproj to add the following variable "WixInstallPath" to point the bin directory of the Wix Toolset:

<PropertyGroup>
  ...
  <WixInstallPath>C:\Program Files\Wix Toolset v3.9\bin</WixInstallPath>
</PropertyGroup>

Yay, this solved the my issue. Build succeeded.

Mamoru Satoh
  • 2,670
  • 23
  • 23