You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VS2022 Preview (17.11.0 Preview 2.0): Exception: "Support for Windows containers in Docker is not enabled." when trying to access windows container
#5106
Open
bevanweiss opened this issue
Jun 18, 2024
· 4 comments
and then I have a Dockerfile that is incredibly naive... but should be ok for now (it's to test MSI packages, so nothing beyond base OS is required)
# Use the latest Windows Server Core 2022 image.
FROM mcr.microsoft.com/windows/servercore:ltsc2022
Steps to reproduce
When I open the Test Explorer, all looks good, and I can see the remote container in the drop down list.
However when I select the remote container, it generates an exception telling me that support for Windows containers in Docker is not enabled..
However if I go to a command line, I can run that Docker file without a problem
Expected behavior
I expect the Visual Studio Test Runner to launch the (Windows) docker container, and to connect to it.
Which would then allow for the Test Suite to be run from inside the container.
Actual behavior
Docker container is not started.
Misleading diagnostic message "Connected to test environment..." is displayed.
Exception and stack trace is reported, again with misleading information suggesting the problem is the Docker application setup.
Diagnostic logs
Connected to test environment 'Windows ltsc2022'
System.Exception: Support for Windows containers in Docker is not enabled.
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformProviders.DockerTestPlatformProvider.d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformAgentPool.<>c__DisplayClass24_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Utilities.EventPumpExtensions.<>c__DisplayClass4_01.<<EnqueueAsync>b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.TestWindow.Extensibility.TaskCompletionSourceExtensions.<RunTaskWithCatchAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.d__131.MoveNext() System.Exception: Support for Windows containers in Docker is not enabled. at Microsoft.VisualStudio.TestWindow.Host.TestPlatformProviders.DockerTestPlatformProvider.<ActivateSessionAsync>d__17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.TestWindow.Host.TestPlatformAgentPool.<>c__DisplayClass24_0.<<CreateRemoteAgentAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.TestWindow.Utilities.EventPumpExtensions.<>c__DisplayClass4_01.<b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Extensibility.TaskCompletionSourceExtensions.d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.<CallWithCatchAsync>d__131.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformProvider.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.d__14`1.MoveNext()
Environment
Windows 11 22H2 (OS Build 22621.3737)
VSTest version 17.11.0-preview-24263-02 (x64)
Docker Desktop 4.31.1 (153621)
The text was updated successfully, but these errors were encountered:
bevanweiss
changed the title
VS2022 Preview (17.11.0 Preview 2.0): Support for Windows containers in Docker is not enabled. Exception when trying to access windows container
VS2022 Preview (17.11.0 Preview 2.0): Exception: "Support for Windows containers in Docker is not enabled." when trying to access windows container
Jun 18, 2024
We don't currently enable support for remote testing in Windows containers in Docker, only Linux containers.
There are quite a few technical differences that make it difficult to maintain and we have been seeking feedback from our users as to whether it would be worthwhile to invest in.
@peterwald Is there any estimate for when Test runs in Windows (amd64 on amd64) Containers would be available for early testing?
It'd be nice if rather than crashing out with an Exception, it provided a large warning text (both top and bottom of the console sequence).. but then did attempt to do stuff (at least launching the container would have been expected).
My particular test case is MSI deployments, where there are .NET 'tests' which validate certain aspects of the MSI deployments within the container (so that restoring to reproducible state is trivial).
Description
I've got a solution with an xUnit Test project within it.
I've configured a testenvironments.json file as below
and then I have a Dockerfile that is incredibly naive... but should be ok for now (it's to test MSI packages, so nothing beyond base OS is required)
Steps to reproduce
When I open the Test Explorer, all looks good, and I can see the remote container in the drop down list.
However when I select the remote container, it generates an exception telling me that support for Windows containers in Docker is not enabled..
However if I go to a command line, I can run that Docker file without a problem
Expected behavior
I expect the Visual Studio Test Runner to launch the (Windows) docker container, and to connect to it.
Which would then allow for the Test Suite to be run from inside the container.
Actual behavior
Docker container is not started.
Misleading diagnostic message "Connected to test environment..." is displayed.
Exception and stack trace is reported, again with misleading information suggesting the problem is the Docker application setup.
Diagnostic logs
Connected to test environment 'Windows ltsc2022'
System.Exception: Support for Windows containers in Docker is not enabled.
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformProviders.DockerTestPlatformProvider.d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformAgentPool.<>c__DisplayClass24_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Utilities.EventPumpExtensions.<>c__DisplayClass4_0
1.<<EnqueueAsync>b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.TestWindow.Extensibility.TaskCompletionSourceExtensions.<RunTaskWithCatchAsync>d__1
1.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.d__13
1.MoveNext() System.Exception: Support for Windows containers in Docker is not enabled. at Microsoft.VisualStudio.TestWindow.Host.TestPlatformProviders.DockerTestPlatformProvider.<ActivateSessionAsync>d__17.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.TestWindow.Host.TestPlatformAgentPool.<>c__DisplayClass24_0.<<CreateRemoteAgentAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.TestWindow.Utilities.EventPumpExtensions.<>c__DisplayClass4_0
1.<b__1>d.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Extensibility.TaskCompletionSourceExtensions.d__1
1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.<CallWithCatchAsync>d__13
1.MoveNext()--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Host.TestPlatformProvider.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.TestWindow.Logging.ILoggerExtensions.d__14`1.MoveNext()
Environment
Windows 11 22H2 (OS Build 22621.3737)
VSTest version 17.11.0-preview-24263-02 (x64)
Docker Desktop 4.31.1 (153621)
The text was updated successfully, but these errors were encountered: