[wix-users] unable to build any WIX projects in VS2015 and Win10
Ian Bell
ib at ianbellsoftware.com
Mon Nov 30 08:08:23 PST 2015
Hello Brian,
I had already tried changing the Target Framework in the Windows form
application and set it to the full range available (i.e. Net framework 4.0,
4.5, 4.5.1, 4.5.2 and 4.6). At no time did the test Windows form
application target .Net 3.5 because .Net 3.5 was not installed on the
virtual computer. I got the same ' CreateProjectReferenceDefineConstants'
error message regardless of which framework is targeted. Note, these tests
are all being run in a VMWare V11 virtual machine, not that a virtual
machine should make a difference.
After reading your response, I decided to try installing the .Net 3.5
framework on the Win10 computer. After installing .Net 3.5 then I was
able to successfully build the WIX project regardless of which Target
framework was selected for the Windows forms application. This indicates to
me that WIX itself has a dependency on the .Net 3.5 framework and will fail
if .Net 3.5 is not installed on the computer. Anyways, the good news is
that I can continue learning/testing WIX on Win10.
I would like to thank you for helping me get past a problem I had been
fighting with for 2 days.
Cheers,
Ian
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Brian Enderle
Sent: November 30, 2015 07:30
To: ibell at instepsystems.com; WiX Toolset Users Mailing List
Subject: Re: [wix-users] unable to build any WIX projects in VS2015 and
Win10
This might have something to do with installed frameworks (see
http://blogs.msdn.com/b/astebner/archive/2007/03/14/mailbag-what-version-of-
the-net-framework-is-included-in-what-version-of-the-os.aspx).
Windows 7 came with .NET 3.5 installed and Windows 10 comes with 4.5
installed and 3.5 as an option which you can add via "Programs and
Features".
Check which version of .NET you are targeting in your application project
(right-click on project name and look under Application for Target
Framework). If you are targeting .NET 3.5 there are DLLs for both
"Microsoft.Build.Utilities" and "Microsoft.Build.Utilities.v3.5". In .NET
4.0+ there is just "Microsoft.Build.Utilities.v4.0"
The error message "Could not load file or assembly
'Microsoft.Build.Utilities, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies" would seem to
indicate you are attempting to reference .NET 3.5 and the project is
targeting .NET 4.0+. There is no "Microsoft.Build.Utilities" available in
.NET 4.0+
If the application's framework is .NET 4.0 or higher, check the
application's references and if there is a reference to
Microsoft.Build.Utilities, remove it and add the
Microsoft.Build.Utilities.v4.0 reference.
Brian
If you can't explain it simply, you don't understand it well enough. -
Albert Einstein
More information about the wix-users
mailing list