Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6078515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:50:33+00:00 2026-05-23T10:50:33+00:00

I know this is somehow possible, as we have a project that contains MSTest

  • 0

I know this is somehow possible, as we have a project that contains MSTest unit tests that are runnable via the VS2010 test runner. We can even add new test methods or classes to the existing projects, and the runner will pick them up and include them in the test run.

The problem comes when I try to add a new unit test project to the solution. If I add a project of the type “test project” to the solution, VS2010 will generate the test metadata and settings files that were not needed for running any of the other tests in the other projects. This is undesirable, for example, for an OSS project. If I simply add a normal “class library” project, and put unit tests in it, the test runner ignores them, and I cannot get it to recognize them at all.

Am I crazy? Is this a fluke? Should it even be possible for VS2010 to run the tests we have, without having a .vsmdi file or a .testsettings file? Or am I missing a setting or configuration that’s required in order to make this work for new projects?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T10:50:33+00:00Added an answer on May 23, 2026 at 10:50 am

    You can indeed run tests within VS without having the .vsmdi and .testsettings files (infact, you can just delete them after adding the test project)

    So why doesnt it work with a normal class library? the awnser lies inside the .csproj file.
    This is a regular class library:

    <PropertyGroup>
      <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
      <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
      <ProductVersion>8.0.30703</ProductVersion>
      <SchemaVersion>2.0</SchemaVersion>
      <ProjectGuid>{F191EC72-AFDF-49CE-A918-01905E7C32EF}</ProjectGuid>
      <OutputType>Library</OutputType>
      <AppDesignerFolder>Properties</AppDesignerFolder>
      <RootNamespace>test</RootNamespace>
      <AssemblyName>test</AssemblyName>
      <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
      <FileAlignment>512</FileAlignment>
    </PropertyGroup>
    

    And this is a test project:

    <PropertyGroup>
      <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
      <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
      <ProductVersion>8.0.30703</ProductVersion>
      <SchemaVersion>2.0</SchemaVersion>
      <ProjectGuid>{F191EC72-AFDF-49CE-A918-01905E7C32EF}</ProjectGuid>
      <OutputType>Library</OutputType>
      <AppDesignerFolder>Properties</AppDesignerFolder>
      <RootNamespace>test</RootNamespace>
      <AssemblyName>test</AssemblyName>
      <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
      <FileAlignment>512</FileAlignment>
      <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    </PropertyGroup>
    

    That last element, ProjectTypeGuids is what tells VS that its a project that you can run MSTest tests on. these guids are always the same as far as i know, [at least given the same version of VS] so you should be able to paste that line into any .csproj file and have VS recognize the tests inside.

    The test settings file can be useful to specify options for deployment (and alot of other things) but most of the options can also be specified at the command line to mstest.exe

    The .vsmdi can also be replaced by adding attributes to your test methods. most if not all options available in the Properties for a test can be set as attributes as well as in the vsmdi file. i generally prefer the attributes as they are ‘closer’ to the code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i know this is basic but somehow i have been stuck here for some
I know this is going to be something simple that I'm just missing somehow,
I know that it's possible to have an XML file with a TableLayout, and
I don't know if this is even possible but we'll see... I have a
This is something I know can be done somehow , because I've done it
I know this isn't strictly a programming question but y'all must have experienced this.
Does anyone know if it is possible to have a C++ class with overloaded
I have a python package that needs to pull in settings from my project
Let's say you have a class library project that has any number of supplemental
I'll try to be as specific as possible. I know this is impossible to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.