Code Monkey home page Code Monkey logo

vsextensibility's Introduction

title description date
VisualStudio.Extensibility
Welcome to the Visual Studio Extensibility model
2021-08-19

Welcome to VisualStudio.Extensibility

VisualStudio.Extensibility is a new framework for developing Visual Studio extensions. The new framework focuses primarily on extensions that run out-of-process from the IDE for improved performance and reliability, and it features a modern, asynchronous API that has been streamlined and carefully engineered to maximize developer productivity. VisualStudio.Extensibility is in active development.

With the current version, you can develop a wide range of extensions to Visual Studio, including creating commands, working with code or text in the editor, displaying prompts or dialogs to the user, creating debugger visualizers, and more!

VisualStudio.Extensibility aims to address many of the problems developers experience when using and writing extensions in Visual Studio. Writing extensions using VisualStudio.Extensibility provides the following benefits:

  • Increased reliability: Visual Studio remains responsive and won't crash if an extension crashes or hangs.
  • Reduced API complexity: VisualStudio.Extensibility has simplified architecture, consistent APIs, and clear documentation.
  • Hot-loading functionality: Visual Studio doesn't need to be restarted when installing extensions. Eventually, the VisualStudio.Extensibility SDK will ultimately allow you to write any extension you could write using the VSSDK. However, until that time, you might encounter situations where the functionality you need in your extension is not yet available in VisualStudio.Extensibility. In that case, you can develop an in-process extension by leveraging the new VisualStudio.Extensibility APIs while relying on VSSDK to cover any feature gap. To learn more, see In-proc extensions.

Important Documentation for the VisualStudio.Extensibility SDK has moved to a new location: VisualStudio.Extensibility documentation.

Documentation is currently available for the following:

Navigate the documentation

Article Description
Install VisualStudio.Extensibility Download and install VisualStudio.Extensibility.
Get started Start with beginner quickstarts and introductory tutorials if you've never developed an extension before.
Concepts Build your mental model of how the SDK and extensions work.
Overviews Learn more by reading overviews of each major area of functionality.
Samples Explore sample code demonstrating major features.
API reference Browse the VisualStudio.Extensibility API documentation.
Experimental APIs and Breaking Changes Learn about our approach to stable-vs-experimental APIs and about breaking changes from the previous version.
Known Issues View known issues with the VisualStudio.Extensibility SDK.
Advanced topics Learn implementation details of the VisualStudio.Extensibility SDK.

Install VisualStudio.Extensibility

VisualStudio.Extensibility works with Visual Studio 2022 version 17.9 or higher with the Visual Studio extension development workload to be installed. VisualStudio.Extensibility extensions can be installed on Visual Studio 2022 version 17.9 and above. VisualStudio.Extensibility packages having a version higher than 17.9 provide additional functionalities and can be used when targeting the corresponding version of Visual Studio. For example, when building an extension with VisualStudio.Extensibility packages version 17.10, the resulting extension will be compatible with Visual Studio 17.10 and above.

Get Started

The following articles will help you get oriented and started:

To understand how to work with VisualStudio.Extensibility, we recommend a thorough understanding of asynchronous programming with async and await and dependency injection. In addition, UI in VisualStudio.Extensibility is based on Windows Presentation Foundation (WPF), so you might want to review the WPF documentation.

Concepts

If you're familiar with the Visual Studio SDK, refer to Introduction to VisualStudio.Extensibility for VSSDK users.

To build your mental model of how Visual Studio extensions work, see Parts of a new Visual Studio extension.

To find out what is included in the SDK, see Functional areas of the SDK.

Visual Studio extensions appear in the IDE when certain conditions are met. To have control over how and when your extension appears in the IDE, see Rule-based activation constraints.

Visual Studio extensions make their features available to Visual Studio through contributions. For more information, see Contributions.

Learn about the Remote UI model used in the VisualStudio.Extensibility.

Overviews

Read an overview of the areas of the SDK that you might need for your extension development projects:

  • To learn how to create commands and expose them to users in the IDE, see Commands.
  • To learn how to work with the contents of files and documents, see Editor.
  • To learn how to work with the in-memory representation of those documents themselves, see Documents.
  • To learn how to use the output window in an extension, see Output window.
  • To learn how to work with tool windows, dockable windows within the Visual Studio IDE, see Tool windows.
  • To learn how to use prompts with customizable buttons to interact with the user, see User prompts.
  • To learn how to use dialogs with custom UI to interact with the user, see Dialogs.
  • To learn how to create custom data visualizations when debugging, see Debugger Visualizers.
  • To learn how to query or modify information about project sand solutions, see Project Query.

Samples and tutorials

You can find a Visual Studio solution that contains all samples at Samples.sln.

