开发者

VS2010 Unit Testing ... project framework target

I just need some clarification in regards to unit testing with VS2010. Currently, we use nUnit for our unit testing requirements but have recently upgraded to VS2010 and are thinking abo开发者_开发百科ut migrating to VS2010 for our unit testing.

Our core project which we ship to customers targets .NET framework 2.0. we note that the unit testing reference for VS2010 requires that we target .NET 4.0. My question is this .... can we just change the .NET framework target of our Unit test project and leave the remaining projects which comprise the production application to .NET 2?

Will this enable us to use the in-built unit testing features of VS2010 whilst still shipping a product targeting .NET 2?

Look forward to your thoughts. The project is written in C#.


Multi-targeting works very well in Visual Studio >=2008. A good starting point for reading is Scott Gu's blog.

So, yes, you can have your projects target .NET 2.0 while your Unit Tests are targetting .net 4.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