microsoft / microsoft/vscode-dotnettools

[SUGGESTION] Maui build env variable

Open
#868 2 comments 1 reaction 1 assignee View on GitHub

@rachelkang is already working on this.

Since Jul 10, 2024.

area-maui enhancement mac triaged vs-sync vs-syncd
Dominant language
No language data
Stars
321
Forks
54
Avg merge
2d 19h
Merged PRs (30d)
2

Description

Describe the feature you'd like

Is it possible to send env variable to the "maui: Build" task ? I would like to do something like the following launch.json

{
  "name": "Debug Prod",
  "type": "maui",
  "request": "launch",
  "preLaunchTask": "maui: Build", 
  "configuration": "Debug",        
   "env": {
     "ENVIRONMENT": "Prod",
   },    
}

And then get this environment value in MSbuild.

Alternatives considered

I've tried to use a Debug-Prod configuration and it almost works but it seems there is some magic in the Debug configuration that I could not emulate to run correctly on device.

Environment Information

macOS
maui
latest vscode
| VS Bug 2000463

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.