开发者

Visual Studio 2010: Unit test results with "jump to file at line/col" links

开发者 https://www.devze.com 2023-01-19 15:57 出处:网络
I\'m unit testing a compiler and would like to provide a unit test result that can be clicked and will bring visual studio to a specified test input file with the cursor at a specified line/col. Is th

I'm unit testing a compiler and would like to provide a unit test result that can be clicked and will bring visual studio to a specified test input file with the cursor at a specified line/col. Is this possible?

开发者_开发技巧

I've tried the format outlined at http://blogs.msdn.com/b/msbuild/archive/2006/11/03/msbuild-visual-studio-aware-error-messages-and-message-formats.aspx

For example:

Main.cs(17,20): warning CS0168: The variable 'foo' is declared but never used


AFAIK, Visual studio doesn't do columns. I have built my own VS error formatter and the sytex goes like this:

%file%(%line%): error %specific error%: %error text%

That appears to work fine for VS 2008 and 2010.

The link you provided has more details that you can use to format your error or warning string.

0

精彩评论

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