Sample Description
Simple command handler Demonstrates the basics of working with commands. See also the Create your first Visual Studio extension tutorial.
Insert guid extension Shows how to insert text or code in the code editor. See also the Create your simple extension tutorial.
Command configuration Shows how to configure a command with specific activation conditions. This command also uses a resource file for localization.
Command parenting Shows how to author a command that can be parented to different aspects of the IDE.
Document selector Shows how to create an editor extension that is only applicable to files matching a file path pattern.
Output window Shows the most basic use of the Output Window API.
Tool window Shows how to create a tool window and populate it with content.
User prompt Shows how to display a prompt to the user.
Dialog Shows how to display a dialog with custom UI to the user.
Word count margin Shows how to create an editor margin extension that displays the word count in a document.
Markdown linter Shows how multiple components can interact together inside an extension and how different areas of Visual Studio can be extended.
Project Query Shows several different kinds of project system queries you can make.
Comment remover Shows how to consume Visual Studio SDK services through .NET dependency injection and use VisualStudio.Extensibility APIs for commands, prompts, and progress report.

Experimental APIs and Breaking Changes

Starting with our 17.9 release, we're ready to label the vast majority of our APIs as stable. That is, we don't plan to make any breaking changes to these APIs. Any breaking changes that might need to be made, for example in response to user feedback about usability, will be communicated formally and with plenty of notice on our breaking changes page.

There are a few of our APIs that don't yet meet this bar for stability, for one of several reasons:

  • The feature area is new and additional features and changes are expected in future versions.
  • The API is new and we want to incorporate user feedback into the deisgn before marking it stable.
  • We've received feedback that a particular API is difficult to use, so we're planning on updating it in future versions.

For these APIs, we've explicitly labeled them using the [Experimental] attribute to help extension authors create their extensions with confidence in the the SDK.

For more information, including how to use experimental APIs, please see our Experimental APIs page.

Known Issues

We appreciate your feedback and bug reports in our Issues Tracker, and we work to address any issues found in the SDK.

Please visit our Known Issues page for information about any current known issues.

Advanced Topics

Article Description
Advanced Remote UI In-depth information on the remote UI model
In-proc extensions A quick walkthrough on different options to use VisualStudio.Extensibility SDK in-proc

API Docs

Send feedback

We're actively seeking feedback and engagement. The preview phase is a great time to get community input to help us identify issues and opportunities. You can provide feedback and report bugs in our issues tracker.

For future updates please bookmark our announcements page.

While VisualStudio.Extensibility is in the preview phase, it’s a great time for you, our community members, to share your input to help us identify issues and opportunities. Community participation is welcome and highly encouraged; we value the input and insights provided by extension developers like you!

You can provide feedback and report bugs in our issues tracker. Please note that we don’t have a dedicated support team – we, the engineering team working on VisualStudio.Extensibility will be the ones monitoring and triaging issues and other extension developers will be able to comment on these, too. Because we don’t have a dedicated support team, it may take some time before we get to issues and we won’t always be able to respond to everything.

Regarding our response flow on issues, here’s a general overview:

  • You submit an issue.
  • That issue remains in a “triage” state until we’ve assigned a team member to investigate it.
  • Once assigned, the issue is moved to “scheduled”. This doesn’t imply an immediate fix, but indicates that we’re actively looking into it.
  • Issues we won’t address immediately will be moved to “backlog”.
  • Issues that are either fixed in code or addressed via comments will be closed.

For future updates please bookmark our announcements page.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos is subject to those third-party's policies.

vsextensibility's People

Contributors

aarnott avatar andysterland avatar angiecco avatar bertanaygun avatar calvinallen avatar daryayuk avatar eptisamk avatar evansmith-everag avatar ghogen avatar gundermanc avatar hgwelliver avatar jdrobison avatar jongalloway avatar jxwoon avatar kettty avatar leslierichardson95 avatar maiak avatar matteo-prosperi avatar microsoft-github-operations[bot] avatar microsoftopensource avatar newrad0603 avatar olegtk avatar ryantoth3 avatar shaggygi avatar tinaschrepfer avatar trippwill avatar ttstanley avatar vd-ferreira avatar wade0016 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vsextensibility's Issues

Using EnvDTE and vsCMAccess to set an access modifier is causing code deletion

Within the Microsoft.VisualStudio.SDK package is the EnvDTE80 assembly. Inside it there are interfaces like CodeFunction2 that allow for an access modifier to be set (e.g. function.Access = vsCMAccess.Public). This used to work as expected for several years, but as I upgraded my extension CodeMaid to use v16.10.31321.278 of this package for VS2022 support it now has negative side effects to the code.

Here's an example:

namespace BugRepro
{
    public class Class1
    {
#if DEBUG
        [Obsolete]
#endif
        uint A(uint b) => b;
    }
}

If you attempt to set the access modifier on the method A it will delete the #endif line of code. Originally reported here: codecadwallader/codemaid#879

There have been several other issues reported too that we've traced back to attempting to set the access modifiers. It is affecting methods, properties, structs, etc. I can provide more examples if it would be helpful.

Thanks for looking into it and please let me know if there's any way I can be of help!

Custom Project Property Page now working on VS2022

