c# - WiX element not recognized -


i need use wix manually msbuild, i'm trying create test.wixproj. i'm learning how use wix create deployer , i'm blocked. deploy img.png defined repertory.

i have (test.wixproj) :

<?xml version="1.0" encoding="utf-8"?> <wix xmlns="http://schemas.microsoft.com/wix/2006/wi">     <product id="*" upgradecode="" version="1.0.0.0" language="1033" name="my application name" manufacturer="my manufacturer name">         <package installerversion="300" compressed="yes"/>         <media id="1" cabinet="myapplication.cab" embedcab="yes" />           <directory id="targetdir" name="sourcedir">             <directory id="programfilesfolder">                 <directory id="applicationrootdirectory" name="application test"/>             </directory>         </directory>           <directoryref id="applicationrootdirectory">             <component id="myimg" guid="">                 <file id="myimg" source="...\desktop\img.png" keypath="yes" checksum="yes"/>             </component>          </directoryref>           <feature id="mainapplication" title="main application" level="1">             <componentref id="myimg.png" />         </feature>     </product> </wix> 

and when run "msbuild test.wixproj", have error :

test.wixproj<2.1>: error msb4068: item "wix" not recognized or not supported in context.

i'm lost, can me ? have difficulty understanding how works.

edit1 : i'm trying .wixproj , .wxs , have other problem.

the project not found 

i copied example your link

edit2 : think it's line source of problem.

<import project ="$(wixtargetspath)" /> 

a componentref should reference component id. using myimg.png componentref id, when there no component id. try changing componentref id "myimg".

<componentref id="myimg" />

oh , side note, should remove guids code if you're going post online.


Comments