Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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>
like image 881
Styxtb1598 Avatar asked Dec 11 '14 17:12

Styxtb1598


2 Answers

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
like image 80
roryok Avatar answered Nov 19 '22 10:11

roryok


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

like image 1
bigfoot Avatar answered Nov 19 '22 09:11

bigfoot