Fix: runsettings environment variables ignored during test discovery #7078
Azure Pipelines / microsoft.testfx (Build MacOS Debug)
failed
Dec 7, 2025 in 23m 5s
Build MacOS Debug failed
Annotations
azure-pipelines / microsoft.testfx (Build MacOS Debug)
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/TestHostControllers/RunSettingsEnvironmentVariableProvider.cs#L71
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/TestHostControllers/RunSettingsEnvironmentVariableProvider.cs(71,1): error : [IsEnabledAsync_WhenCommandLineOptionProvided_ReturnsTrue] Test method Microsoft.Testing.Extensions.VSTestBridge.UnitTests.TestHostControllers.RunSettingsEnvironmentVariableProviderTests.IsEnabledAsync_WhenCommandLineOptionProvided_ReturnsTrue threw exception:
Moq.MockException: IDisposable.Dispose() invocation failed with mock behavior Strict.
All invocations on the mock must have a corresponding setup.
azure-pipelines / microsoft.testfx (Build MacOS Debug)
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/TestHostControllers/RunSettingsEnvironmentVariableProvider.cs#L71
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/TestHostControllers/RunSettingsEnvironmentVariableProvider.cs(71,1): error : [IsEnabledAsync_WhenCommandLineOptionProvidedButNoEnvironmentVariables_ReturnsFalse] Test method Microsoft.Testing.Extensions.VSTestBridge.UnitTests.TestHostControllers.RunSettingsEnvironmentVariableProviderTests.IsEnabledAsync_WhenCommandLineOptionProvidedButNoEnvironmentVariables_ReturnsFalse threw exception:
Moq.MockException: IDisposable.Dispose() invocation failed with mock behavior Strict.
All invocations on the mock must have a corresponding setup.
azure-pipelines / microsoft.testfx (Build MacOS Debug)
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/TestHostControllers/RunSettingsEnvironmentVariableProvider.cs#L71
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/TestHostControllers/RunSettingsEnvironmentVariableProvider.cs(71,1): error : [IsEnabledAsync_WhenEnvironmentVariableWithFilePathProvided_ReturnsTrue] Test method Microsoft.Testing.Extensions.VSTestBridge.UnitTests.TestHostControllers.RunSettingsEnvironmentVariableProviderTests.IsEnabledAsync_WhenEnvironmentVariableWithFilePathProvided_ReturnsTrue threw exception:
Moq.MockException: IDisposable.Dispose() invocation failed with mock behavior Strict.
All invocations on the mock must have a corresponding setup.
azure-pipelines / microsoft.testfx (Build MacOS Debug)
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/TestHostControllers/RunSettingsEnvironmentVariableProvider.cs#L71
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/TestHostControllers/RunSettingsEnvironmentVariableProvider.cs(71,1): error : [IsEnabledAsync_WhenCommandLineOptionProvided_ReturnsTrue] Test method Microsoft.Testing.Extensions.VSTestBridge.UnitTests.TestHostControllers.RunSettingsEnvironmentVariableProviderTests.IsEnabledAsync_WhenCommandLineOptionProvided_ReturnsTrue threw exception:
Moq.MockException: IDisposable.Dispose() invocation failed with mock behavior Strict.
All invocations on the mock must have a corresponding setup.
azure-pipelines / microsoft.testfx (Build MacOS Debug)
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/TestHostControllers/RunSettingsEnvironmentVariableProvider.cs#L60
src/Platform/Microsoft.Testing.Extensions.VSTestBridge/TestHostControllers/RunSettingsEnvironmentVariableProvider.cs(60,1): error : [IsEnabledAsync_WhenNoRunsettingsProvided_ReturnsFalse] Test method Microsoft.Testing.Extensions.VSTestBridge.UnitTests.TestHostControllers.RunSettingsEnvironmentVariableProviderTests.IsEnabledAsync_WhenNoRunsettingsProvided_ReturnsFalse threw exception:
Moq.MockException: IFileSystem.ExistFile("test.runsettings") invocation failed with mock behavior Strict.
All invocations on the mock must have a corresponding setup.
Loading