亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb

首頁 > 學院 > 開發設計 > 正文

MSBuild, NAnt, NUnit, MSTest所帶來的不爽

2019-11-18 16:48:11
字體:
來源:轉載
供稿:網友

Oh bother. Visual Studio 2003 and Cruise Control.NET. Simple and elegant. A basic NAnt script to build the solution and you're good to go. Run NUnit, output goes to a format CC can understand and Bob's yer uncle. Let me quantify this. Our cruise server has a subversion client (command line) and the .NET 1.1 SDK. Visual Studio isn't installed because, duh, it's a server and cruise just needs something to build the system with.

Enter Visual Studio 2005. I just recently setup CI for our 2005 PRojects but it's just plain ugly, in so many ways. First there was trying to get the system to build using MSBuild. That was fine because you can simply enter this:

msbuild /t:rebuild solutionname.sln

(or whatever target you want like Debug or Release)

Like I said, if that's all it was no problem but it gets real ugly real fast.

First there's VSTS unit test projects. The team is all equipped with Visual Studio Team Suite. An expensive proposition, but one made long ago by someone wiser than me. No problem though. We're not really using the Test Manager much, there are no automated web tests, so we just write unit tests (and run them with Jamie Cansdales Excellent TestDriven.NET). However when MSBuild gets ahold of a solution that contains a VS unit test project it needs some additional set of assemblies (assemblies buried in the GAC_MSIL and other places). The snippet in the ccnet.config file to get MSBuild going was pretty straight forward:

<msbuild>
    <executable>C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/MSBuild.exe</executable>
    <workingDirectory>D:/ccnet/projects/ProjectName</workingDirectory>
    <projectFile>SolutionName.sln</projectFile>
    <buildArgs>/noconsolelogger /p:Configuration=AutomatedBuild /v:diag</buildArgs>
    <targets>Build</targets>
    <timeout>600</timeout>
    <logger>C:/Program Files/CruiseControl.NET/server/ThoughtWorks.CruiseControl.MsBuild.dll</logger>
</msbuild>

Through brute force (run MSBuild, figure out what assembly it needs, go find it, lather, rinse, repeat) I was able to get a 2005 solution (with unit test projects) to compile. However actually running the tests is another story. Again brute force reigned supreme here as I trodded through an hour or two of running MSTest.exe to try to coax a couple hundred unit tests to run. The cc.config entry for getting some unit tests looks something like this:

<exec>
    <executable>C:/Program Files/Microsoft Visual Studio 8/Common7/IDE/MSTest.exe</executable>
    <baseDirectory>d:/ccnet/projects/ProjectName</baseDirectory>
    <buildArgs>/testcontainer:Source/Tests/UnitTests/bin/AutomatedBuild/UnitTests.dll /runconfig:localtestrun.Testrunconfig /resultsfile:testResults.trx</buildArgs>
    <buildTimeoutSeconds>600</buildTimeoutSeconds>
</exec>

Remember that I said this sever did not have Visual Studio installed. For the VS2005 solutions, I just installed the .NET SDK 2.0 and that was good enough. Although MSTest.exe isn't included, I snagged the file (and it's crazy set of additional DLLs scattered all over the hard drive) from another system and stuck it where the EXE was so it would be happy.

No dice on running MSTest against a unit test project. It started down the path of running the test, but then hit a crazy COM error (CLSID not registered) and that was enough for me. No way I'm going to track down all the stupid COM registry settings for Visual Studio 2005. And what the hell was this? COM? I thought we got rid of that about 3 compilers ago?

So I was stuck to installing a full Team Suite on the server. Okay, I'll bite. I mean, I don't need everything so it'll be okay (I keep telling myself as I watch a million registry entries fill up). A few hours later and I'm staring at my command prompt again and type in my MSTest.exe command. And a dialog box pops up. Yup, a modal dialog box that tells me something is wrong (I don't remember the specifics but it wasn't very informative).

