I created my custom DLL "MongoDbExtensions" Now in a new project I add the reference to "MongoDbExtensions" and then a Trying to use the method, which is called a todockcast by mongodab extents. I use resharper to add namespace at the top of the file, but when I compile, I get the following error:
Error 1 type or name space name 'MongoDbExtensions' could not be found (Do you use Directive or Assembly Reference?) C: \ Projects \ HelpForum \ DemoConsole \ Program.cs 6 7 DemoConsole
What's going wrong? My DLL can be downloaded from here:
1 update:
Here is the Mongo Extension Class:
Namespace MongoDbExtensions {Public static class MongoExtensions {Public static list & lt; T & gt; ToList & lt; T & gt; (This IEnumerable & lt; document & gt; document) {var list = new list & lt; T & gt; (); Var Enumerator = Document. Getannamator (); While (counter. Headbook ()) {list.Add (counter current. ToClass & lt; T & gt; ()); } Return list; }}} ToDocument is an extension method that works on objects.
I repro This DLL Targeting was created .NET 4.0. You can not use it in a project that targets something else but targeting either the lower version of the full 4.0 .NET framework or the client profile will produce this error.
Comments
Post a Comment