Hello, is there any documentation about creating a custom project property page on Visual Studio 2022?
My code for VS2019 doesn't work anymore, the pages don't appear nor the custom icon in the solution explorer...

A screenshot on how it used to be:
image

IntelliCode whole line completion API

Are there any plans to implement IntelliCode whole line completion public API?

There is a need in:

  • an ability to determine that whole line completion is active/shown for the extension not to process Tab and Right Arrow keys and not to break the completion;
  • an ability to pass a custom completion text to implement an integration of custom completion with IntelliCode whole line completion.

Error MSB4018: The "GetDeploymentPathFromVsixManifest" task failed unexpectedly.

When building Dev17-targeted extensions using VS 16.10.1 I get the following error:

E:\nuget.cache\microsoft.vssdk.buildtools\17.0.2122-preview2\tools\VSSDK\Microsoft.VsSDK.targets(809,3): Error MSB4018: The "GetDeploymentPathFromVsixManifest" task failed unexpectedly.
System.TypeLoadException: Method 'get_JoinableTaskFactory' in type 'Microsoft.VisualStudio.Sdk.BuildTasks.ExtensionEngineHost' from assembly 'Microsoft.VisualStudio.Sdk.BuildTasks.17.0, Version=17.0.2122.24799, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' does not have an implementation.
   at Microsoft.VisualStudio.Sdk.BuildTasks.ExtensionManagerUtilities.GetExtensionEngine(ISettingsManager manager, Boolean deletePendingUninstalls)
   at Microsoft.VisualStudio.Sdk.BuildTasks.GetDeploymentPathFromVsixManifest.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

Building extension targeting both Dev16 and Dev17 in Dev17 seems to work fine though.

This is required for our extension to build in the lab, which currently only has Dev16 installed.

[VS2022] The VsixPublisher.exe tool shipped with VS2022 seems to be broken

Installed product versions

Visual Studio: 2022 All Versions

Description

Invoking the VsixPublisher.exe tool shipped with Visual Studio 2022 inside the folder C:\Program Files\Microsoft Visual Studio\2022\Professional\VSSDK\VisualStudioIntegration\Tools\Bin ALWAYS throws an exception from the Command Line.

Steps to recreate

Go to above mentioned path of your flavour of Visual Studio (Community/Professional/Enterprise)
Run this command from Command Line as a test of the VsixPublisher.exe tool: VsixPubliser.exe help

Current behavior

Unhandled Exception: System.MissingMethodException: Method not found: 'Void Microsoft.VisualStudio.RemoteControl.RemoteControlClient..ctor(Microsoft.VisualStudio.Utilities.Internal.IRegistryTools, System.String, System.String, System.String, Int32, Int32, Int32)'.
   at Microsoft.VisualStudio.Telemetry.TelemetryManifestManager.Start(String hostName, Boolean isDisposing)
   at Microsoft.VisualStudio.Telemetry.TelemetrySession.Start(Boolean checkPendingAsimovEvents)
   at Microsoft.VisualStudio.Sdk.VsixPublisher.TelemetryLogger.CreateTelemetrySession()
   at Microsoft.VisualStudio.Sdk.VsixPublisher.TelemetryLogger.get_TelemetrySession()
   at Microsoft.VisualStudio.Sdk.VsixPublisher.Program.Main(String[] args)
Vsix Publishing Tools 17.0.5233
Copyright (C) Microsoft Corporation. All rights reserved.

  deleteExtension               Delete an extension from the marketplace.

  deletePublisher               Delete a publisher from the marketplace.

  help                          Show the usage text

  login                         Add a publisher to the known publishers list.

  logout                        Remove a publisher from the known publishers list.

  publish                       Publishes an extension.

  version                       Display the version of this program.

Expected behavior

The publisher tool should show help results, but without the MissingMethodException thrown from it.
The same exception is thrown no matter the command you run (help/login/logout/publish etc.). It seems the tool does execute the command as expected successfully, but not without an exception thrown, leading to a -1 Exit Code being returned when calling the tool from a script. This is leading to failures of my release pipelines.

Note: I apologize if this isn't the right place to report this issue, I can close it and report the bug in a more appropriate Microsoft forum if someone can let me know. Thanks!

Microsoft.VisualStudio.Sdk meta package and Microsoft.VisualStudio.TemplateWizardInterface reference have build conflicts

Microsoft.VisualStudio.TemplateWizardInterface has a reference to Microsoft.VisualStudio.Interop. However, Microsoft.VisualStudio.Interop has types that are duplicated in Microsoft.VisualStudio.Sdk which results in build errors when the tree of the references are used in a project.

Is seems that Microsoft.VisualStudio.TemplateWizardInterface is not designed to be used with Microsoft.VisualStudio.Sdk. Is that assumption correct? If so, is there any plans to include the logic for the template wizard extensions in the SDK meta package or we will need to reference the Microsoft.VisualStudio.Interop assembly from the Visual Studio installation folder in order to use the IWizard interface for example?

