-
Notifications
You must be signed in to change notification settings - Fork 256
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]: Central Package Management break Visual Studio docker integration #11972
Comments
Can you please provide information about the failure in this bug itself. |
Hey @edumserrano Yes, I did look at the readme, my comment was about including the expected/actual information in this issue itself. I'm not saying you'd do this, but sometimes repos go private and we lose the information about the bug itself and we can't act on it. |
@nkolev92 Apologies, I've updated the body of the issue. Let me know if you need anything else. |
Hey, I'm just curious if you guys already did some planning on this and perhaps have an idea on when you plan on tackling it? As in, perhaps considering it for version VS 17.4? Besides curiosity I'm asking cause I want to use CPM but I ended up disabling it for my team's project due to this bug. |
@edumserrano sorry I'm late to reply here, I was out of vacation. Thanks for the excellent amount of details on this issue. I'm still learning docker so correct me if I'm wrong but won't we need to copy more than just the I did clone your example repo but of course it works for me. I am able to load the solution and debug without prompts. I also tried creating a new ASP .NET Core Web App with Docker support enabled and it seems to work. |
@jeffkl No worries, hope you had a great time =) You are correct in saying that the However, I'm not building the For more information see How to customize Docker containers in Visual Studio:
You can check the above in Visual Studio by going to the
I probably should have updated the rest of the Are you saying you do not get the error message if you try to debug the solution in the example repo using Visual Studio? P.S. - I'm now running |
@edumserrano its interesting that there are differences when building in Visual Studio. That seems unreliable if things work differently depending on the build environment. But again, I'm so new to Docker so I must still be missing something.
Yes, that is correct, I am not able to reproduce the issue but I finally figured out why. I'm running a preview version of Visual Studio 2022 17.4. I am able to reproduce the issue in Visual Studio 2022 17.3. Can you try installing 17.4 Preview and see if it happens still? https://visualstudio.microsoft.com/vs/preview/#download-preview It looks like someone maybe fixed it... |
@jeffkl I can confirm this is not happening on |
Okay great, I'm closing this as a duplicate of microsoft/DockerTools#342 then which I finally found |
NuGet Product Used
Other/NA
Product Version
tested with: nuget 6.2.1.7, dotnet 6.0.302, Visual Studio 17.2.6 as well as with nuget 6.3.0.114, dotnet 6.0.400-preview.22330.6 and Visual Studio 17.3 Preview 3
Worked before?
It works when Central Package Management is disabled.
The bug happens when you can create, for instance, an ASP.NET Core Web API project and enable Docker integration. This allows you to have a profile that launches the application on a Docker container. The expected behavior is:
Docker
profile from thelaunchSettings.json
.Impact
Other
Repro Steps & Context
Create an ASP.NET Core Web API project with Docker integration enabled and enable Central Package Management. Then when you try to run the application on a Docker container you get a prompt from Visual Studio which doesn't let the process carry on as expected. The bug is:
Docker
profile from thelaunchSettings.json
.I've created a repo edumserrano/example-cpm-docker that reproduces this bug. It's a solution with only one Web API project. The README of the repo contains all the information on how to run the code.
Verbose Logs
The text was updated successfully, but these errors were encountered: