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
Added VSCode debugging (for MvcSandbox) & code analysis support (dotnet#29486)
* Added VSCode debugging support for MvcSandbox
* Added ignored vscode folders
* 1. Convered some more projects.
2. Added env variable for TargetFramework and used it in launch.json file rather than
hardcoding TFW.
* Addressed PR feedback.
1. Removed extensions.json
2. Updated BuildFromSource.md for Vscode instructions.
3. Added launch settings for BasicTestApp.
* Addressed PR feedback!
Copy file name to clipboardexpand all lines: docs/BuildFromSource.md
+24-12
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Visual Studio 2019 (16.8) is required to build the repo locally. If you don't ha
53
53
> You can do so by running the `Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser` command
54
54
> in PowerShell. For more information on execution policies, you can read the [execution policy docs](https://docs.microsoft.com/powershell/module/microsoft.powershell.security/set-executionpolicy).
55
55
56
-
The [global.json](/global.json) file specifies the minimum requirements needed to build using `msbuild`. The [eng/scripts/vs.json](/eng/scripts/vs.json) file provides a description of the components needed to build within VS. If you plan on developing in Visual Studio, you will need to have these components installed.
56
+
The [global.json](/global.json) file specifies the minimum requirements needed to build using `msbuild`. The [eng/scripts/vs.json](/eng/scripts/vs.json) file provides a description of the components needed to build within VS. If you plan on developing in Visual Studio, you will need to have these components installed.
57
57
58
58
> :bulb: The `InstallVisualStudio.ps1` script mentioned above reads from the `vs.json` file to determine what components to install.
59
59
@@ -95,6 +95,14 @@ The build should find any JDK 11 or newer installation on the machine as long as
95
95
96
96
This repo contains a Selenium-based tests require a version of Chrome to be installed. Download and install it from <https://www.google.com/chrome>.
97
97
98
+
#### Visual Studio Code Extension
99
+
100
+
The following extensions are recommended when developing in the ASP.NET Core repository with Visual Studio Code.
If you plan on working with the Windows installers defined in [src/Installers/Windows](../src/Installers/Windows), you will need to install the WiX toolkit from <https://wixtoolset.org/releases/>.
@@ -155,9 +163,11 @@ Studio because those projects are not listed in AspNetCore.sln.
155
163
This will download the required tools and restore all projects inside the repository. At that point, you should be able
156
164
to open the .sln file or one of the project specific .slnf files to work on the projects you care about.
157
165
158
-
> :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. On the main
159
-
> branch, we regularly update the versions of .NET Core SDK required to build the repo.
160
-
> You will need to restart Visual Studio every time we update the .NET Core SDK.
166
+
167
+
> :bulb: Pro tip: you will also want to run this command after pulling large sets of changes. On the main
168
+
> branch, we regularly update the versions of .NET Core SDK required to build the repo.
169
+
> You will need to restart Visual Studio every time we update the .NET Core SDK.
170
+
161
171
162
172
> :bulb: Rerunning the above command or, perhaps, the quicker `.\build.cmd -noBuildNative -noBuildManaged` may be
163
173
> necessary after switching branches, especially if the `$(DefaultNetCoreTargetFramework)` value changes.
@@ -195,6 +205,8 @@ These principles guide how we create and manage .slnf files:
195
205
Before opening the project in Visual Studio Code, you will need to make sure that you have built the project.
196
206
You can find more info on this in the "Building on command-line" section below.
197
207
208
+
To open specific folder inside Visual studio code, you have to open it with `startvscode.cmd` file. Ths will setup neccessary environment variables and will open given directory in Visual Studio Code.
209
+
198
210
Using Visual Studio Code with this repo requires setting environment variables on command line first.
199
211
Use these command to launch VS Code with the right settings.
200
212
@@ -216,7 +228,7 @@ code .
216
228
```
217
229
218
230
> :bulb: Note that if you are using the "Remote-WSL" extension in VSCode, the environment is not supplied
219
-
> to the process in WSL. You can workaround this by explicitly setting the environment variables
231
+
> to the process in WSL. You can workaround this by explicitly setting the environment variables
220
232
> in `~/.vscode-server/server-env-setup`.
221
233
> See <https://code.visualstudio.com/docs/remote/wsl#_advanced-environment-setup-script> for details.
222
234
@@ -302,11 +314,11 @@ Additional properties can be added as an argument in the form `/property:$name=$
|Configuration |`Debug` or `Release`. Default = `Debug`.|
320
+
|TargetArchitecture | The CPU architecture to build for (x64, x86, arm, arm64).|
321
+
|TargetOsName | The base runtime identifier to build for (win, linux, osx, linux-musl).|
310
322
311
323
### Resx files
312
324
@@ -325,7 +337,7 @@ Building installers does not run as part of `build.cmd` run without parameters,
325
337
.\build.cmd -buildInstallers
326
338
```
327
339
328
-
*Note*: Additional build steps listed above aren't necessary on Linux or macOS.
340
+
_Note_: Additional build steps listed above aren't necessary on Linux or macOS.
329
341
330
342
- Run the installers produced in `artifacts/installers/{Debug, Release}/` for your platform.
331
343
- Add a NuGet.Config to your project directory with the following content:
@@ -341,7 +353,7 @@ Building installers does not run as part of `build.cmd` run without parameters,
341
353
</configuration>
342
354
```
343
355
344
-
*NOTE: This NuGet.Config should be with your application unless you want nightly packages to potentially start being restored for other apps on the machine.*
356
+
_NOTE: This NuGet.Config should be with your application unless you want nightly packages to potentially start being restored for other apps on the machine._
345
357
346
358
- Update the versions on `PackageReference` items in your .csproj project file to point to the version from your local build.
0 commit comments