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

Update Roslyn debugging docs #10971

Merged
merged 1 commit into from
Oct 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions docs/contributing/Roslyn-Debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,24 @@ Sometimes it may be necessary to make changes in [`dotnet/roslyn`](https://githu
2. `./Restore.cmd`
3. Make the desired changes in `dotnet/roslyn`.
4. `./Build.cmd -pack`. The `-pack` option causes the creation of NuGet packages.
5. You should see the generated packages in the `<PATH_TO_ROSLYN_REPO>\artifacts\packages\Debug\Debug` directory. Take note of the package versions (ie. `Microsoft.CodeAnalysis.Workspaces.Common.3.8.0-dev.nupkg` => `3.8.0-dev`).
6. Open `NuGet.config` and add the local package source `<add key="Roslyn Local Package source" value="<PATH_TO_ROSLYN_REPO>\artifacts\packages\Debug\Debug" />` and package source below under the `packageSourceMapping` tag:
5. You should see the generated packages in the `<PATH_TO_ROSLYN_REPO>\artifacts\packages\Debug` directory. Take note of the package versions (ie. `Microsoft.CodeAnalysis.Workspaces.Common.3.8.0-dev.nupkg` => `3.8.0-dev`).
6. In the Razor repo, open `NuGet.config` and add two local package sources:
* `<add key="Roslyn" value="<PATH_TO_ROSLYN_REPO>\artifacts\packages\Debug\Shipping" />`
* `<add key="RoslynNS" value="<PATH_TO_ROSLYN_REPO>\artifacts\packages\Debug\NonShipping" />`
7. Add the package source mappings below under the `packageSourceMapping` tag:

```xml
<packageSource key="Roslyn Local Package source">
<packageSource key="Roslyn">
<package pattern="microsoft.*" />
</packageSource>
<packageSource key="RoslynNS">
<package pattern="microsoft.*" />
<package pattern="microsoft.commonlanguageserverProtocol.*" />
</packageSource>
```

7. Open `eng/Versions.props` and update `RoslynPackageVersion` to the version noted in step 5.
8. To get the end-to-end local debugging working, running `./Build.cmd -deploy` script from roslyn repository. this will copy over the right binaries from roslyn to the shared local roslyn/razor hive.
7. Open `eng/Versions.props` and find the `MicrosoftCodeAnalysisExternalAccessRazorPackageVersion` property.
8. Grab the value of that property, and replace all instances of that value in the file to be the version noted in step 5.
9. To get the end-to-end local debugging working, running `./Build.cmd -deployExtensions` script from roslyn repository. this will copy over the right binaries from roslyn to the shared local roslyn/razor hive.

## Troubleshooting

Expand Down