dotnet / dotnet/project-system
Custom VS extension development
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
**Visual Studio Version**:
VS Community 2019 16.6.5
**Summary**:
In [my custom VS extension SwitchStartupProject](https://heptapod.host/thirteen/switchstartupproject) [(on the Marketplace)](https://marketplace.visualstudio.com/items?itemName=vs-publisher-141975.SwitchStartupProjectForVS2019) I use [`ILaunchSettingsProvider`](https://github.com/dotnet/project-system/blob/master/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Debug/ILaunchSettingsProvider.cs) to programmatically change debug settings of multiple startup projects.
So far I referenced nuget package [`Microsoft.VisualStudio.ProjectSystem.Managed` `2.0.6142705` on nuget.org](https://www.nuget.org/packages/Microsoft.VisualStudio.ProjectSystem.Managed/).
Recently, I found a slightly newer version [`2.3.6152103` on your team feed](https://dotnet.myget.org/feed/roslyn/package/nuget/Microsoft.VisualStudio.ProjectSystem.Managed/2.3.6152103) which includes [`IActiveDebugFrameworkServices`](https://github.com/dotnet/project-system/blob/master/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Debug/IActiveDebugFrameworkServices.cs) that allows my extension to also set the target framework of multi-targeting projects.
Now, I saw there is [`IPersistOption`](https://github.com/dotnet/project-system/blob/master/src/Microsoft.VisualStudio.ProjectSystem.Managed/ProjectSystem/Debug/IPersistOption.cs) which might allow my extension to change debug settings without affecting the `launchSettings.json` files. (I didn't study it in detail yet.) Unfortunately, I didn't find any non-beta and non-rc releases of `Microsoft.VisualStudio.ProjectSystem.Managed` that include `IPersistOption`.
The beta releases are not that useful because they have a dependency on package `RoslynTools.SignTool` which seems not to be public (for obvious reasons) and therefore installation fails.
**Questions**:
1. Are there somewhere newer non-beta releases of the nuget packages for use by custom VS extensions?
2. As I understand it, these nuget packages are deployed with VS. (e.g. at `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\ManagedProjectSystem\Microsoft.VisualStudio.ProjectSystem.Managed.dll` in my case.) Should my custom VS extension use that VS-bundled DLL somehow instead of the pretty old nuget package? How would I do that?
3. Given the circumstances above, my current approach feels like a hack. Am I even supposed to use `Microsoft.VisualStudio.ProjectSystem.Managed` from a custom VS extension? Is there another/better way to programmatically set debug settings of CPS projects?
Contributor guide
Assessment
This issue has not been assessed yet.