I have created VSPackage (using Visual Studio 2012, 4.5 .NET) that contains custom type project (*.myproj). I have used MPF to develop the package. The output of my project is a class library (contains a bunch of unit tests). I use mstest to run my project. Everything is Ok when I run it from command line or in other way. In case when I am trying to run my project from Visual Studio, I am facing the problem: Visual Studio starts mstest.exe but does not pass command line arguments to it. Path to mstest.exe and startup arguments I specify in the project file like this:
.....<PropertyGroup><StartAction>Program</StartAction><StartProgram>C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\msTest.exe</StartProgram><StartArguments>/testcontainer:"C:\myProject.dll"</StartArguments></PropertyGroup> ....
Mstest tells me that there is nothing to run, like please specify test container etc. I have tryed to change mstest on any other executable where I can controll command line arguments but no fate. For example:
- create plain console application (from Visual Studio using appropriate C# templates) with main method like this
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1 {
class Program {
static void Main(string[] args) {
Console.WriteLine("args count: " + args.Length);
Console.ReadLine();
}
}
}- Build the console application
- Specify it in "StartProgram" property of the custom type project (*.myproj)
- Run custom type project from Visual Studio
- Console application started with output: "args count: 0"