I have a .NET library project with about 500 unit tests. All these tests run fine in Visual Studio 2012. However, some of my tests fail in Visual Studio 2010. In these faili
First of all check while adding library to the project in VS2010, make sure you created the mock object like
Mock _mock = new Mock();
Also .NET 4.0 allows primary interop assemblies to be embedded into your assembly so that you don't need to deploy them alongside your application.Open the properties tab in the assembly in VS2010 and check the Embed Interop types.mkae sure its true.
And to instantiate excel, Excel.Application xlapp = new Excel.Application();
Hope it will work..