VSTest.Console.exe and .NET 4.5.2

Viewed 735

According to MSDN I can specify the .NET framework when invoking VSTest on the command line but the only available choices are 3.5, 4.0 or 4.5. How can I force vstest to use 4.5.2 or 4.6 for that matter?

Edited 3/8/2016:

Here's an example of a unit test that passes under .NET 4.5.2 but fails under prior versions of the .NET framework:

[TestMethod]
public void MyUnitTest()
{
    // Arrange
    var originalValue = "\"'#";
    var expectedValue = "%22'%23";

    // Act
    var encodedValue = Uri.EscapeDataString(originalValue);

    // Assert
    Assert.AreEqual(expectedValue, encodedValue);
}

The reason why the version of the .NET framework is important is because URI encoding logic has changed in .NET 4.5.2 and therefore it's important to be able to control the framework used to run this unit test.

0 Answers
Related