Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix running NETFramework 3.5 in compat mode #1906

Merged
merged 2 commits into from
Jan 31, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/vstest.console/Resources/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/vstest.console/Resources/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@
<value>'{0}' not found.</value>
</data>
<data name="Framework35NotSupported" xml:space="preserve">
<value>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</value>
<value>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</value>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Framework35 is not supported. For projects targeting .Net Framework 3.5, test will run in CLR 4.0 "compatibility mode".

</data>
<data name="FrameworkArgumentHelp" xml:space="preserve">
<value>--Framework|/Framework:&lt;Framework Version&gt;
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Zadání Framework35 není podporováno. U projektů mířících na .Net Framework 3.5 prosím použijte Framework40, aby testy v CLR 4.0 běžely v režimu kompatibility.</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Zadání Framework35 není podporováno. U projektů mířících na .Net Framework 3.5 prosím použijte Framework40, aby testy v CLR 4.0 běžely v režimu kompatibility.</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Framework35 wird nicht unterstützt. Verwenden Sie für Projekte, die auf .Net Framework 3.5 ausgerichtet sind, Framework40 zum Ausführen von Tests im "Kompatibilitätsmodus" von CLR 4.0.</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Framework35 wird nicht unterstützt. Verwenden Sie für Projekte, die auf .Net Framework 3.5 ausgerichtet sind, Framework40 zum Ausführen von Tests im "Kompatibilitätsmodus" von CLR 4.0.</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1638,9 +1638,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">No se admite Framework35. Para proyectos con destino .Net Framework 3.5, use Framework40 para ejecutar las pruebas en "modo de compatibilidad" de CLR 4.0.</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">No se admite Framework35. Para proyectos con destino .Net Framework 3.5, use Framework40 para ejecutar las pruebas en "modo de compatibilidad" de CLR 4.0.</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Framework35 n'est pas pris en charge. Pour les projets ciblant .Net Framework 3.5, utilisez Framework40 pour exécuter les tests dans CLR 4.0 en "mode compatibilité".</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Framework35 n'est pas pris en charge. Pour les projets ciblant .Net Framework 3.5, utilisez Framework40 pour exécuter les tests dans CLR 4.0 en "mode compatibilité".</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Framework35 non è supportato. Per i progetti destinati a .NET Framework 3.5, usare Framework40 per eseguire i test nella modalità di compatibilità di CLR 4.0.</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Framework35 non è supportato. Per i progetti destinati a .NET Framework 3.5, usare Framework40 per eseguire i test nella modalità di compatibilità di CLR 4.0.</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Framework35 はサポートされていません。.Net Framework 3.5 を対象とするプロジェクトでは、Framework40 を使用して CLR 4.0 の "互換モード" でテストを実行してください。</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Framework35 はサポートされていません。.Net Framework 3.5 を対象とするプロジェクトでは、Framework40 を使用して CLR 4.0 の "互換モード" でテストを実行してください。</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Framework35는 지원되지 않습니다. .NET Framework 3.5를 대상으로 하는 프로젝트의 경우 Framework40을 사용하여 CLR 4.0 "호환 모드"에서 테스트를 실행하세요.</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Framework35는 지원되지 않습니다. .NET Framework 3.5를 대상으로 하는 프로젝트의 경우 Framework40을 사용하여 CLR 4.0 "호환 모드"에서 테스트를 실행하세요.</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1631,9 +1631,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Wersja Framework35 nie jest obsługiwana. W przypadku projektów przeznaczonych dla programu .Net Framework 3.5 użyj wersji Framework40 do uruchamiania testów w „trybie zgodności” CLR 4.0.</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Wersja Framework35 nie jest obsługiwana. W przypadku projektów przeznaczonych dla programu .Net Framework 3.5 użyj wersji Framework40 do uruchamiania testów w „trybie zgodności” CLR 4.0.</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1631,9 +1631,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Não há suporte para Framework35. Para projetos com .Net Framework 3.5 de destino, use o Framework40 para executar testes em “modo de compatibilidade” CLR 4.0. </target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Não há suporte para Framework35. Para projetos com .Net Framework 3.5 de destino, use o Framework40 para executar testes em “modo de compatibilidade” CLR 4.0. </target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Framework35 не поддерживается. В проектах для .Net Framework 3.5 запускайте тесты в режиме совместимости CLR 4.0 с использованием Framework40.</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Framework35 не поддерживается. В проектах для .Net Framework 3.5 запускайте тесты в режиме совместимости CLR 4.0 с использованием Framework40.</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Framework35 desteklenmiyor. .NET Framework 3.5’i hedefleyen projeler için lütfen Framework40 kullanarak testleri CLR 4.0’ın “uyumluluk modunda” çalıştırın.</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Framework35 desteklenmiyor. .NET Framework 3.5’i hedefleyen projeler için lütfen Framework40 kullanarak testleri CLR 4.0’ın “uyumluluk modunda” çalıştırın.</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
2 changes: 1 addition & 1 deletion src/vstest.console/Resources/xlf/Resources.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@
<note></note>
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Framework35 not supported. Use Framework40 or above to run tests in CLR 4.0 "compatibly mode".</target>
<note></note>
</trans-unit>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.zh-Hans.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">Framework35 不受支持。对于面向 .Net Framework 3.5 的项目,请使用 Framework40 在 CLR 4.0“兼容性模式”下运行测试。</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">Framework35 不受支持。对于面向 .Net Framework 3.5 的项目,请使用 Framework40 在 CLR 4.0“兼容性模式”下运行测试。</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
6 changes: 3 additions & 3 deletions src/vstest.console/Resources/xlf/Resources.zh-Hant.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1633,9 +1633,9 @@
<note />
</trans-unit>
<trans-unit id="Framework35NotSupported">
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 "compatibility mode".</source>
<target state="translated">不支援 Framework35。若為以 .Net Framework 3.5 為目標的專案,請使用 Framework40 在 CLR 4.0「相容模式」中執行測試。</target>
<note />
<source>Framework35 is not supported. For projects targeting .Net Framework 3.5, tests are running in "compatibility mode".</source>
<target state="new">不支援 Framework35。若為以 .Net Framework 3.5 為目標的專案,請使用 Framework40 在 CLR 4.0「相容模式」中執行測試。</target>
<note></note>
</trans-unit>
</body>
</file>
Expand Down
4 changes: 2 additions & 2 deletions src/vstest.console/TestPlatformHelpers/TestRequestManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,8 @@ private bool UpdateRunSettingsIfRequired(string runsettingsXml, List<string> sou

if (Constants.DotNetFramework35.Equals(chosenFramework.Name))
{
EqtTrace.Error("TestRequestManager.UpdateRunSettingsIfRequired: throw exception on /Framework:Framework35 option.");
throw new TestPlatformException(Resources.Framework35NotSupported);
EqtTrace.Warning("TestRequestManager.UpdateRunSettingsIfRequired: throw warning on /Framework:Framework35 option.");
ConsoleLogger.RaiseTestRunWarning(Resources.Framework35NotSupported);
}

if (EqtTrace.IsInfoEnabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ public void RunTestsShouldReadTheBatchSizeFromSettingsAndSetItForTestRunCriteria
}

[TestMethod]
public void RunTestsShouldThrowForFramework35()
public void RunTestsShouldNotThrowForFramework35()
{
var payload = new TestRunRequestPayload()
{
Expand All @@ -870,9 +870,14 @@ public void RunTestsShouldThrowForFramework35()
actualTestRunCriteria = runCriteria;
}).Returns(mockDiscoveryRequest.Object);
this.mockAssemblyMetadataProvider.Setup(a => a.GetFrameWork(It.IsAny<string>())).Returns(new FrameworkName(Constants.DotNetFramework35));
var actualErrorMessage = Assert.ThrowsException<TestPlatformException>( () => this.testRequestManager.RunTests(payload, new Mock<ITestHostLauncher>().Object, new Mock<ITestRunEventsRegistrar>().Object, this.protocolConfig)).Message;

Assert.AreEqual("Framework35 is not supported. For projects targeting .Net Framework 3.5, please use Framework40 to run tests in CLR 4.0 \"compatibility mode\".", actualErrorMessage);
var mockRunEventsRegistrar = new Mock<ITestRunEventsRegistrar>();
var mockCustomlauncher = new Mock<ITestHostLauncher>();

this.testRequestManager.RunTests(payload, mockCustomlauncher.Object, mockRunEventsRegistrar.Object, this.protocolConfig);

mockTestPlatformEventSource.Verify(mt => mt.ExecutionRequestStart(), Times.Once);
mockTestPlatformEventSource.Verify(mt => mt.ExecutionRequestStop(), Times.Once);
}

[TestMethod]
Expand Down