Inject TraceListener in an : ExtensionPart

The examples show a TraceSource injected in Command implementations.
When I try to inject a TraceSource into a class implementing ExtensionPart the class isn't loading.

According to the docs this should be possible:
https://github.com/microsoft/VSExtensibility/blob/main/docs/new-extensibility-model/inside-the-sdk/extension-anatomy.md
The following services are provided by the SDK that can be used in constructor for any extension part:
...
TraceSource: A trace source instance is created on demand for each extension that can be used to record diagnostic information. These instances are registered with Visual Studio diagnostics provider which can be used to merge logs from multiple services and utilize future tooling to access real time logging. See Logging section for more information.

Is there more I need to do, then adding "TraceSource traceListener" as parameter in the ctor of an ExtensionPart? Is there a non-Command example around?

Kind regards, Florian.

XAML Designer still runs 32bit

Is this intended? Will it change?
image

It's quite important for us to have the right native libraries loaded for the xaml design process to work.

Extend Existing Commands

Suggestion for what to build out...

All the examples I've seen teach how to add NEW commands to VS Studio. I'm interesting in extending existing commands, and I've never been able to find docs on how to do this or even a listing of the existing commands.

For example: I want to extend/intercept the print command to programmatically invoke page setup first, fill in saved values for margins, and then run the print command as usual.

In VS2022, the interfaces `IVsSolutionLoadManager` and `IVsSolutionLoadManagerSupport` have been removed. What is the recommended way now to handle solution load?

I have a custom project solution which does some cleanup tasks before the solutions are opened. With Visual Studio 2022, in the list of removed APIs, https://docs.microsoft.com/en-us/visualstudio/extensibility/migration/removed-api-list?view=vs-2022#asynchronous-solution-load-and-lightweight-solution-load one of the items are the interfaces IVsSolutionLoadManager and IVsSolutionLoadManagerSupport. After this removal, what is the recommended way to handle solution load.

Access to build events

Hello. Is there an event to hook on successful solution/project build? There was BuildEvents class in old VS Extensions.
I used
dte = (DTE2)await GetServiceAsync(typeof(DTE));
events = dte.Events;
buildEvents = events.BuildEvents;
buildEvents.OnBuildProjConfigDone += BuildEvents_OnBuildProjConfigDone;
buildEvents.OnBuildBegin += BuildEvents_OnBuildBegin;
buildEvents.OnBuildDone += BuildEvents_OnBuildDone;
referencesEvents = (ReferencesEvents)dte.Events.GetObject("CSharpReferencesEvents");
referencesEvents.ReferenceAdded += ReferencesEvents_ReferenceAdded;

Thank you

Having issues with pkgdef files for visual studio 2022

I've created two stubs for the AD7Engine, and PortSupplier.
I've also created a visix using the DebugLaunchProviderBase.

However, when hooking with the project I can step though the visix code and
public override async Task<IReadOnlyList> QueryDebugTargetsAsync(....)
which sets:
............................
............................
settings.LaunchDebugEngineGuid = Constants.DebugEngine170Guid;
settings.LaunchOptions = DebugLaunchOptions.StopDebuggingOnEnd;
settings.PortName = node;
settings.PortSupplierGuid = Constants.PortSupplier170Guid;

This works with visual studio 2019 all built with Any CPU. Finds both stubs and I can step though them to verify the hooks.
However, with visual studio 2022 I reach the end of public override async Task<IReadOnlyList> QueryDebugTargetsAsync(....), and then it complains it cannot find the file specified.

image
image

=====================================================================================

PkgDef contents:

[$RootKey$\AD7Metrics\Engine\{70A6FCFC-1A0A-4B61-A320-FD28F92D3732}]
"DumpWriting"=dword:00000001
"Attach"=dword:00000001
"CLSID"="{2A3220C9-8CA7-4F05-8747-520D6A78B61B}"
"DataBP"=dword:00000001
"Disassembly"=dword:00000001
"Name"="INtime"
"PortSupplier"="{E844B652-8854-478F-8237-206BCAFFDC4F}"
"SuspendThread"=dword:00000001
"SetNextStatement"=dword:00000001

[$RootKey$\CLSID\{2A3220C9-8CA7-4F05-8747-520D6A78B61B}]
"Assembly"="IntimeDbEngine"
"Class"="INtimeDebugger.Engine"
"InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL"
"CodeBase" ="$=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\INTIME$VisualStudio\IntimeDbEngine.dll"

[$RootKey$\AD7Metrics\PortSupplier\{E844B652-8854-478F-8237-206BCAFFDC4F}]
"CLSID"="{C644EA21-DE61-4D47-A7E0-58B4BF26F1DA}"
"Name"="INtime Port Supplier"

