Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
857 views
in Technique[技术] by (71.8m points)

visual studio 2017 - WiX Toolset: Creating a simple WiX project breaks in VS2017: The "CreateProjectReferenceDefineConstants" task was not found

I'm new to using Wix, and tried to make a simple installation for my App. I did the following:

  1. Downloaded and installed the Extension for Visual Studio 2017 from here.
  2. Download and installed WiX Toolset v3.11.1
  3. Created a Setup Project for WiX v3
  4. Added a reference to my App in the project, and added the block in Product.wxs:

<Component Id="ProductComponent">
  <File Source="$(var.MyApplication.TargetPath)" />
</Component>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

.NET Framework 3.5: After some debugging the solution was to install the .NET Framework 3.5.

  • WiX 3.x has a build-dependency requiring this version.
  • WiX 4.x requires .NET Core and Framework 4+.

Procedure:

  1. Hold Windows Key and Tap R. Type: appwiz.cpl and press Enter.
  2. Left pane, click "Turn Windows Features On / Off".
  3. Tick / enable: ".NET Framework 3.5".
  4. Run Windows Update (!) . If you can. To check for security updates.
    • On Windows 10:
      • Hold Windows Key and Tap R.
      • Type: ms-settings:windowsupdate and press Enter.
      • Click "Check for updates".

Now you should be able to build your WiX projects.

Or talk to tech support if you are in a managed environment. They should have a ready-made package for this .NET runtime, unless the runtime itself is prohibited from use.


Links:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...