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
Clarify working directory assignment for project launch configurations (#10681)
* Clarify working directory assignment for project launch configurations
Also move the project launch configuration description into its own section of the spec
* Fix paragraph numbering (thanks Copilot)
Co-authored-by: Copilot <[email protected]>
* Make Markdown linter happy
---------
Co-authored-by: Copilot <[email protected]>
Copy file name to clipboardExpand all lines: docs/specs/IDE-execution.md
+45-40Lines changed: 45 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,12 +69,15 @@ The payload is best explained using an example:
69
69
{
70
70
// Indicates the type of the launch configuration.
71
71
// This is a required property for all kinds of launch configurations.
72
+
// The value "project" indicates this is a service that has an associated Visual Studio project file.
72
73
"type":"project",
73
74
74
75
"project_path":"(Path to Visual Studio project file for the program)",
75
76
76
77
// ... other launch configuration properties
77
78
}
79
+
80
+
// ... other launch configurations may be included, as appropriate for the service being launched
78
81
]
79
82
80
83
// Environment variable settings (added on top of those inherited from IDE/user environment,
@@ -100,46 +103,6 @@ If the execution session is created successfully, the return status code should
100
103
101
104
If the session cannot be created, appropriate 4xx or 5xx status code should be returned. The response might also return a description of the problem as part of the status line, [or in the response body](#error-reporting).
102
105
103
-
### Launch configurations
104
-
105
-
The run session creation request contains one or more launch configurations for the session.
106
-
107
-
The following launch configuration types are recognized by Visual Studio IDE:
108
-
109
-
**Project launch configuration** <br/>
110
-
111
-
Project launch configuration contains details for launching programs that have project files compatible with Visual Studio IDE.
112
-
113
-
| Property | Description | Required? |
114
-
| --- | --------- | --- |
115
-
|`type`| Launch configuration type indicator; must be `project`. | Required |
116
-
|`project_path`| Path to the project file for the program that is being launched. | Required |
117
-
|`mode`| Specifies the launch mode. Currently supported modes are `Debug` (run the project under the debugger) and `NoDebug` (run the project without debugging). | Optional, defaults to `Debug`. |
118
-
|`launch_profile`| The name of the launch profile to be used for project execution. See below for more details on how the launch profile should be processed. | Optional |
119
-
|`disable_launch_profile`| If set to `true`, the project will be launched without a launch profile and the value of "launch_profile" parameter is disregarded. | Optional |
120
-
121
-
> In Aspire version 1 release only a single launch configuration instance, of type `project`, can be used as part of a run session request issued to Visual Studio. Other types of launch configurations may be added in future releases.
Launch profiles should be applied to service run sessions according to the following rules:
126
-
127
-
1. The values of `launch_profile` and `disable_launch_profile` properties determine the **base profile** used for the service run session. The base profile may be nonexistent (empty), or it might be that one of the launch profiles defined for the service project serves as the base profile, see point 3 below.
128
-
129
-
2. Environment variable values (`env` property) and invocation arguments (`args` property) specified by the run session request always take precedence over settings present in the launch profile. Specifically:
130
-
131
-
a. Environment variable values **override** (are applied on top of) the environment variable values from the base profile.
132
-
133
-
b. **If present**, invocation arguments from the run session request **completely replace** invocation arguments from the base profile. In particular, an empty array (`[]`) specified in the request means no invocation arguments should be used at all, even if base profile is present and has some invocation arguments specified. On the other hand, if the `args` run session request property is absent, or set to `null`, it means the run session request does not specify any invocation arguments for the service, and thus if the base profile exists and contains invocation arguments, those from the base profile should be used.
134
-
135
-
3. The base profile is determined according to following rules:
136
-
137
-
a. If `disable_launch_profile` property is set to `true` in project launch configuration, there is no base profile, regardless of the value of `launch_profile` property.
138
-
139
-
b. If the `launch_profile` property is set, the IDE should check whether the service project has a launch profile with the name equal to the value of `launch_profile` property. If such profile is found, it should serve as the base profile. If not, there is no base profile.
140
-
141
-
b. If `launch_profile` property is absent, the IDE should check whether the service project has a launch profile with the same name as the profile used to launch Aspire application host project. If such profile is found, it should serve as the base profile. Otherwise there is no base profile.
142
-
143
106
### Stop session request
144
107
145
108
Used to stop an in-progress run session
@@ -198,6 +161,48 @@ The properties of the IDE endpoint information document are:
198
161
| --- | --------- | --- |
199
162
|`protocols_supported`| List of protocols supported by the IDE endpoint. See [protocol versioning](#protocol-versioning) for more information. |`string[]`|
200
163
164
+
## Launch configurations (run session requests)
165
+
166
+
The run session creation request contains one or more launch configurations for the session. The following launch configuration types are well-known:
Project launch configuration contains details for launching programs that have project files compatible with Visual Studio IDE.
171
+
172
+
**Project launch configuration properties**
173
+
174
+
| Property | Description | Required? |
175
+
| --- | --------- | --- |
176
+
|`type`| Launch configuration type indicator; must be `project`. | Required |
177
+
|`project_path`| Path to the project file for the program that is being launched. | Required |
178
+
|`mode`| Specifies the launch mode. Currently supported modes are `Debug` (run the project under the debugger) and `NoDebug` (run the project without debugging). | Optional, defaults to `Debug`. |
179
+
|`launch_profile`| The name of the launch profile to be used for project execution. See below for more details on how the launch profile should be processed. | Optional |
180
+
|`disable_launch_profile`| If set to `true`, the project will be launched without a launch profile and the value of "launch_profile" parameter is disregarded. | Optional |
181
+
182
+
**Launch profile processing**
183
+
184
+
Launch profiles should be applied to service run sessions according to the following rules:
185
+
186
+
1. The values of `launch_profile` and `disable_launch_profile` properties determine the **base profile** used for the service run session. The base profile may be nonexistent (empty), or it might be that one of the launch profiles defined for the service project serves as the base profile, see point 3 below.
187
+
188
+
2. Environment variable values (`env` property) and invocation arguments (`args` property) specified by the run session request always take precedence over settings present in the launch profile. Specifically:
189
+
190
+
a. Environment variable values **override** (are applied on top of) the environment variable values from the base profile.
191
+
192
+
b. **If present**, invocation arguments from the run session request **completely replace** invocation arguments from the base profile. In particular, an empty array (`[]`) specified in the request means no invocation arguments should be used at all, even if base profile is present and has some invocation arguments specified. On the other hand, if the `args` run session request property is absent, or set to `null`, it means the run session request does not specify any invocation arguments for the service, and thus if the base profile exists and contains invocation arguments, those from the base profile should be used.
193
+
194
+
3. The base profile is determined according to following rules:
195
+
196
+
a. If `disable_launch_profile` property is set to `true` in project launch configuration, there is no base profile, regardless of the value of `launch_profile` property.
197
+
198
+
b. If the `launch_profile` property is set, the IDE should check whether the service project has a launch profile with the name equal to the value of `launch_profile` property. If such profile is found, it should serve as the base profile. If not, there is no base profile.
199
+
200
+
c. If `launch_profile` property is absent, the IDE should check whether the service project has a launch profile with the same name as the profile used to launch Aspire application host project. If such profile is found, it should serve as the base profile. Otherwise there is no base profile.
201
+
202
+
**Working folder for project execution**
203
+
204
+
Unless the launch profile specifies otherwise (via `WorkingDirectory` property), each project should be launched using its own folder as the working folder (working directory).
205
+
201
206
## Run session change notifications
202
207
203
208
The run session change notifications are delivered from IDE to DCP via a WebSocket connection. The format of notification is JSON Lines (one JSON object per line of text).
0 commit comments