Can Microsoft Fakes be used in Visual Studio 2010? - visual-studio-2010

We have developers using Visual Studio 2010 professional and some trying out Visual Studio 2012. Project compatibility between the two versions has been good.
Will a Visual Studio project still be compatible with 2010 if we introduce the new Fakes Framework for unit testing?

Currently Microsoft Fakes does not work in VS 2010. Project will compile however tests which use Fakes throw NotSupportedException with following stack trace.
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InvokeEvent(T value, Action`1 eh)
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.OnAttachedUnsupportedMethod(MethodBase method)
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.CheckInstrumentation(MethodBase method)
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InternalAttachDetour(Object optionalReceiver, MethodBase method, Delegate detourDelegate)
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.AttachDetour(Object optionalReceiver, MethodBase method, Delegate detourDelegate)
I would suggest to use Moles, which is the prior version of Microsoft Fakes. Here is great article about moving from Moles to Fakes.

Related

Testing in Visual Studio 2013

I heard there have some built in option for testing(Nunit etc..) in visual studio.let me know the best method for testing MVC4 web application using with this methods.and i am using VS2013 profession edition.
There is MSTest which is available in visual studio.
Get started with developer testing tools

Is it possible to downgrade from Visual Studio 2012 to Visual Studio 2010?

I have a wonderful solution in Visual Studio 2012 with a Web project using WebAPI and a supporting Web Service project for data using Entity Framework (EF) Code First. I was just told I need to see about using Visual Studio 2010.
Is there something I can do to work on this project in Visual Studio 2010?
As Henrick answers: you do not upgrade/downgrade VS installs, rather you install versions side by side.
You note two technologies that might be problematic:
EF Code First: this is supported from 4.1 (or was it 4.2?) which is supported against .NET 4.0 and VS2010. Providing your not using enum or geo/spatial data types (which require .NET 4.5) this should work, but you'll need to ensure you update to the EF5 NuGet package for .NET 4.
WebAPI: This is new in MVC4, which comes with VS2012, but is a separate install for .NET 4/VS2010.
Finally. While some project types with round trip between VS2012 and VS2010 SP1 (you need the service pack) it is not true for all project types. Details are on MSDN.
You can install Visual Studio 2010 separately and open the project and see. There is no danger in having version 2005, 2008, 2010 or 2012 of Visual Studio installed.

visual studios 2010 atl web service

Can anyone tell me where to find an visual studios 2010 atl web service template like the one that comes with visual studios 2008?
Thanks.
According to the comments on the Visual C++ Team Blog they were removed starting with Visual Studio 2008. However, you can find the latest version on codeplex. There may be a way to use the latest compiler to build such a project, by utilizing the project template from the a previous version of Visual Studio. This article provides a description of how it could be done.

MSTest in Express editions of Visual Studio 2010

I'm leaning toward using MSTest as unit testing framework for a new project but I'm concerned with cutting off developers (maybe even myself in the future and/or in some specific environment) using Express editions of Visual Studio.
I know MSTest wasn't available in VS2008 Express but with Microsoft pushing unit testing in recent years I guess they could've added it to VS2010 Express. However I couldn't find any info on this in the list of Express features and I don't want to download and install express just to verify this.
So, is MSTest supported in Visual Studio 2010 Express?
It does not appear in Microsoft's list of features of Visual Studio Express 2010, and it would appear (according to this blog post) that it is not supported. Since express editions do not allow add-ins, you cannot even use something like TestDriven.net to run tests from within Visual Studio Express editions.
If you were to use NUnit for testing, you may get more mileage. That blog post shows a way of running/debugging NUnit tests using a bootstrapper, but an easier way is to set NUnit as the start action (in Project Properties -> Start External Program), and then passing the name of your dll as an argument. This will start and run NUnit when you run/debug your project, allowing you launch your tests from within Visual Studio, and also debug them if needed.

Upgrading from Visual Studio 2005 Team Suite to Visual Studio 2010 Ultimate

What are the steps I should do and everything I should consider when upgrading from Visual Studio 2005 Team Suite to Visual Studio 2010 Ultimate?
Where can things go wrong?
Consider the fact I'm using TFS 2008 and have Continuous Integration and Nightly Builds on build machines.
One big Problem are Unittests with autocreated Private Accessors. If you want to touch them you have to rewrite them...
The issue is described Here

Resources