[$RootKey$\CLSID\{C644EA21-DE61-4D47-A7E0-58B4BF26F1DA}]
"Assembly"="IntimeDbPorts"
"Class"="INtimeDebugger.PortSupplier"
"InprocServer32"="$WinDir$\SYSTEM32\MSCOREE.DLL"
"CodeBase" ="$=HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\INTIME$VisualStudio\IntimeDbPorts.dll"

VSSDK.BuildTools 17.0 preview 4 breaks package dependencies

I upgraded my project to reference the 17.0 preview 4 build tools and my VSIX no longer contains package references from nuget.
Preview 3 was fine. Preview 4 is broken.

Repro:

  1. Create a new VSIX package project in VS 2022 preview
  2. Manage the Nuget references and set the version of Microsoft.VSSDK.BuildTools to 17.0.3177-preview3
  3. Also add a Nuget reference to Microsoft.ApplicationInsights 2.18.0
  4. Build the VSIX
  5. Rename the VSIX to .ZIP and examine the contents of the ZIP in Windows Explorer.
    image

Notice the presence of Microsoft.ApplicationInsights.dll

  1. Now upgrade the Microsoft.VSSDK.BuildTools reference to 17.0.4207-preview4
  2. Rebuild the VSIX
  3. Rename the VSIX to .ZIP and examine the contents:
    image

Notice that the dependent assemblies (Microsoft.ApplicationInsights.dll, System.Buffers, System.Memory, etc.) are missing.

This breaks extension loading due to the missing files.

IDebugEngine2

Migrating to Visual studio 2022 is presenting some challenges.
Our current implementation to our software is a 32 bit c++ dlls So I'll need to update the main wrapper to a 64bit version, but it uses other 32 bit components.
Question 1: Is the com object for IDebugEngine2 being supported, and for how long.?
Question 2: Do you recommend upgrading the c++ wrapper to a .Net version?

Sharing resources between VS2019 and VS2022 projects

After moving all the code to a Shared project, I was able to build from the same solution for VS2019 and VS2022.

My question is, can we also share resources such as images from the Shared project, not just code? Right now my assets/resources are duplicated.

When compiling VSIX assemblies for VS2019, 2017 and lower we get conflict error

We easily succeeded to have our extension compiling and working within VS2022 Preview, thanks for the great WIKI!

However when compiling our VSIX projects for VS2019, VS2017 and lower VS versions, we get plenty of conflict errors like.

Error	CS0433	The type 'Window2' exists in both 
'EnvDTE80, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 
and 'Microsoft.VisualStudio.Interop, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'	
NDepend.VisualStudioExtension.Common3	
C:\My\NDepend\7.Current\NDepend.VisualStudioExtension.Common\Base\IVSVersionSwitch.cs	19	Active

Note that these VSIX projects were left untouched since we created a dedicated VSIX project for VS2022. Thus these untouched projects don't have any <PackageReference> item.

I've read the VSExtensibility FAQ advice:

  • Add the following line to your CS Project to avoid duplicate assemblies: <PackageReference Include="<Name of offending assembly>" ExcludeAssets="compile" PrivateAssets="all" />

However adding these lines to NDepend.VisualStudioExtension.Common3.csproj doesn't help and the conflict errors persist.

<PackageReference Include="Microsoft.VisualStudio.Interop, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" ExcludeAssets="compile"  PrivateAssets="all"/>
<PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.0.0-previews-3-31605-261" ExcludeAssets="compile"  PrivateAssets="all"  />

At a point these conflict errors went away for no identified reasons and our VS2019 (and lower versions) packages compiled. However I noticed that all assemblies in the Microsoft.VisualStudio.SDK pkg were copied to the output directory. Thus I tried to add to the csproj things like this (based on this recommendation).

  <ItemDefinitionGroup>  
    <PackageReference ExcludeAssets="runtime;" />
  </ItemDefinitionGroup>

But not only it didn't help to avoid VS packages assemblies being copied, but the conflict errors came back now and I cannot find a way to get rid of those.

[VS2022] Various ProjectProperties methods and Properties are now missing....

....and don't seem to be covered in any migration guide I've read.

Properties
ConfiguredProject
File
ItemName
ItemType

Methods
GetNamedCatalogsAsync()
TryGetCurrentCatalogSnapshot(out catalogSnapshot)
GetConfigurationGeneralPropertiesAsync();

to name a few. If migrating our extension to VS2022 what are these properties and methods now??

Method not found: Void Microsoft.VisualStudio.Shell.Settings.ShellSettingsManager..ctor

@JoeRobich and I have been working on updating Carnation to publish for VS 2022. It's a small package that is already compiling for AnyCPU and, luckily, was fairly easy to port.

During our port we've been having issues. We access the settings store on load and are hitting that Void Microsoft.VisualStudio.Shell.Settings.ShellSettingsManager..ctor(Microsoft.VisualStudio.Shell.Interop.IVsSettingsManager) does not exist.

You can get the current port from this branch: https://github.com/ryzngard/carnation/tree/vs2022-support

Are there known issues with getting the ShellSettingsManager? I didn't see anything in breaking changes and the latest packages seem to have this definition.

