When I run the below command from the command line for the WIx installer after migrated from version 2.0 to 4.0
E:\Code\PCPE\builder>ant -v -f Build.xml -Dlabel =.001 install
I am getting the below error:
error CNDL0004: The file element contains an unexpected attribute "src"
I am seeing the error in EMR_COMMON.wxs file in line no 4.
I am thinking that "src" attribute is deprecated and it should be replaced with some other attribute.
But here i can't directly replace the "src"
attribute in EMR_COMMON.wxs
file bcz it is generating from "Build.xml"
.
So what are the attributes i need to change in "Build.xml"
file to get the appropriate attribute inplace of "src"
in "EMR_COMMON.wxs"
file?
I resolved the issue. I write the below C# code to replace src
attribute name with Source
attribute.
For this first i got the File
node list, get the count of the file nodes and then used
XmlNodeList fileNodeList = compElement.GetElementsByTagName("File");
XmlElement fileElement = (XmlElement)fileNodeList[i];
String srcString = fileElement.GetAttribute("src");
fileElement.SetAttribute("Source", srcString);
fileElement.RemoveAttribute("src");