开发者

WiX & MSBuild : Unrecognized Attribute in App.Config

开发者 https://www.devze.com 2023-04-12 10:34 出处:网络
I have been banging my head against this one for two days... I have a WiX project that is built by MSBuild on my Team Foundation Server. I have a Build Definition set up, and all was wo开发者_运维技巧

I have been banging my head against this one for two days...

I have a WiX project that is built by MSBuild on my Team Foundation Server. I have a Build Definition set up, and all was wo开发者_运维技巧rking well for about two weeks. Then I added an extra attribute to the custom section in the app.config of the Project that WiX is packaging...

When I build locally, the MSI generated by WiX installs perfectly - no errors. When I build on TFS using the Build Definition then copy the MSI locally to test the install, I get "Unrecognized Attribute CustomAttribute. Note that attribute names are case-sensitive." error in Event Viewer before my installation fails.

I intentionally hang the installation so I can see the files in the installation directory, and I look at the app.config. CustomAttribute is defined with a value in my custom section. Then I use dotPeek and look at the executable, and the property in my ConfigurationSection class is decorated with the correct ConfigurationPropertyAttribute, and the spelling is correct. The property returns this[CustomAttribute].ToString(), as expected.

So what am I missing? Any clues would be appreciated.

EDIT (Additional Information) It appears that MSBuild is grabbing the wrong version of the Custom Section source file. I set the source file to be copied to the output directory so I could see which one it is using, and also labeled the file during the build, and both of those display the correct file. However, in the application, the wrong file is used. So I'm leaning towards a Project issue instead of a WiX or TFS issue, but three of us working on this cannot figure it out...


It's not clear from your question what the installer is doing with the app.config file. Unless the installer is reading the file somehow, I wouldn't have thought it would matter what content is in it?

I can't offer any specific advice on your issue (if it's still outstanding, months after being asked), but I can suggest the use of Orca for reading the MSI table, and 7zip for extracting the files within the MSI. I've gotten answers to many of my MSI questions by examining MSIs in Orca.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号