开发者

TFS BuildProcessTemplate - Switch<T> always seems to choose Default option

I'm attempting to get a build process template to switch build tools based on the project file extension (specifically, I'm trying to build some Sandcastle and SqlSpec documentation projects without using MSBuild 4.0). I'm trying to use the Switch<T> construct to choose the tool by examining the project's file extension.

For some reason, however, the Switch<T> construct always executes the Default option. I've configured it so that a Switch<String> checks the variable I created to hold the project extension against variables to which I've assigned my 开发者_运维问答documentation extensions (i.e.: localProjectExtension against sandcastleProjectExtension and sqlSpecProjectExtension). Yet, no matter what I do, the Default case, in which MSBuild 4.0 will run, always executes. I've tried printing out the extensions I'm parsing out of the file name just to make sure they look good, and they do. I've been at this for hours, and I'm kind of stumped.

Does this sound like a familiar problem to anyone? Would an XAML block help?


Maybe you typed the values at case with "'s. The switch already knows, that you are going to type a string, so you DONOT type the “’s. That’s why you possibly execute always the default option.

He has done a similar task, as you wanted to do: http://donovanbrown.com/post/I-need-to-build-a-project-that-is-not-supported-by-MSBuild.aspx


Just enter the cases without the brackets... Instead of "2010" just use 2010

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