Visual Studio was installed fine and I could compile and run and build the solution I was trying to, but testing from the command line with MSTest.exe was a no-go. No matter how hard I tried, how much I cleaned up, or how many virgins I sacrificed it just won't go. And there's another problem. With 2003 and our NUnit tests, we go some nice stats. Timings, informative messages, all that good stuff. With MSTest we get nothing (other than x number of tests ran and maybe a failure, but I couldn't get that far to see if it would give the details of the failure). On top of that, the MSBuild logger bites and produces about 10,000 lines of gobbly-gook that isn't very useful. Yes, I could spend my time writing new xslt to make it pretty, trim out the "Everything was okay" lines that fill up the MSBuild task logger but I think that's not value-added at my rates.

Here's a sample email I got from the build which gives you an idea of how useless a CC.NET/MSBuild/MSTest combo is:

BUILD SUCCESSFUL
Project:  PROJECTNAME
Date of build:  12/8/2006 8:08:30 AM
Running time:  00:00:55
Integration Request:  intervalTrigger triggered a build (ForceBuild)
Errors (1) 
D:/ccnet/projects/PROJECTNAME/Source/Reports/ServerReports/ServerReports.rptproj (2,1): error MSB4041: The default xml namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="Warnings (1) 
Source/Reports/ServerReports/ServerReports.rptproj (,): warning MSB4122: Scanning project dependencies for project "Source/Reports/ServerReports/ServerReports.rptproj" failed. The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="
Tests run: 0, Failures: 0, Not run: 0, Time: 0 seconds 
No Tests Run
This project doesn't have any tests
 
Modifications since last build (0) 


It's ugly. Really ugly. MSBuild produces a ton of crazy output. Writing a new MSBuild file is no walk in the park and even for someone like me that knows NAnt quite well, I'm still wrapping my head around how MSBuild does stuff. I had to create a special configuration inside of Visual Studio to omit our Report project because MSBuild can't build them (hence the target AutomatedBuild above which is not the same configuration that our developers use and something I don't like doing because that's one point of a CI server, consistent builds for everyone).

From the output above, Cruise said the build was okay but there's an error message that came out of the MSBuild logger (our report project). This is a 2005 project so the information makes no sense (I belive it's a bug that's logged but who knows when it might get fixed). And I really can't integrate the MSTest output into the email because, well, there is none. There's a hundred tests or so in this project but the logger doesn't produce anything.

Additionaly, there are some project types MSBuild can't handle and again, it takes a rocket scientist to create an MSBuild file (even using something cool like MSBuild Sidekick) that can call another MSBuild task and exclude certain projects. This certainly isn't as easy as it was in 2003 where you just created an exclusion list (we excluded our client app as there was no extra license for the grid control and a modal dialog came up when the trial version was even looked at by the compiler).

Okay, this is mostly a rant but there's some wisdom here. Continuous Integration does not need to be this hard. CruiseControl.NET is an excellent tool and very flexible with new tools and integrating output from those tools. However when those tools require a million registry settings and even more DLLs (put in very specific places, trust me, you can't just toss them in the GAC and call it a day) and dump gobs of XML that no mere mortal (well maybe DonXml could) would be able to translate, it's just wrong. And as for the built-in Team Build that you could us, that's equally as useless as a) you can't schedule builds to trigger off of code checkins and b) again it requires a full Team Suite client to be installed on the server. Worst case scenario when I first started setting up CC.NET servers it took 4 hours. Now I can get it done in an hour (which includes testing the build of the first project). I've already spent a good day on just trying to get something to compile. It's compiling now but the output is crap and no running of tests and thats just not good enough for me. You can get MSBuild and (maybe) MSTest running with CruiseControl.NET. It's not impossible. If you install the full client and your projects are "just right" it'll work but the output isn't that hot and you'll watch your server CPU slam when compiles happen.

My advice, avoid trying to combine MSBuild, MSTest, and CruiseControl and stick to NAnt, and NUnit (using MSBuild if you have to when building 2005 solutions).

Needless to say I'm looking at one option right now. Dumping the install of VS2005 on the server, changing all our unit tests back to NUnit and using NAnt to do everything (and just calling MSBuild as an exec task for VS2005 projects). I still need to run 2003 projects so our CI server is going to look like a Frankenstein monster by the time I'm done, building VS2003 and VS2005 projects, running NUnit, MSBuild, NAnt, Simian, FxCop and whatever else we have in our mix. Even given that, using NAnt the output will be simpler (and integrate well with CC.NET), test output will be useful and informative, and I don't need to install a $15,000 piece of software on a server that has the distinct possibility to pop-up a modal dialog someday when it can't find some registry key.

