Unresolved reference to symbol 'Property:NETFRAMEWORK45' in section 'Product:*'
Asked Answered
D

2

13

I am getting an error when building an app in TFS 2010. Unresolved reference to symbol 'Property:NETFRAMEWORK45' in section 'Product:*'. This is for Wix 3.9

The Wix package has NetFxExtension referenced. I can build the wix on my local machine fine, but when I go to build it through TFS I get the error. Can anyone help me figure this out? I have the below code that is causing the error.

<PropertyRef Id="NETFRAMEWORK45"/>
<Condition Message="This application requires .NET Framework 4.5. Please install the .NET Framework 4.5 then run this installer again.">
  <![CDATA[Installed OR NETFRAMEWORK45]]>
</Condition>
Distributor answered 11/12, 2014 at 17:10 Comment(6)
The message couldn't get any clearer than that :) Do you have .NET 4.5 installed on the build machine?Adame
It is there on the build machine. It is not looking for the build machine's framework though. It is trying to build the msi and says the Property NETFRAMEWORK45 is invalid in the Wix installer when that property has been there since wix 3.6. If I remove that check, the msi builds fine and the condition only comes into play on the machine I am installing onDistributor
We had a similar problem, though the property we were using was WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED. Turned out we had WiX 3.9 installed on the build server, while 3.10 on development machines. Upgrading to WiX 3.10 helped. Seems the property is not resolved in previous versions.Moorish
I had this problem, had all the required elements. Was building with msbuild from a build script. Didn't work until I did a manual build from within Visual Studio on the Wix project, build succeeded, then build script worked after that ??Askance
@bigfoot: you should make your comment an answer! It worked for me related to WIXNETFX4RELEASEINSTALLED from github.com/wixtoolset/issues/issues/5575 as well!Wollongong
@FlorianStraub it is done.Moorish
W
22

You have to include the WixNetFxExtension in your project, in up to 3 places

  1. in the Wix element of your wxs file, add the namespace xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension"

  2. Add a reference to WixNetFxExtension.dll in your project

  3. If you are building manually using light.exe, you also need to add -ext WixNetFxExtension to your command line
Ways answered 14/1, 2015 at 15:21 Comment(2)
what do you do when you still get the error even though wix extensions is correctly added?Tragacanth
no idea, sorry. this fixed it for me. retrace and make sure you haven't missed any steps?Ways
M
1

As suggested by Florian Straub to my comment, I added my comment as an answer to the post, in addition to a comment on the original post.

We had a similar problem, though the property we were using was WIX_IS_NETFRAMEWORK_46_OR_LATER_INSTALLED. Turned out we had WiX 3.9 installed on the build server, while 3.10 on development machines. Upgrading to WiX 3.10 helped. Seems the property is not resolved in previous versions

Moorish answered 24/6, 2019 at 19:27 Comment(1)
I experienced the same with WIXNETFX4RELEASEINSTALLEDWollongong

© 2022 - 2024 — McMap. All rights reserved.