Can I convert a normal C# project to a C# test project?
-
Tuesday, November 28, 2006 9:33 AM
I would create a C# test project at first, but by mistake, I create a normal C# project. Can I convert the project type?
I could not find the difference in project files for different project type. Thanks
All Replies
-
Wednesday, November 29, 2006 7:31 PM
Hello,
The template for a C# test project and other C# projects are different, and we do not provide any tool to convert them. A test project has assembly file dependencies, as well as some references that need to exist in the environment. What you can do, however, is add a test project to your current solution that contains your other C# project.
Thanks,
David Gorena Elizondo
[MSFT] VSTS -
Thursday, May 10, 2012 5:05 PM
In the .csproj that you want to convert to a test project, just add the following to the <PropertyGroup> section:
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
(This approach worked for me in Visual Studio 2010)

