.net - VS 2010 Error Generating Unit Tests -


I have a .NET 4 DLL for which I am having trouble generating a unit test. I am using the VS 2010 standard. In the solution every other project will produce unit test stub for classes. For other assemblies, I can go to the existing code, by right clicking the name of the class and selecting "Create Unit Test". I find the window that runs properly.

An assembly which I need some coverage, will not produce a test stub using the same method described above. I go to a class in the project / assembly, right click, select "Generate Unit Test", and I got the following error:

Unit Test Generation Error: Following Error Was encountered while reading the module 'xx.Core': The type reference could not be solved: [System.Web, Version = 2.0.0.0, Culture = Neutral, PublicKiton = xxxxxxxxxxxx] System.Web.Routing.RouteValueDictionary

As far as I can tell, in error message Described there is no direct reference in the project framework version 2.0 System.Web. Looking for directories like Project and CS files are included which are seen from a device named grepWIN that the text is present in any file for that reference, then the zero result is generated. Is it possible to refer to 2.0 and 4.0 version of System 2.0 at the same time, and if so, why do you want to do this?

How to get rid of any idea this error message so that I remove some unit tests properly?

I had the same problem, compilation of observations

my "solution" all The referenced projects and their referenced projects had to be upgraded to .NET 4.0. Then it worked .... But it looks a bit weird and I could do anything else that caused the problem to disappear.


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -