diff --git a/TestPlatform.sln b/TestPlatform.sln
index 0496fd0ded..0ff32b6a25 100644
--- a/TestPlatform.sln
+++ b/TestPlatform.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
-VisualStudioVersion = 15.0.26228.4
+VisualStudioVersion = 15.0.26326.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{ED0C35EB-7F31-4841-A24F-8EB708FFA959}"
EndProject
@@ -147,6 +147,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Platform", "Platform", "{37
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.CommunicationUtilities.PlatformTests", "test\Microsoft.TestPlatform.CommunicationUtilities.PlatformTests\Microsoft.TestPlatform.CommunicationUtilities.PlatformTests.csproj", "{3E698655-0701-482E-9AA7-F956F6337FC7}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.TestHostProvider", "src\Microsoft.TestPlatform.TestHostProvider\Microsoft.TestPlatform.TestHostProvider.csproj", "{F6624DEC-C1F7-4076-8488-93EE30C163C4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.TestPlatform.TestHostProvider.UnitTests", "test\Microsoft.TestPlatform.TestHostProvider.UnitTests\Microsoft.TestPlatform.TestHostProvider.UnitTests.csproj", "{FBF74C8F-695C-4967-84AC-358EEFB1376D}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -757,6 +761,30 @@ Global
{3E698655-0701-482E-9AA7-F956F6337FC7}.Release|x64.Build.0 = Release|Any CPU
{3E698655-0701-482E-9AA7-F956F6337FC7}.Release|x86.ActiveCfg = Release|Any CPU
{3E698655-0701-482E-9AA7-F956F6337FC7}.Release|x86.Build.0 = Release|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Debug|x64.Build.0 = Debug|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Debug|x86.Build.0 = Debug|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Release|x64.ActiveCfg = Release|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Release|x64.Build.0 = Release|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Release|x86.ActiveCfg = Release|Any CPU
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4}.Release|x86.Build.0 = Release|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Debug|x64.Build.0 = Debug|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Debug|x86.Build.0 = Debug|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Release|x64.ActiveCfg = Release|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Release|x64.Build.0 = Release|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Release|x86.ActiveCfg = Release|Any CPU
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -821,5 +849,7 @@ Global
{E141A226-CC0A-4F26-BD17-4AE427D81C3B} = {D27E1CB4-C641-4C6C-A140-EF5F6215AE29}
{376C19DE-31E2-4FF6-88FC-0D0D6233C999} = {B27FAFDF-2DBA-4AB0-BA85-FD5F21D359D6}
{3E698655-0701-482E-9AA7-F956F6337FC7} = {376C19DE-31E2-4FF6-88FC-0D0D6233C999}
+ {F6624DEC-C1F7-4076-8488-93EE30C163C4} = {ED0C35EB-7F31-4841-A24F-8EB708FFA959}
+ {FBF74C8F-695C-4967-84AC-358EEFB1376D} = {B27FAFDF-2DBA-4AB0-BA85-FD5F21D359D6}
EndGlobalSection
EndGlobal
diff --git a/scripts/build.ps1 b/scripts/build.ps1
index b2de3308a1..94b4854fee 100644
--- a/scripts/build.ps1
+++ b/scripts/build.ps1
@@ -257,6 +257,16 @@ function Publish-Package
Write-Verbose "Move-Item $coreCLR20PackageDir\$file $coreCLRExtensionsDir -Force"
Move-Item $coreCLR20PackageDir\$file $coreCLRExtensionsDir -Force
}
+
+ # Note Note: If there are some dependencies for the TestHostProvider assemblies, those need to be moved too.
+ $runtimeproviders = @("Microsoft.TestPlatform.TestHostProvider.dll", "Microsoft.TestPlatform.TestHostProvider.pdb")
+ foreach($file in $runtimeproviders) {
+ Write-Verbose "Move-Item $fullCLRPackageDir\$file $fullCLRExtensionsDir -Force"
+ Move-Item $fullCLRPackageDir\$file $fullCLRExtensionsDir -Force
+
+ Write-Verbose "Move-Item $coreCLR20PackageDir\$file $coreCLRExtensionsDir -Force"
+ Move-Item $coreCLR20PackageDir\$file $coreCLRExtensionsDir -Force
+ }
# For libraries that are externally published, copy the output into artifacts. These will be signed and packaged independently.
Copy-PackageItems "Microsoft.TestPlatform.Build"
diff --git a/src/Microsoft.TestPlatform.Client/TestPlatform.cs b/src/Microsoft.TestPlatform.Client/TestPlatform.cs
index 2f2d4f1552..98a6b80bc9 100644
--- a/src/Microsoft.TestPlatform.Client/TestPlatform.cs
+++ b/src/Microsoft.TestPlatform.Client/TestPlatform.cs
@@ -4,13 +4,14 @@
namespace Microsoft.VisualStudio.TestPlatform.Client
{
using System;
- using System.IO;
using System.Collections.Generic;
+ using System.IO;
using System.Linq;
using Microsoft.VisualStudio.TestPlatform.Client.Discovery;
using Microsoft.VisualStudio.TestPlatform.Client.Execution;
using Microsoft.VisualStudio.TestPlatform.Common;
+ using Microsoft.VisualStudio.TestPlatform.Common.Hosting;
using Microsoft.VisualStudio.TestPlatform.Common.Logging;
using Microsoft.VisualStudio.TestPlatform.Common.Utilities;
using Microsoft.VisualStudio.TestPlatform.CrossPlatEngine;
@@ -20,21 +21,21 @@ namespace Microsoft.VisualStudio.TestPlatform.Client
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Utilities;
using Microsoft.VisualStudio.TestPlatform.Utilities.Helpers;
using Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces;
- using Microsoft.VisualStudio.TestPlatform.ObjectModel.Host;
- using Microsoft.VisualStudio.TestPlatform.Common.Hosting;
///
/// Implementation for TestPlatform
///
public class TestPlatform : ITestPlatform
{
- private IFileHelper fileHelper;
+ private readonly TestRuntimeProviderManager testHostProviderManager;
+
+ private readonly IFileHelper fileHelper;
+
///
/// Initializes a new instance of the class.
///
- public TestPlatform() : this(new TestEngine(), new FileHelper())
+ public TestPlatform() : this(new TestEngine(), new FileHelper(), TestRuntimeProviderManager.Instance)
{
- this.testHostProviderManager = TestRuntimeProviderManager.Instance;
}
///
@@ -43,10 +44,17 @@ public class TestPlatform : ITestPlatform
///
/// The test engine.
///
- protected TestPlatform(ITestEngine testEngine, IFileHelper filehelper)
+ ///
+ /// The filehelper.
+ ///
+ ///
+ /// The data.
+ ///
+ protected TestPlatform(ITestEngine testEngine, IFileHelper filehelper, TestRuntimeProviderManager testHostProviderManager)
{
this.TestEngine = testEngine;
this.fileHelper = filehelper;
+ this.testHostProviderManager = testHostProviderManager;
}
///
@@ -54,8 +62,6 @@ protected TestPlatform(ITestEngine testEngine, IFileHelper filehelper)
///
private ITestEngine TestEngine { get; set; }
- private TestRuntimeProviderManager testHostProviderManager;
-
///
/// The create discovery request.
///
@@ -66,16 +72,13 @@ public IDiscoveryRequest CreateDiscoveryRequest(DiscoveryCriteria discoveryCrite
{
if (discoveryCriteria == null)
{
- throw new ArgumentNullException("discoveryCriteria");
+ throw new ArgumentNullException(nameof(discoveryCriteria));
}
- UpdateTestAdapterPaths(discoveryCriteria.RunSettings);
+ this.UpdateTestAdapterPaths(discoveryCriteria.RunSettings);
- var runconfiguration = XmlRunSettingsUtilities.GetRunConfigurationNode(discoveryCriteria.RunSettings);
- //var testHostManager = this.testHostProviderManager.GetTestHostManagerByRunConfiguration(runconfiguration);
+ var testHostManager = this.testHostProviderManager.GetTestHostManagerByRunConfiguration(discoveryCriteria.RunSettings);
- var testHostManager = this.TestEngine.GetDefaultTestHostManager(runconfiguration);
-
var discoveryManager = this.TestEngine.GetDiscoveryManager(testHostManager, discoveryCriteria);
discoveryManager.Initialize();
@@ -92,26 +95,24 @@ public ITestRunRequest CreateTestRunRequest(TestRunCriteria testRunCriteria)
{
if (testRunCriteria == null)
{
- throw new ArgumentNullException("testRunCriteria");
+ throw new ArgumentNullException(nameof(testRunCriteria));
}
- UpdateTestAdapterPaths(testRunCriteria.TestRunSettings);
+ this.UpdateTestAdapterPaths(testRunCriteria.TestRunSettings);
var runConfiguration = XmlRunSettingsUtilities.GetRunConfigurationNode(testRunCriteria.TestRunSettings);
- //var testHostManager = this.testHostProviderManager.GetTestHostManagerByRunConfiguration(runConfiguration);
-
// Update and initialize loggers only when DesignMode is false
if (runConfiguration.DesignMode == false)
{
- UpdateTestLoggerPath(testRunCriteria);
+ this.UpdateTestLoggerPath(testRunCriteria);
// Initialize loggers
TestLoggerManager.Instance.InitializeLoggers();
}
- var testHostManager = this.TestEngine.GetDefaultTestHostManager(runConfiguration);
- testHostManager.Initialize(TestSessionMessageLogger.Instance);
+ var testHostManager = this.testHostProviderManager.GetTestHostManagerByRunConfiguration(testRunCriteria.TestRunSettings);
+ testHostManager.Initialize(TestSessionMessageLogger.Instance, testRunCriteria.TestRunSettings);
if (testRunCriteria.TestHostLauncher != null)
{
@@ -159,6 +160,9 @@ public void UpdateExtensions(IEnumerable pathToAdditionalExtensions, boo
///
/// Update the test adapter paths provided through run settings to be used by the test service
///
+ ///
+ /// The run Settings.
+ ///
private void UpdateTestAdapterPaths(string runSettings)
{
IEnumerable customTestAdaptersPaths = RunSettingsUtilities.GetTestAdaptersPaths(runSettings);
@@ -175,8 +179,10 @@ private void UpdateTestAdapterPaths(string runSettings)
}
List adapterFiles = new List(
- this.fileHelper.EnumerateFiles(adapterPath, TestPlatformConstants.TestAdapterRegexPattern, SearchOption.AllDirectories)
- );
+ this.fileHelper.EnumerateFiles(
+ adapterPath,
+ TestPlatformConstants.TestAdapterRegexPattern,
+ SearchOption.AllDirectories));
if (adapterFiles.Count > 0)
{
this.UpdateExtensions(adapterFiles, true);
@@ -188,6 +194,9 @@ private void UpdateTestAdapterPaths(string runSettings)
///
/// Update the test logger paths from source directory
///
+ ///
+ /// The test Run Criteria.
+ ///
private void UpdateTestLoggerPath(TestRunCriteria testRunCriteria)
{
IEnumerable sources = testRunCriteria.Sources;
diff --git a/src/Microsoft.TestPlatform.Common/Friends.cs b/src/Microsoft.TestPlatform.Common/Friends.cs
index 7cb1d1036d..1655273bda 100644
--- a/src/Microsoft.TestPlatform.Common/Friends.cs
+++ b/src/Microsoft.TestPlatform.Common/Friends.cs
@@ -21,6 +21,6 @@
[assembly: InternalsVisibleTo("datacollector.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]
[assembly: InternalsVisibleTo("Microsoft.TestPlatform.CommunicationUtilities.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
-
+[assembly: InternalsVisibleTo("Microsoft.TestPlatform.Client.UnitTests, PublicKey=002400000480000094000000060200000024000052534131000400000100010007d1fa57c4aed9f0a32e84aa0faefd0de9e8fd6aec8f87fb03766c834c99921eb23be79ad9d5dcc1dd9ad236132102900b723cf980957fc4e177108fc607774f29e8320e92ea05ece4e821c0a5efe8f1645c4c0c93c1ab99285d622caa652c1dfad63d745d6f2de5f17e5eaf0fc4963d261c8a12436518206dc093344d5ad293")]
#endregion
\ No newline at end of file
diff --git a/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeExtensionManager.cs b/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeExtensionManager.cs
index 0becb1f58c..f2089686a8 100644
--- a/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeExtensionManager.cs
+++ b/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeExtensionManager.cs
@@ -3,12 +3,13 @@
namespace Microsoft.VisualStudio.TestPlatform.Common.Hosting
{
+ using System.Collections.Generic;
+
using Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework;
using Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.Utilities;
using Microsoft.VisualStudio.TestPlatform.Common.Interfaces;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Host;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
- using System.Collections.Generic;
///
/// Manages loading and provides access to testhost extensions implementing the
@@ -17,6 +18,7 @@ namespace Microsoft.VisualStudio.TestPlatform.Common.Hosting
internal class TestRuntimeExtensionManager : TestExtensionManager
{
///
+ /// Initializes a new instance of the class.
/// Default constructor.
///
///
@@ -60,5 +62,4 @@ public static TestRuntimeExtensionManager Create(IMessageLogger messageLogger)
return new TestRuntimeExtensionManager(unfilteredTestExtensions, filteredTestExtensions, messageLogger);
}
}
-
}
diff --git a/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeProviderManager.cs b/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeProviderManager.cs
index 50b02be604..0e9f670a5f 100644
--- a/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeProviderManager.cs
+++ b/src/Microsoft.TestPlatform.Common/Hosting/TestRunTimeProviderManager.cs
@@ -4,59 +4,43 @@
namespace Microsoft.VisualStudio.TestPlatform.Common.Hosting
{
using System;
+
+ using Microsoft.VisualStudio.TestPlatform.Common.Logging;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Host;
using Microsoft.VisualStudio.TestPlatform.ObjectModel.Logging;
- using Microsoft.VisualStudio.TestPlatform.Common.Logging;
- using Microsoft.VisualStudio.TestPlatform.ObjectModel;
///
/// Responsible for managing TestRuntimeProviderManager extensions
///
- internal class TestRuntimeProviderManager
+ public class TestRuntimeProviderManager
{
#region Fields
private static TestRuntimeProviderManager testHostManager;
- ///
- /// Gets an instance of the logger.
- ///
- private IMessageLogger messageLogger;
+ private readonly TestRuntimeExtensionManager testHostExtensionManager;
- private TestRuntimeExtensionManager testHostExtensionManager;
-
#endregion
#region Constructor
///
+ /// Initializes a new instance of the class.
/// Default constructor.
///
- protected TestRuntimeProviderManager(TestSessionMessageLogger sessionLogger)
+ ///
+ /// The session Logger.
+ ///
+ protected TestRuntimeProviderManager(IMessageLogger sessionLogger)
{
- this.messageLogger = sessionLogger;
this.testHostExtensionManager = TestRuntimeExtensionManager.Create(sessionLogger);
}
///
- /// Gets the instance.
+ /// Gets the instance of TestRuntimeProviderManager
///
- public static TestRuntimeProviderManager Instance
- {
- get
- {
- if (testHostManager == null)
- {
- testHostManager = new TestRuntimeProviderManager(TestSessionMessageLogger.Instance);
- }
- return testHostManager;
- }
-
- protected set
- {
- testHostManager = value;
- }
- }
+ public static TestRuntimeProviderManager Instance => testHostManager
+ ?? (testHostManager = new TestRuntimeProviderManager(TestSessionMessageLogger.Instance));
#endregion
@@ -65,21 +49,17 @@ protected set
public ITestRuntimeProvider GetTestHostManagerByUri(string hostUri)
{
var host = this.testHostExtensionManager.TryGetTestExtension(hostUri);
- if (host != null)
- {
- return host.Value;
- }
-
- return null;
+ return host?.Value;
}
- public ITestRuntimeProvider GetTestHostManagerByRunConfiguration(string runConfiguration)
+ public virtual ITestRuntimeProvider GetTestHostManagerByRunConfiguration(string runConfiguration)
{
foreach (var testExtension in this.testHostExtensionManager.TestExtensions)
{
if (testExtension.Value.CanExecuteCurrentRunConfiguration(runConfiguration))
{
- return testExtension.Value;
+ // we are creating a new Instance of ITestRuntimeProvider so that each POM gets it's own object of ITestRuntimeProvider
+ return (ITestRuntimeProvider)Activator.CreateInstance(testExtension.Value.GetType());
}
}
diff --git a/src/Microsoft.TestPlatform.Common/Interfaces/Engine/ClientProtocol/ITestEngine.cs b/src/Microsoft.TestPlatform.Common/Interfaces/Engine/ClientProtocol/ITestEngine.cs
index e429dcdedf..c1c68701cf 100644
--- a/src/Microsoft.TestPlatform.Common/Interfaces/Engine/ClientProtocol/ITestEngine.cs
+++ b/src/Microsoft.TestPlatform.Common/Interfaces/Engine/ClientProtocol/ITestEngine.cs
@@ -14,8 +14,15 @@ public interface ITestEngine
///
/// Fetches the DiscoveryManager for this engine. This manager would provide all functionality required for discovery.
///
- /// Test host manager for the current test discovery.
- /// ITestDiscoveryManager object that can do discovery
+ ///
+ /// Test host manager for the current test discovery.
+ ///
+ ///
+ /// The discovery Criteria.
+ ///
+ ///
+ /// ITestDiscoveryManager object that can do discovery
+ ///
IProxyDiscoveryManager GetDiscoveryManager(ITestRuntimeProvider testHostManager, DiscoveryCriteria discoveryCriteria);
///
@@ -32,13 +39,5 @@ public interface ITestEngine
///
/// ITestExtensionManager object that helps with extensibility
ITestExtensionManager GetExtensionManager();
-
- ///
- /// Fetches the Test Host manager for this engine. This manager would provide extensibility
- /// features that this engine supports.
- ///
- /// RunConfiguration information which contains info like Architecture, Framework for the test run.
- /// Launcher for the test host process
- ITestRuntimeProvider GetDefaultTestHostManager(RunConfiguration runConfiguration);
}
}
diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Helpers/DotnetHostHelper.cs b/src/Microsoft.TestPlatform.CoreUtilities/Helpers/DotnetHostHelper.cs
similarity index 91%
rename from src/Microsoft.TestPlatform.CrossPlatEngine/Helpers/DotnetHostHelper.cs
rename to src/Microsoft.TestPlatform.CoreUtilities/Helpers/DotnetHostHelper.cs
index a16828ba8e..4bf0dfdd16 100644
--- a/src/Microsoft.TestPlatform.CrossPlatEngine/Helpers/DotnetHostHelper.cs
+++ b/src/Microsoft.TestPlatform.CoreUtilities/Helpers/DotnetHostHelper.cs
@@ -3,16 +3,17 @@
namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers
{
- using Microsoft.VisualStudio.TestPlatform.ObjectModel;
using System;
using System.IO;
using System.Runtime.InteropServices;
- using Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Resources;
- using Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces;
- using Microsoft.VisualStudio.TestPlatform.Utilities.Helpers;
+
+ using Microsoft.VisualStudio.TestPlatform.CoreUtilities.Resources;
using Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.Interfaces;
+ using Microsoft.VisualStudio.TestPlatform.ObjectModel;
+ using Microsoft.VisualStudio.TestPlatform.Utilities.Helpers;
+ using Microsoft.VisualStudio.TestPlatform.Utilities.Helpers.Interfaces;
- internal class DotnetHostHelper : IDotnetHostHelper
+ public class DotnetHostHelper : IDotnetHostHelper
{
private readonly IFileHelper fileHelper;
@@ -58,7 +59,8 @@ public string GetDotnetHostFullPath()
}
}
- string errorMessage = String.Format(Resources.NoDotnetExeFound, dotnetExeName);
+ string errorMessage = string.Format(Resources.NoDotnetExeFound, dotnetExeName);
+
EqtTrace.Error(errorMessage);
throw new FileNotFoundException(errorMessage);
}
diff --git a/src/Microsoft.TestPlatform.CrossPlatEngine/Helpers/Interfaces/IDotnetHostHelper.cs b/src/Microsoft.TestPlatform.CoreUtilities/Helpers/Interfaces/IDotnetHostHelper.cs
similarity index 94%
rename from src/Microsoft.TestPlatform.CrossPlatEngine/Helpers/Interfaces/IDotnetHostHelper.cs
rename to src/Microsoft.TestPlatform.CoreUtilities/Helpers/Interfaces/IDotnetHostHelper.cs
index b70dfb9c7c..05cb904c39 100644
--- a/src/Microsoft.TestPlatform.CrossPlatEngine/Helpers/Interfaces/IDotnetHostHelper.cs
+++ b/src/Microsoft.TestPlatform.CoreUtilities/Helpers/Interfaces/IDotnetHostHelper.cs
@@ -6,7 +6,7 @@ namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Helpers.Interfaces
///
/// Helper class for getting info about dotnet host.
///
- internal interface IDotnetHostHelper
+ public interface IDotnetHostHelper
{
///
/// Get full path for the .net host
diff --git a/src/Microsoft.TestPlatform.CoreUtilities/Resources/Resources.Designer.cs b/src/Microsoft.TestPlatform.CoreUtilities/Resources/Resources.Designer.cs
index ffb72db0f4..6a615e84d7 100644
--- a/src/Microsoft.TestPlatform.CoreUtilities/Resources/Resources.Designer.cs
+++ b/src/Microsoft.TestPlatform.CoreUtilities/Resources/Resources.Designer.cs
@@ -195,5 +195,16 @@ internal static string Utility_ProcessNameWhenCannotGetIt {
return ResourceManager.GetString("Utility_ProcessNameWhenCannotGetIt", resourceCulture);
}
}
+
+ ///
+ /// Looks up a localized string similar to Could not find {0}. Make sure that the dotnet is installed on the machine..
+ ///
+ internal static string NoDotnetExeFound
+ {
+ get
+ {
+ return ResourceManager.GetString("NoDotnetExeFound", resourceCulture);
+ }
+ }
}
}
diff --git a/src/Microsoft.TestPlatform.CoreUtilities/Resources/Resources.resx b/src/Microsoft.TestPlatform.CoreUtilities/Resources/Resources.resx
index 9b872db0c2..a57060159f 100644
--- a/src/Microsoft.TestPlatform.CoreUtilities/Resources/Resources.resx
+++ b/src/Microsoft.TestPlatform.CoreUtilities/Resources/Resources.resx
@@ -153,6 +153,9 @@
Unhandled exception occurred while processing a job from the '{0}' queue: {1}
+
+ Could not find {0}. Make sure that the dotnet is installed on the machine.
+
The {0} queue has already been disposed.
diff --git a/src/Microsoft.TestPlatform.CoreUtilities/Resources/xlf/Resources.cs.xlf b/src/Microsoft.TestPlatform.CoreUtilities/Resources/xlf/Resources.cs.xlf
index 19b6a0cd9f..d8e4728fd5 100644
--- a/src/Microsoft.TestPlatform.CoreUtilities/Resources/xlf/Resources.cs.xlf
+++ b/src/Microsoft.TestPlatform.CoreUtilities/Resources/xlf/Resources.cs.xlf
@@ -155,6 +155,11 @@
fuzzyMatch="15" wordcount="4" adjWordcount="3.4" curWordcount="3.4"
+
+ Could not find {0}. Make sure that the dotnet is installed on the machine.
+ Could not find {0}. Make sure that the dotnet is installed on the machine.
+
+