[wix-users] Issue with Heat & MSBuild

Ven H venh.123 at gmail.com
Sun Dec 26 21:34:34 PST 2021


Hi Bevan,

I was able to get this resolved with the help of another colleague using
the following steps.

1. Installed Build Tools for 2013 (One of the projects had ToolsVersion=12
and hence heat was complaining and to solve this, I installed this).
2. Then it threw another error. "The imported project 'C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v16.0\WebApplications\Microsoft.WebApplication.targets'
was not found. Confirm that the path in the <Import> declaration is
correct, and that the file exists on disk". To fix this, we followed the
below steps.
     a. Installed "Web Development Build Tools" workload as specified in
the link (
https://stackoverflow.com/questions/44061932/ms-build-2017-microsoft-webapplication-targets-is-missing
)
     b. Copied the contents of C:\Program Files (x86)\Microsoft Visual
Studio\2019\BuildTools\MSBuild to C:\Program Files (x86)\MSBuild and
rebooted the machine.

Thanks a lot for your help. Hope it helps anyone else in future.

On Fri, Dec 24, 2021 at 10:13 AM Ven H <venh.123 at gmail.com> wrote:

> Not sure how to get that. However, all projects (including WiX, without
> Heat) build fine using VS 2019 Professional. I installed VS 2017 and Build
> Tools for 2013 (which is for Tools Version 12).
>
>
> On Fri, Dec 24, 2021 at 1:38 AM Bevan Weiss <bevan.weiss at gmail.com> wrote:
>
>> What versions of MSBuild tools are your projects (in this solution)
>> configured for?
>>
>> They all build fine when individually targeted?
>>
>> From the GitHub issue it seems almost certain that one of your project
>> files is asking for a ToolsVersion of 12 (hence why this version of MSBuild
>> is being requested).
>> So your solution would be to correct your projects to reference a version
>> of MSBuild that you do have available.
>>
>>
>> 24 Dec 2021 06:36:52 Ven H <venh.123 at gmail.com>:
>>
>> Thank you Bevan. I did check this, but couldn't get any solution.
>>
>>
>> On Fri, Dec 24, 2021 at 12:59 AM Bevan Weiss <bevan.weiss at gmail.com>
>> wrote:
>>
>>>
>>> https://stackoverflow.com/questions/36920054/wix-toolset-build-fails-after-upgrading-from-net-4-0-to-4-6-1-cannot-load-msbu
>>>
>>> This seems to match your error message, and has a link back to a WiX
>>> GitHub issue.
>>>
>>>
>>>
>>> 24 Dec 2021 06:27:31 Ven H <venh.123 at gmail.com>:
>>>
>>> Hi Bevan,
>>>
>>> Thanks a lot for your response. I think it was built using VS 2017 or
>>> before, but not quite sure. Other WiX projects build absolutely fine (with
>>> VS 2019 and WiX 3.11.2) without heat. I searched quite a bit but didn't
>>> find anything helpful. That's why I posted here.
>>>
>>>
>>> On Fri, Dec 24, 2021 at 12:53 AM Bevan Weiss <bevan.weiss at gmail.com>
>>> wrote:
>>>
>>>> That version number for Microsoft.Build doesn't seem to match with
>>>> Visual Studio 2019.
>>>>
>>>> So what version of Visual Studio was used for the project originally?
>>>> It seems you have a fixed reference to an old MSBuild somewhere.
>>>>
>>>> Do other WiX projects work fine? (With/without Heat)
>>>>
>>>> Have you tried to google for the problem?
>>>>
>>>>
>>>> Regards,
>>>> Bevan
>>>>
>>>> 24 Dec 2021 00:42:26 Ven H via wix-users <
>>>> wix-users at lists.wixtoolset.org>:
>>>>
>>>> > Can anyone please help with this? I searched a lot, but could not
>>>> find any
>>>> > solution.
>>>> >
>>>> >
>>>> > On Wed, Dec 22, 2021 at 9:19 PM Ven H <venh.123 at gmail.com> wrote:
>>>> >
>>>> >> I have a Visual Studio 2019 Professional and Votive for 2019
>>>> installed. I
>>>> >> have WixToolSet v3.11.2 also installed. When I open an existing
>>>> solution
>>>> >> (provided by a customer), with WiX Project and try to build it, I am
>>>> >> getting the following error. In the PreBuild event, they are calling
>>>> the
>>>> >> Heat command. Can anyone please help? I think the project was built
>>>> long
>>>> >> back with WiXToolSet v3.8.
>>>> >>
>>>> >> error HEAT5316: Failed to load MSBuild wrapper object: Could not
>>>> load file
>>>> >> or assembly 'Microsoft.Build, Version=12.0.0.0, Culture=neutral,
>>>> >> PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The
>>>> system
>>>> >> cannot find the file specified.
>>>> >>
>>>> >
>>>> > ____________________________________________________________________
>>>> > WiX Toolset Users Mailing List provided by FireGiant
>>>> http://www.firegiant.com/
>>>>
>>>



More information about the wix-users mailing list