Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "The type or namespace xxxx does not exist" when compiling Moles in Visual Studio 2012

I am attempting to compile an existing project (targets .NET4) developed in Visual Studio 2010 and now testing migration to VS2012.

When I compile my existing project with moles, I get the following error a lot.

The type or namespace name 'Claim' does not exist in the namespace 'System.Security.Claims' (are you missing an assembly reference?) [C:\ProjectPath\Project.Tests.Unit\obj\Debug\Moles\m\m.g.csproj] C:\ProjectPath\Project.Tests.Unit\m.g.cs

There is a huge list of various types that show this message.

Any thoughts?

like image 394
binarydreams Avatar asked Jul 25 '12 10:07

binarydreams


1 Answers

We excluded some namespaces and types from the mole/stub generation based on this article:

Troubleshooting in Visual Studio 11 / .NET 4.5

and it's compiling now (a few test still fails but it's compiling).

like image 54
Peter Porfy Avatar answered Sep 30 '22 22:09

Peter Porfy