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

Passing Custom Build Arguments to Dotnet Build When Debugging Docker Compose Project #438

Open
bt-Knodel opened this issue Aug 8, 2024 · 2 comments

Comments

@bt-Knodel
Copy link

I'd like to be able to pass a build arguments when debugging a docker compose project in visual studio to one of the dependent services.

In particular, we build a few projects with RuntimeIdentifier, and when running docker compose I'd like for this to be set explicitly to what the docker container runs on. Ideally, I could default it to windows (the current environment) and when debugging docker compose, set it explicitly to linux-x64.

Any ways to address this?

@bt-Knodel
Copy link
Author

Anyone able to provide any advice here?

When a developer debugs the docker compose project, I'd like for my app to build to Linux. When they build and run the console app directly, I'd like for it to be windows. The goal is to transition to Linux after a short period rather than all at once.

@NCarlsonMSFT
Copy link
Member

The best way I can think of to do what you want would be to use Build Configurations for the different RuntimeIdentifiers. You can find an example for how to do that with compose projects here: ComposeConfigurationExample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants