From aacff2319831d29701f137e9003bf91f545fa70f Mon Sep 17 00:00:00 2001 From: josesimoes Date: Tue, 3 Dec 2024 12:11:22 +0000 Subject: [PATCH 1/4] Update README - Remove mention from preview versions (not used anymore). - Remove column with URLs for preview versions. - Update URL of contributors doc. --- README.md | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index e974acc6..360f52da 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,11 @@ This repo contains .NET **nanoFramework** Visual Studio extension and associated ## Build status -| Component | Build Status | Stable version | Preview version | -|:-|---|---|---| -| Visual Studio 2022 extension | [![Build Status](https://dev.azure.com/nanoframework/Visual-Studio-extension/_apis/build/status/nanoframework.nf-Visual-Studio-extension)](https://dev.azure.com/nanoframework/Visual-Studio-extension/_build/latest?definitionId=17) | [![Visual Studio Marketplace](https://img.shields.io/vscode-marketplace/d/nanoframework.nanoFramework-VS2022-Extension.svg)](https://marketplace.visualstudio.com/items?itemName=nanoframework.nanoFramework-VS2022-Extension) | [![Open VSIX Gallery](https://img.shields.io/badge/Open%20VSIX%20Gallery-(preview)-yellow.svg)](http://vsixgallery.com/extension/bf694e17-fa5f-4877-9317-6d3664b2689a) | -| Visual Studio 2019 extension | [![Build Status](https://dev.azure.com/nanoframework/Visual-Studio-extension/_apis/build/status/nanoframework.nf-Visual-Studio-extension)](https://dev.azure.com/nanoframework/Visual-Studio-extension/_build/latest?definitionId=17) | [![Visual Studio Marketplace](https://img.shields.io/vscode-marketplace/d/nanoframework.nanoFramework-VS2019-Extension.svg)](https://marketplace.visualstudio.com/items?itemName=nanoframework.nanoFramework-VS2019-Extension) | [![Open VSIX Gallery](https://img.shields.io/badge/Open%20VSIX%20Gallery-(preview)-yellow.svg)](http://vsixgallery.com/extension/455f2be5-bb07-451e-b351-a9faf3018dc9) | -| Visual Studio 2017 extension | [![Build Status](https://dev.azure.com/nanoframework/Visual-Studio-extension/_apis/build/status/nanoframework.nf-Visual-Studio-extension)](https://dev.azure.com/nanoframework/Visual-Studio-extension/_build/latest?definitionId=17) | [![Visual Studio Marketplace](https://img.shields.io/vscode-marketplace/d/vs-publisher-1470366.nanoFrameworkVS2017Extension.svg)](https://marketplace.visualstudio.com/items?itemName=vs-publisher-1470366.nanoFrameworkVS2017Extension) | [![Open VSIX Gallery](https://img.shields.io/badge/Open%20VSIX%20Gallery-(preview)-yellow.svg)](http://vsixgallery.com/extension/47973986-ed3c-4b64-ba40-a9da73b44ef7) | +| Component | Build Status | Stable version | +|:-|---|---| +| Visual Studio 2022 extension | [![Build Status](https://dev.azure.com/nanoframework/Visual-Studio-extension/_apis/build/status/nanoframework.nf-Visual-Studio-extension)](https://dev.azure.com/nanoframework/Visual-Studio-extension/_build/latest?definitionId=17) | [![Visual Studio Marketplace](https://img.shields.io/vscode-marketplace/d/nanoframework.nanoFramework-VS2022-Extension.svg)](https://marketplace.visualstudio.com/items?itemName=nanoframework.nanoFramework-VS2022-Extension) | +| Visual Studio 2019 extension | [![Build Status](https://dev.azure.com/nanoframework/Visual-Studio-extension/_apis/build/status/nanoframework.nf-Visual-Studio-extension)](https://dev.azure.com/nanoframework/Visual-Studio-extension/_build/latest?definitionId=17) | [![Visual Studio Marketplace](https://img.shields.io/vscode-marketplace/d/nanoframework.nanoFramework-VS2019-Extension.svg)](https://marketplace.visualstudio.com/items?itemName=nanoframework.nanoFramework-VS2019-Extension) | +| Visual Studio 2017 extension (:warning: Deprecated) | [![Build Status](https://dev.azure.com/nanoframework/Visual-Studio-extension/_apis/build/status/nanoframework.nf-Visual-Studio-extension)](https://dev.azure.com/nanoframework/Visual-Studio-extension/_build/latest?definitionId=17) | [![Visual Studio Marketplace](https://img.shields.io/vscode-marketplace/d/vs-publisher-1470366.nanoFrameworkVS2017Extension.svg)](https://marketplace.visualstudio.com/items?itemName=vs-publisher-1470366.nanoFrameworkVS2017Extension) | ## Feedback and documentation @@ -22,12 +22,9 @@ For documentation, providing feedback, issues and finding out how to contribute Join our Discord community [here](https://discord.gg/gCyBu8T). -## Visual Studio extension galleries +## Visual Studio extension distribution -**nanoFramework** Visual Studio extension is distributed through Visual Studio Marketplace. This is for the stable version. - -In case you want to be in the bleeding edge of technology and use the new stuff (or interested in trying out preview versions and provide valuable feedback) you can do that by adding the Open VSIX Gallery feed to your Visual Studio configuration. Please follow the instructions [here](http://vsixgallery.com/guide/feed/) on how to add the feed to your Visual Studio instance. -This is the feed URL: `http://vsixgallery.com/feed/author/nanoframework/`. +**nanoFramework** Visual Studio extension is distributed through Visual Studio Marketplace. You can either search it on the marketplace or follow the URLs above for the appropriate version. This is the experience you'll have when installing the extension: @@ -43,7 +40,7 @@ If you are working on developing code for **nanoFramework** Visual Studio extens ## Credits -The list of contributors to this project can be found at [CONTRIBUTORS](https://github.com/nanoframework/Home/blob/master/CONTRIBUTORS.md). +The list of contributors to this project can be found at [CONTRIBUTORS](https://github.com/nanoframework/Home/blob/main/CONTRIBUTORS.md). ## Icons From 2808fe8ec1768cfb67e965c4d64c2a698516efea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Tue, 3 Dec 2024 12:14:21 +0000 Subject: [PATCH 2/4] Update developer docs (#857) ***NO_CI*** --- azure-pipelines.yml | 4 ++++ docs/developer-notes.md | 25 +++++++++++++++++++------ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ff363037..59c00940 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,12 +10,16 @@ trigger: - LICENSE.md - CHANGELOG*.md - NuGet.Config + - docs/* - .github_changelog_generator - .gitignore # PR always trigger build pr: autoCancel: true + paths: + exclude: + - docs/* # add nf-tools repo to resources (for Azure Pipelines templates) resources: diff --git a/docs/developer-notes.md b/docs/developer-notes.md index c3b3d5c8..85456b21 100644 --- a/docs/developer-notes.md +++ b/docs/developer-notes.md @@ -14,13 +14,13 @@ To launch Visual Studio experimental instance: In case you need to reset the Visual Studio experimental instance: 1. Open VS developer command prompt. -2. Navigate to `e:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VSSDK\VisualStudioIntegration\Tools\Bin`. -3. Enter `CreateExpInstance /Reset /VSInstance=15.0 /RootSuffix=_d9708c20Exp`. +2. Navigate to `C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VSSDK\VisualStudioIntegration\Tools\Bin`. +3. Enter `CreateExpInstance /Reset /VSInstance=17.0 /RootSuffix=_d9708c20Exp`. -> Mind to adjust the path above to your setup and Visual Studio version (15.0 for VS2017 and 16.0 for VS2019). +> Mind to adjust the path above to your setup and Visual Studio version (16.0 for VS2019 and 17.0 for VS2022). > The RootSuffix above (**_d9708c20Exp**) will be different for each installation. Please amend the above to match your local one. You can find the suffix by navigating to the following folder in the users folder `C:\Users\johndoe\AppData\Roaming\Microsoft\VisualStudio`. -You'll want to reset VS experimental instance on a number of situations. Usually this is when you need to start fresh because there is too much clutter, a failed deployment that is creeplying your debugging or whenever a new Visual Studio update is installed. +You'll want to reset VS experimental instance on a number of situations. Usually this is when you need to start fresh because there is too much clutter, a failed deployment that is creeplying your debugging or whenever you install a new Visual Studio version. ## Debugging with the **nanoFramework** Debugger library @@ -35,7 +35,20 @@ In situations where you want to debug something in the **nanoFramework** Debugge ![](images/reloading-debugger-projects.png) -6. Use the [NuGet reference switcher extension](https://marketplace.visualstudio.com/items?itemName=RicoSuter.NuGetReferenceSwitcherforVisualStudio2017) to switch the references to `nanoFramework.Tools.Debugger` from NuGet to project and point it to the appropriate project. +1. Remove the `nf-debugger` Nuget package from the extension projects. +1. Add a reference to the `nf-debugger` project in the extension projects. +1. Build as ususal. 1. Perform whatever debug that you need by placing breakpoint on any source file of the debugger library. -1. When you are done open the NuGet reference switcher extension again, open the Switch to NuGet references tab and revert the debugger library references. Make sure that the "remove projects from solution" is **not** checked. +1. When you are done remove the reference to the `nf-debugger` project and add back the Nuget package. 1. Unload the debugger library projects from the solution. + +## Known issue with debugging in the experimental instance + +Because of several `CodeBase` entries required for Visual Studio to load the extension assemblies (see [here](https://developercommunity.visualstudio.com/t/Image-icons-from-image-catalog-not-showi/10791720) for the details) you can run into issues for the experimental instance to load the actual assembly of the build you're trying to debug. +If that happens, you're forced to follow these steps: + +1. Make a copy of the folder providing the targets and props of the project system. For Visual Studio 2022, this is usually located at `C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\nanoFramework\v1.0`. Delete the DLLs from there. Leave only the targets and props files. +1. Uninstall the official .NET nanoFramework extension from Visual Studio. +1. Load the extension solution and work as usual. + +Before installing back the official .NET nanoFramework extension, mind to rename (or remove) the project system folder. Failing to do so will cause the extension install to fail. From 23bc381a23d7f1945933ac85e0c3909d61b93b5c Mon Sep 17 00:00:00 2001 From: josesimoes Date: Tue, 3 Dec 2024 12:18:58 +0000 Subject: [PATCH 3/4] Work CI-CD - Add exclusion paths to PR builds. - Update exclusion paths to trigger. - Remove publishing to Open VSIX Gallery. ***NO_CI*** --- azure-pipelines.yml | 71 ++++++++++++--------------------------------- 1 file changed, 19 insertions(+), 52 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 59c00940..544d0123 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,19 +7,36 @@ trigger: paths: exclude: - README.md - - LICENSE.md + - REAME-BEFORE-UPDATE-REFS.txt + - LICENSE - CHANGELOG*.md - NuGet.Config - docs/* - - .github_changelog_generator + - .editorconfig + - .gitattributes - .gitignore + - .gitmodules + - spelling_exclusion.dic # PR always trigger build pr: autoCancel: true + branches: + include: + - '*' paths: exclude: + - README.md + - REAME-BEFORE-UPDATE-REFS.txt + - LICENSE + - CHANGELOG*.md + - NuGet.Config - docs/* + - .editorconfig + - .gitattributes + - .gitignore + - .gitmodules + - spelling_exclusion.dic # add nf-tools repo to resources (for Azure Pipelines templates) resources: @@ -260,31 +277,6 @@ jobs: condition: and( succeeded(), ne(variables['system.pullrequest.isfork'], true) ) displayName: Publish deployables artifacts - # upload extension to Open VSIX Gallery (only possible if this is not a PR from a fork) - - task: PowerShell@2 - displayName: Upload vsix to Open VSIX Gallery - condition: >- - and( - succeeded(), - ne(variables['system.pullrequest.isfork'], true), - eq(variables['System.PullRequest.PullRequestId'], '') - ) - continueOnError: true - inputs: - targetType: 'inline' - script: | - - $artifactsCollection = @("./*VS2019.Extension.vsix") | %{ Get-ChildItem -File . -Filter $_ -Recurse} - - (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex - - foreach($file in $artifactsCollection) - { - "Uploading VSIX package to Open VSIX Gallery..." | Write-Host - - Vsix-PublishToGallery $file - } - # create or update GitHub release - task: GithubRelease@1 condition: >- @@ -457,31 +449,6 @@ jobs: condition: and( succeeded(), ne(variables['system.pullrequest.isfork'], true) ) displayName: Publish deployables artifacts - # upload extension to Open VSIX Gallery (only possible if this is not a PR from a fork) - - task: PowerShell@2 - displayName: Upload vsix to Open VSIX Gallery - condition: >- - and( - succeeded(), - ne(variables['system.pullrequest.isfork'], true), - eq(variables['System.PullRequest.PullRequestId'], '') - ) - continueOnError: true - inputs: - targetType: 'inline' - script: | - - $artifactsCollection = @("./*VS2022.Extension.vsix") | %{ Get-ChildItem -File . -Filter $_ -Recurse} - - (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex - - foreach($file in $artifactsCollection) - { - "Uploading VSIX package to Open VSIX Gallery..." | Write-Host - - Vsix-PublishToGallery $file - } - # create or update GitHub release - task: GithubRelease@1 condition: >- From a783f54d484440de68418a20d59b07e63a115860 Mon Sep 17 00:00:00 2001 From: josesimoes Date: Tue, 3 Dec 2024 12:19:38 +0000 Subject: [PATCH 4/4] Remove unused files ***NO_CI*** --- config/filelist.txt | 2 -- switcher.json | 6 ------ 2 files changed, 8 deletions(-) delete mode 100644 config/filelist.txt delete mode 100644 switcher.json diff --git a/config/filelist.txt b/config/filelist.txt deleted file mode 100644 index 506e64f0..00000000 --- a/config/filelist.txt +++ /dev/null @@ -1,2 +0,0 @@ -**/Visual-Studio-extension-2019* -**/Visual-Studio-extension-2022* \ No newline at end of file diff --git a/switcher.json b/switcher.json deleted file mode 100644 index df8a58d5..00000000 --- a/switcher.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "solution": "nanoFramework.Tools.VisualStudio.sln", - "mappings": { - "nanoFramework.Tools.Debugger.Net": "nf-debugger/source/nanoFramework.Tools.DebugLibrary.Net/nanoFramework.Tools.DebugLibrary.Net.csproj" - } -} \ No newline at end of file