Grrr. Argh.


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
亚洲香蕉成人av网站在线观看_欧美精品成人91久久久久久久_久久久久久久久久久亚洲_热久久视久久精品18亚洲精品_国产精自产拍久久久久久_亚洲色图国产精品_91精品国产网站_中文字幕欧美日韩精品_国产精品久久久久久亚洲调教_国产精品久久一区_性夜试看影院91社区_97在线观看视频国产_68精品久久久久久欧美_欧美精品在线观看_国产精品一区二区久久精品_欧美老女人bb
欧美中文字幕视频在线观看| 日韩电影中文字幕在线| 欧美成人精品三级在线观看| 91久久久久久久| 亚洲热线99精品视频| 欧美成人性生活| 欧美刺激性大交免费视频| 久久精品国产亚洲精品| 欧美成人免费一级人片100| 成人亲热视频网站| 日韩国产欧美区| 蜜臀久久99精品久久久无需会员| 久久久久亚洲精品成人网小说| 久久久精品一区二区三区| 91精品国产91久久| 国产精品久久久久999| 亚洲日本成人网| 在线观看欧美成人| 久久人91精品久久久久久不卡| 97**国产露脸精品国产| 国产精品黄视频| 成人黄色短视频在线观看| 国产精品三级网站| 亚洲淫片在线视频| 美女撒尿一区二区三区| 久久色在线播放| 久久精品一偷一偷国产| 久久免费精品日本久久中文字幕| 亚洲午夜性刺激影院| 国产欧美日韩中文字幕在线| 欧美日韩xxxxx| 亚洲精品美女在线观看| 91精品视频免费看| 欧美性色xo影院| 97香蕉超级碰碰久久免费的优势| 久热在线中文字幕色999舞| 2018中文字幕一区二区三区| 成人免费在线视频网站| 奇门遁甲1982国语版免费观看高清| 91香蕉国产在线观看| 久久久久久久久中文字幕| 久久中文字幕在线| 国产欧美日韩精品在线观看| 精品国产依人香蕉在线精品| 亚洲图中文字幕| 色婷婷综合久久久久| 欧美中文在线字幕| 欧美精品一本久久男人的天堂| 北条麻妃在线一区二区| 日韩在线视频免费观看| 一区二区国产精品视频| 国产精品揄拍一区二区| 国产精品成人va在线观看| 国产成人精品久久| 日韩精品视频在线| 亚洲欧美激情视频| 久久露脸国产精品| 久久人人爽国产| 日本免费一区二区三区视频观看| 九九九热精品免费视频观看网站| 国产精品久久久久免费a∨大胸| 51ⅴ精品国产91久久久久久| 国产一区二中文字幕在线看| 狠狠躁天天躁日日躁欧美| 欧美日产国产成人免费图片| 91免费欧美精品| 色琪琪综合男人的天堂aⅴ视频| 国产午夜精品一区理论片飘花| 国产精品日韩在线一区| 亚洲free性xxxx护士hd| 亚洲国产精品字幕| 久久国产精品影视| 国产盗摄xxxx视频xxx69| 欧美裸身视频免费观看| 国产精品女视频| 国产精品视频午夜| 永久免费毛片在线播放不卡| 欧美在线不卡区| 日韩av手机在线| 国产精品一二三视频| 日韩亚洲综合在线| 国产午夜精品视频| 美女精品久久久| 久久视频这里只有精品| 另类专区欧美制服同性| 51色欧美片视频在线观看| 日韩欧美亚洲国产一区| 黑人巨大精品欧美一区二区一视频| 激情av一区二区| 91地址最新发布| 国产精品一区二区三区成人| 久久免费精品视频| 午夜免费日韩视频| 日韩激情视频在线| 亚洲人成电影在线播放| 亚洲人成毛片在线播放| 亚洲国产成人爱av在线播放| 国产不卡av在线| 国产精品稀缺呦系列在线| 欧美亚洲激情视频| 久久精品影视伊人网| 久久久久久国产精品久久| 日韩在线视频二区| 色悠悠国产精品| 国产亚洲a∨片在线观看| 91麻豆桃色免费看| 欧美在线观看视频| 亚洲免费电影一区| 欧美成人免费全部观看天天性色| 亚洲精品国产精品自产a区红杏吧| 亚洲精品在线看| 日韩免费精品视频| 国产精品福利无圣光在线一区| 国产成人精品日本亚洲| 国产精品∨欧美精品v日韩精品| 久久人人爽人人爽爽久久| 久久精品亚洲94久久精品| 国内伊人久久久久久网站视频| 81精品国产乱码久久久久久| 一本大道久久加勒比香蕉| 欧美在线免费视频| 亚洲视频电影图片偷拍一区| 国产精品免费久久久久久| xxx成人少妇69| 精品人伦一区二区三区蜜桃免费| 最近中文字幕mv在线一区二区三区四区| 国产日韩av高清| 亚洲在线免费看| 日本中文字幕不卡免费| 成人午夜两性视频| 91免费高清视频| 韩国视频理论视频久久| 欧美一级视频一区二区| 欧美性黄网官网| 精品美女久久久久久免费| 国产精品香蕉国产| 日韩亚洲精品电影| 精品国产一区二区三区久久狼黑人| 日本精品久久电影| 亚洲色图50p| 久久精品国产成人精品| 欧美日韩中文字幕日韩欧美| 91国产美女视频| 中文字幕亚洲情99在线| 超碰97人人做人人爱少妇| 韩国精品久久久999| 日韩欧美在线视频日韩欧美在线视频| 精品国产91久久久久久| 91网在线免费观看| 日本午夜人人精品| 国产精品欧美日韩久久| 亚洲欧美另类人妖| 亚洲免费高清视频| 中文欧美日本在线资源| 欧美另类老女人| 欧美高跟鞋交xxxxhd| 日本欧美黄网站| 精品国产欧美一区二区三区成人| 亚洲精品色婷婷福利天堂| 国产精品一区二区三区成人| 久久777国产线看观看精品| 亚洲精品一区二区三区不| 国内精品久久久久久影视8| 欧美精品videos性欧美|