Error targeting both VS 2022 and 2019 - Could not load file or assembly Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.

I was able to port the extension to VS 2022, and it works great.

The issue I am having is creating a single VSIX to target both 2019 and 2022. When installing the package on VS 2019, the errors below appear in the ActivityLog.xml.

Any help is greatly appreciated.

  <entry>
    <record>2127</record>
    <time>2021/07/16 18:23:44.588</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>Failed to set Public Key Token</description>
    <hr>80070057 - E_INVALIDARG</hr>
    <errorinfo></errorinfo>
  </entry>
  <entry>
    <record>2128</record>
    <time>2021/07/16 18:23:44.588</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>Binding Redirect / CodeBase entry from configuration hive is malformed, ignoring.</description>
    <hr>80070057 - E_INVALIDARG</hr>
    <errorinfo></errorinfo>
    <path>Software\Microsoft\VisualStudio\16.0_5c531747Exp_Config\RuntimeConfiguration\dependentAssembly\codeBase\{7E3251B2-FB42-4E38-B22C-5FD281BD4413}</path>
  </entry>
.....
    <record>2913</record>
    <time>2021/07/16 19:44:37.953</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>CreateInstance failed for package Source: &apos;mscorlib&apos; Description: Could not load file or assembly &apos;Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;System.IO.FileNotFoundException: Could not load file or assembly &apos;Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos; or one of its dependencies. The system cannot find the file specified.&#x000D;&#x000A;File name: &apos;Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&apos;&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)&#x000D;&#x000A;   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)&#x000D;&#x000A;   at System.Activator.CreateInstanceFromInternal(String assemblyFile, String typeName, Boolean ignoreCase, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, Evidence securityInfo)&#x000D;&#x000A;   at System.AppDomain.CreateInstanceFrom(String assemblyFile, String typeName)&#x000D;&#x000A;&#x000D;&#x000A;=== Pre-bind state information ===&#x000D;&#x000A;LOG: DisplayName = Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&#x000A; (Fully-specified)&#x000D;&#x000A;LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/&#x000D;&#x000A;LOG: Initial PrivatePath = NULL&#x000D;&#x000A;Calling assembly : ClangPowerTools, Version=1.0.0.0, Culture=neutral, PublicKeyToken=818ea5269d1c16e6.&#x000D;&#x000A;===&#x000D;&#x000A;LOG: This bind starts in LoadFrom load context.&#x000D;&#x000A;WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().&#x000D;&#x000A;LOG: Using application configuration file: C:\Users\horat\AppData\Local\Microsoft\VisualStudio\16.0_5c531747Exp\devenv.exe.config&#x000D;&#x000A;LOG: Using host configuration file: &#x000D;&#x000A;LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.&#x000D;&#x000A;LOG: Post-policy reference: Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;WRN: Comparing the assembly name resulted in the mismatch: Major Version&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/DataCollectors/x86/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/DataCollectors/x86/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PublicAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/TestWindow/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Platform/Debugger/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/DataCollectors/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/DataCollectors/x86/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/PrivateAssemblies/DataCollectors/x86/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///c:/users/horat/appdata/local/microsoft/visualstudio/16.0_5c531747exp/extensions/caphyon/clang power tools/7.4.0/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///c:/users/horat/appdata/local/microsoft/visualstudio/16.0_5c531747exp/extensions/caphyon/clang power tools/7.4.0/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.DLL.&#x000D;&#x000A;LOG: Attempting download of new URL file:///c:/users/horat/appdata/local/microsoft/visualstudio/16.0_5c531747exp/extensions/caphyon/clang power tools/7.4.0/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;LOG: Attempting download of new URL file:///c:/users/horat/appdata/local/microsoft/visualstudio/16.0_5c531747exp/extensions/caphyon/clang power tools/7.4.0/Microsoft.VisualStudio.Shell.15.0/Microsoft.VisualStudio.Shell.15.0.EXE.&#x000D;&#x000A;</description>
    <guid>{F564F9D3-01AE-493E-883B-18DEEBDB975E}</guid>
    <hr>80004005 - E_FAIL</hr>
    <errorinfo></errorinfo>

Repo Open-Source

Is the plan to open-source this repo similar to Community Toolkit or will it only be NuGet reference(s) like older model? Just curious.

Visualizer API

Please include Visualizers in the new Extension API as you guys build it out.

  • Visualizers are not part of the existing extension model
  • They use a horribly dated API that requires you to mark the types that will use the Visualizer
  • Distributing them is a nightmare

The lack of a good extension model for Visualizers is currently Visual Studios achilles heel, in my opinion. Being able to better visualize data while debugging is critical to C#/.NET/Visual Studio being comparable to other languages and development environments.

SimpleRemoteCommandSample Errors

There appears to be some differences in the example walkthrough and sample code project.

In the walkthrough, there is a CommandName variable that is not defined in the ExecuteCommandAsync method.

this.traceSource.TraceInformation($"Executing command {CommandName}");

