forked from dotnet/vscode-csharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-patch] Update from upstream at 2024-09-01 01:46
- Loading branch information
1 parent
c39e540
commit 816cc80
Showing
23 changed files
with
567 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
registry=https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public-npm/npm/registry/ | ||
always-auth=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,87 @@ | ||
# C# with NetCoreDbg | ||
## C# for Visual Studio Code | ||
A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/VSCode) that provides rich language support for C# and is shipped along with [C# Dev Kit][csdevkitextension]. Powered by a Language Server Protocol (LSP) server, this extension integrates with open source components like [Roslyn](https://github.com/dotnet/roslyn) and [Razor](https://github.com/dotnet/razor) to provide rich type information and a faster, more reliable C# experience. | ||
|
||
The debugger included in the official C# extension is [proprietary](https://aka.ms/VSCode-DotNet-DbgLicense) and is licensed to only work with Microsoft versions of vscode. | ||
## Recommended Install | ||
While it is possible to use the C# extension as a standalone extension, we highly recommend using [C# Dev Kit][csdevkitextension]. | ||
|
||
This extension replaces it with Samsung's [MIT-licensed](https://github.com/Samsung/netcoredbg/blob/master/LICENSE) alternative, [NetCoreDbg](https://github.com/Samsung/netcoredbg). | ||
1. Installing [C# Dev Kit][csdevkitextension] will automatically install this extension as a required dependency. | ||
2. Open a folder/workspace that contains a C# project (.csproj) and a C# solution (.sln) and the extension will activate. | ||
3. Whether you install C# Dev Kit or just the C# extension, the [.NET Install Tool](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.vscode-dotnet-runtime) will be installed as a dependency. | ||
|
||
This extension is always kept up to date by applying a series of patches to the [official C# extension](https://github.com/dotnet/vscode-csharp) when changes are detected in their repository. | ||
Note: If working on a solution that requires versions prior to .NET 6 or non-solution based projects, install a .NET Framework runtime and [MSBuild tooling](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022). | ||
* Set omnisharp.useModernNet to false and set dotnet.server.useOmnisharp to true | ||
* Uninstall or disable C# Dev Kit | ||
* Windows: .NET Framework along with [MSBuild Tools](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022) | ||
* MacOS/Linux: [Mono with MSBuild](https://www.mono-project.com/download/preview/) | ||
|
||
Patches originally based on changes made in [free-vscode-csharp](https://github.com/muhammadsammy/free-vscode-csharp). | ||
## Features | ||
Learn more about the rich features of the C# extension: | ||
* [Refactoring](https://code.visualstudio.com/docs/csharp/refactoring): Edit your code with code fixes and refactorings | ||
* [Navigation](https://code.visualstudio.com/docs/csharp/navigate-edit): Explore and navigate your code with features like Go To Definition and Find All References | ||
* [IntelliSense](https://code.visualstudio.com/docs/csharp/navigate-edit): Write code with auto-completion | ||
* [Formatting and Linting](https://code.visualstudio.com/docs/csharp/formatting-linting): Format and lint your code | ||
|
||
For more information you can: | ||
|
||
#### Download this extension | ||
- [Follow our C# tutorial](https://code.visualstudio.com/docs/csharp/get-started) with step-by-step instructions for building a simple app. | ||
- Check out the [C# documentation](https://code.visualstudio.com/docs/languages/csharp) on the VS Code site for general information about using the extension. | ||
|
||
- Download the vsix file from the [latest release assets](https://github.com/blipk/vscodium-csharp/releases/latest). | ||
## How to use OmniSharp? | ||
If you don’t want to take advantage of the great Language Server features, you can revert back to using OmniSharp by going to the Extension settings and setting `dotnet.server.useOmnisharp` to true. Next, uninstall or disable C# Dev Kit. Finally, restart VS Code for this to take effect. | ||
|
||
- Download the extension vsix from [latest CI run artifacts](https://github.com/blipk/vscodium-csharp/actions/workflows/ci-build.yml). | ||
## Found a Bug? | ||
To file a new issue: | ||
|
||
- This extension is published at [Open VSX](https://open-vsx.org/extension/blipk/csharp). | ||
1. Open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS), type "Open Settings (UI)", and press Enter. | ||
2. Search for "trace" in the search bar. Under "Dotnet > Server: Trace" select "Trace" from the drop down. This will provide more output information. | ||
3. Reload the window by opening the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS), type "Reload Window", and press Enter. | ||
4. Next, check the C# logs in the Output Window by opening it with Ctrl+Shift+U (Cmd+Shift+U on macOS), and select C# from the dropdown. | ||
5. Select and copy all the text in the log, and then report the issue through VS Code. | ||
6. Open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS), type “CSharp: Report an issue”, and press Enter. | ||
7. This will open a window with all the necessary information related to the C# extension, dotnet version, mono version, etc. | ||
8. Paste the previously copied C# log into the “Steps to Reproduce” field. Please also include a description of what you were doing/attempting to do at the time the problem occurred. | ||
9. Click the “Preview on GitHub” button, and then file the issue. | ||
|
||
#### Install this extension | ||
Alternatively, you could visit https://github.com/dotnet/vscode-csharp/issues and file a new issue there. | ||
|
||
Open the command pallete (`Ctrl+Shift+P`) then run `Extensions: Install from VSIX` | ||
## Contributing | ||
|
||
Alternatively go to the extensions tab and click the `...` and select `Install from VSIX` | ||
### License | ||
|
||
Either option will prompt you to choose the vsix file you downloaded for your platform | ||
Copyright © .NET Foundation, and contributors. | ||
|
||
#### Post-Installation | ||
The Microsoft C# extension is subject to [these license terms](RuntimeLicenses/license.txt). | ||
The source code to this extension is available on [https://github.com/dotnet/vscode-csharp](https://github.com/dotnet/vscode-csharp) and licensed under the [MIT license](LICENSE.txt). | ||
|
||
1. You must disable the official C# extension for this to work | ||
2. You may be prompted to download/install extension assets, this is to download NetCoreDbg | ||
3. If you don't have a launch.json set up: from the debugging tab click `create a launch.json file` then click the suggested .NET debugger, then select your .csproj file | ||
4. You can now debug C# from the debugging tab, which will use NetCoreDbg | ||
### Code of Conduct | ||
|
||
Some other extensions (C# Dev Kit) depend on the official C# extension and will have to be disabled with it. | ||
This project has adopted the code of conduct defined by the [Contributor Covenant](http://contributor-covenant.org/) | ||
to clarify expected behavior in our community. | ||
For more information see the [.NET Foundation Code of Conduct](http://www.dotnetfoundation.org/code-of-conduct). | ||
|
||
To avoid this limitation you can use the python script in `___patching/_patches/_scripts/disable_official.py` which changes extension dependencies from the official extension to this one. | ||
### Contribution License Agreement | ||
|
||
By signing the [CLA](https://cla.dotnetfoundation.org/), the community is free to use your contribution to [.NET Foundation](http://www.dotnetfoundation.org) projects. | ||
|
||
### .NET Foundation | ||
|
||
This project is supported by the [.NET Foundation](http://www.dotnetfoundation.org). | ||
|
||
<details> | ||
<summary>Development notes</summary> | ||
## Feedback | ||
|
||
##### Build from source locally | ||
<!-- | ||
[FAQs] | ||
Check out the FAQs before filing a question. | ||
--> | ||
|
||
```bash | ||
git clone https://github.com/blipk/vscodium-csharp.git | ||
cd vscodium-csharp | ||
npm install | ||
npm run vscode:prepublish | ||
npx gulp 'vsix:release:package:neutral-clean' | ||
``` | ||
[Provide feedback](https://github.com/dotnet/vscode-csharp/issues) | ||
File questions, issues, or feature requests for the extension. | ||
|
||
##### CI Notes (GitHub Actions) | ||
[Known issues](https://github.com/dotnet/vscode-csharp/issues) | ||
If someone has already filed an issue that encompasses your feedback, please leave a 👍 or 👎 reaction on the issue to upvote or downvote it to help us prioritize the issue. | ||
|
||
A series of GitHub Action workflows are run to apply the patches and build the release. | ||
[Quick survey](https://www.research.net/r/8KGJ9V8?o=[o_value]&v=[v_value]&m=[m_value]) | ||
Let us know what you think of the extension by taking the quick survey. | ||
|
||
1. apply-patches.yml: | ||
- first it merges changes from the official C# extension upstream | ||
- then it runs `___patching/_patcher.sh` which runs any `.sh` files in the `___patching/_patches` directory - these are how patches are applied | ||
- it is run whenever pushing to main, or at midnight every night | ||
- it won't run if it doesnt detect any changes upstream, or if the last `ci-build.yml` failed | ||
- to force it to run push a commit with `[force-ci]` in its message | ||
2. ci-build.yml: this installs all dependencies and builds the `.vsix` files for each platform | ||
3. ci-release.yml: this creates a github release and uploads the `.vsix` files from the previous workflow to it - it will also eventually upload them to Open VSX | ||
|
||
###### Other notes | ||
|
||
- The packages are versioned by the date and time they were created at | ||
|
||
</details> | ||
[csdevkitextension]: https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csdevkit |
Oops, something went wrong.