In the final sample code file, it is defined here.

It seems like the property Name could be exposed similar to Id.

New Roadmap

Great stuff and looking forward to it!

Understanding this is new and long-term project, somebody has to ask... When will we see a roadmap and possible timeline on certain features? For example, when will support come for Output Window and Solution Explorer?

Thanks

Improved Support and Docs for DGML and the Editor

This might be specific to the current DGML Editor but adding here as the related APIs/docs could be improved as the new VS Extensibility roadmap progresses.

I currently use OpenSoftware DGML Builder as it is easier to work with compared to the provided VS GraphModel package. It seems like there could be improvements with the VS package including documentation on how to use (like serialization, code generation, use-cases, etc.).

It would also be nice to add extensibility (if not already) to the DGML Editor where commands, events, and other entry points can be used. For example, I would like to be able to add custom Context Menus to Nodes/Items in the graph.

I'm not sure if completely related, but improvements might also help the Visualizer issue along the way.

Thanks for reviewing. 😄

MSBuild fails to build projects with PackageReference item group

It seems that when you build a solution that contains projects with package references with the latest MSBuild it fails because the references are not passed to the Roslyn compiler. Here is an example commandline:

msbuild VSIXProject1.sln /p:Configuration=Release;Platform="Any CPU"

This works with the MSBuild form Visual Studio 2019. Is there something that I have missed here or there is an issue? This can be reproduced with a standard VSIX project created in Visual Studio 2022.

Open Folder extensibility and CMake integration

Is the CMake C++ integration within Visual Studio implemented through the public Open Folder extensibility API? I was assuming so and that the code would be on Github somewhere, but I wasn't able to find anything.

I've started work on an Open Folder extension for the build2 toolchain, but the lack of any example code is a major blocker on progress. If the CMake integration implementation was publicly available, it would be a huge help for this and similar projects. Is there any chance of that, or something similar?

MSBuildWorkspace.OpenProjectAsync cannot locate Microsoft.NET.Sdk.

Our extension makes heavy use of Roslyn. After migrating to Dev17, we see that MSBuildWorkspace.OpenProjectAsync is failing. It reports a diagnostic saying "The SDK 'Microsoft.NET.Sdk' specified could not be found."

We can actually repro this outside of our extension with a minimal Roslyn console app that tries to open a minimal C# class library project.

Here is the console app:

        static async Task Main(string[] args)
        {
            using (var workspace = MSBuildWorkspace.Create())
            {
                var project = await workspace.OpenProjectAsync(... filePath...);

                var diagnostics = workspace.Diagnostics;
           }
        }

Here is the project file for that app:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net472</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.Build" Version="16.10.0" />
    <PackageReference Include="Microsoft.Build.Framework" Version="16.10.0" />
    <PackageReference Include="Microsoft.Build.Tasks.Core" Version="16.10.0" />
    <PackageReference Include="Microsoft.CodeAnalysis" Version="4.0.0-1.final" />
    <PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.0.0-1.final" />
  </ItemGroup>
  
</Project>

And, here is the class library project file we're trying to load. It has only a single Class1.cs generated by the New Project Wizard:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
  </PropertyGroup>

</Project>

Thanks very much in advance.

CommandIconAttribute Overload with KnownMonikers

Will CommandIconAttribute eventually get an overload to include KnownMonikers or will it only be available via string? Would be a nice-to-have to do something like the following, but I guess you'd have to reference the additional Microsoft.VisualStudio.ImageCatalog package.

[CommandIcon(KnownMonikers.Extension, IconSettings.IconAndText)]

Handle unhandled exceptions in Visual Studio Extension

Hello,

Don’t sure it’s proper place for this question.

In order to be able to fix unexpected exceptions in our extension, we would like to send unhandled exception stack traces to remote logging service.

How could we configure the extension to catch all unhandled exceptions and send them to that service.

Thanks for your help!

Best regards,
Alex

LaunchDevCmd.bat lists the version as VS 2019

C:\Program Files\Microsoft Visual Studio\2022\Preview\Common7\Tools\LaunchDevCmd.bat

@TITLE Developer Command Prompt for VS 2019
@%comspec% /k " cd /d "%~dp0..\.." & "%~dp0vsdevcmd.bat" "

This might be on purpose so you don't have to rebrand everything until it is finalized, but I see other places where the version is listed as 2022.

Microsoft.VisualStudio.TextTemplating.15.dll is missing in Visual Studio 2022 preview 4

Hi team,

It seems that in the Visual Studio 2022 preview 4 Microsoft.VisualStudio.TextTemplating.15.dll is renamed to Microsoft.VisualStudio.TextTemplating.dll. However, when we use Microsoft.VisualStudio.SDK (17.0.0-previews-1-31325-273) package reference we end up with а transitive reference to Microsoft.VisualStudio.TextTemplating.15. That's why the extension fails runtime in Visual Studio 2022.

Can you confirm this? And if so, can we expect a fix in Microsoft.VisualStudio.SDK package?

Instructions for No Code Extensions doesn't build

Following the instructions at https://github.com/microsoft/VSExtensibility/wiki/No-Code-Extensions, but it seems that the <ProductArchitecture> element isn't recognized. When I add those elements, I'm getting this error:

23>VSSDK : error VSSDK1062: Schema validation error for 'D:\Source\Repos\ProjectReunion\dev\VSIX\BuildOutput\obj\AnyCPUDebug\ProjectReunion.Extension\net472\extension.vsixmanifest'. The element 'PackageManifest' in namespace 'http://schemas.microsoft.com/developer/vsx-schema/2011' has invalid child element 'InstallationTarget' in namespace 'http://schemas.microsoft.com/developer/vsx-schema/2011'. List of possible elements expected: 'Metadata, Installation, Dependencies, Assets, Prerequisites, Installer' in namespace 'http://schemas.microsoft.com/developer/vsx-schema/2011' as well as any element in namespace '##other'.
23>VSSDK : error VSSDK1062: Schema validation error for 'D:\Source\Repos\ProjectReunion\dev\VSIX\BuildOutput\obj\AnyCPUDebug\ProjectReunion.Extension\net472\extension.vsixmanifest'. The 'http://schemas.microsoft.com/developer/vsx-schema/2011:Dependencies' element is not declared.
23>VSSDK : error VSSDK1062: Schema validation error for 'D:\Source\Repos\ProjectReunion\dev\VSIX\BuildOutput\obj\AnyCPUDebug\ProjectReunion.Extension\net472\extension.vsixmanifest'. The 'http://schemas.microsoft.com/developer/vsx-schema/2011:Assets' element is not declared.

This is attempting to build in VS2019. I tried building with the Dev17 preview, and it somehow fails to resolve Microsoft.VisualStudio.CoreUtility.

VSIX Project cannot be build

In the current version (17.0.0 Preview 1.0) of Visual Studio the VSIX Project template has a package reference to Microsoft.VSSDK.BuildTools version 17.0.1597 which is not available in nuget.org.

Sample that shows how to display toolbar item by default.

Currently the samples show you how to add a combobox or other toolbar item. Right now the user has to right click the toolbar and select the appropriate menu option to then display the toolbar item.
But how can you make that item appear in the toolbar automagically, when your extension is loaded for the very 1st time, for your specific project type?
A sample showing this would be great!

Installation of 2019-version of an extension picks 2022 version from the cache?

I followed the documentation on how to create separated versions of my VSIX to target VS2019 and VS2022. It worked for me flawlessly, or at least that what I thought. Lately, when trying to install the 2019 version on another machine, I get errors when opening VS2019 when it tries to load the extension. Investigating the logs I found that it tries to load Microsoft.VisualStudio.Shell.15.0, Version=17.0.0.0. Investigating it further, it seems like the VSIX installer picked the 2022 version from somewhere, so files like catalog.json and manifest.json in the actual installation show Microsoft.VisualStudio.Component.CoreEditor dependency with version range [17.0,18.0) instead of [16.0,17.0) and extension.vsixmanifest is identical to the one in the 2022 version.
IIUC, this comes from C:\ProgramData\Microsoft\VisualStudio\Packages cache.

Does source.extension.vsixmanifest of the 2022 version must use different Identity Id than the 2019 version so the cache wouldn't be confused by it? If so, I think the documentation should mention it explicitly.

Version conflict with latest Microsoft.CodeAnalysis

Building our extension with only the following two package references leads to a version conflict warning that seems to be caused by Microsoft.VisualStudio.TextTemplating.15.0.dll having a dependency on version 4.0.0.0 of Microsoft.CodeAnalysis.dll.

    <PackageReference Include="Microsoft.CodeAnalysis" Version="3.11.0-1.final" />
    <PackageReference Include="Microsoft.VisualStudio.SDK" Version="17.0.0-previews-1-31410-273" />
References which depend on "Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" [].
    C:\Users\Kirk\.nuget\packages\microsoft.visualstudio.texttemplating.15.0\17.0.0-previews-1-31410-258\lib\net45\Microsoft.VisualStudio.TextTemplating.15.0.dll

MIssing References GetNamedCatalogsAsync() - #66 VS2022

I've upgraded my extension to 2022, and visual studio finds it and I can step into it.
However, During runtime I get this message box:
image
Is this related?

@BertanAygun

Member
BertanAygun commented 7 days ago
@ssemon, can you confirm if you also updated the ProjectSystem.Sdk package as mentioned above? This sounds like a mismatch of package versions.

Options dialog page / storing options

Hi, I'm rewriting one of my extensions (https://github.com/LaggAt/ActivityWatchVS) to get used to the new out-of-process model. I really like the simplicity of that, and I know it is a work in progress.

As I cannot find something - is there some way to persist options and/or add an page to the options dialog?
This is the missing part to re-implement all functionality.

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.