-
Notifications
You must be signed in to change notification settings - Fork 49
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
CppCustomVisualizer doesn't install in VS2019 #52
Comments
Change the source.extension.vsixmanifest file to this and it will install in visual studio professional 2019: <?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata>
<Identity Id="8F12C6F5-BE35-4DDD-B452-44811F0A3A4D" Version="1.0" Language="en-US" Publisher="Sample" />
<DisplayName>CppCustomVisualizer Debugger Sample</DisplayName>
<Description xml:space="preserve">CppCustomVisualizer Debugger Sample</Description>
</Metadata>
<Installation InstalledByMsi="false">
<InstallationTarget Id="Microsoft.VisualStudio.Pro" Version="[14.0, 17.0)" />
</Installation>
<Prerequisites>
<Prerequisite Id="Microsoft.VisualStudio.Component.CoreEditor" Version="[15.0,)" DisplayName="Visual Studio core editor" />
</Prerequisites>
<Assets>
<Asset Type="DebuggerEngineExtension" Path="CppCustomVisualizer.vsdconfig" d:Source="File" />
<Asset Type="NativeVisualizer" Path="CppCustomVisualizer.natvis" />
</Assets>
</PackageManifest> /Ruben Edit; It seems like formatting of the xml code isn't preserved properly in the editor. |
The x86 solution configuration will build the custom visualizer project for both x86 and x64 and include both in the VSIX. See step 2 from here. |
Thanks, I've figured it out after I posted it here (and how to make it run on vs2019) |
I wanted to write my own visualizer and the only place to start is
|
The good thing about the CppCustomVisualizer sample is that it actually starts a new Visual Studio instance with the TargetApp and the visualizer dll installed via the .vsix (startup) project when running a debug session on the CppCustomVisualizer project. When starting the debugger for the TargetApp, you can set breakpoints in the dll code in the other Visual Studio instance to see whats happening. No need to keep installing and uninstalling the .vsix file. Just close down the debugging for the TargetApp and the Visualizer dll will be installed from fresh in the next debugging session. Very nice. I would like to have some more insight in how you would go about to do custom visualizers for more than one type/class in the same dll. /Ruben |
@gregg-miskelly I tried to follow Running the Sample in Visual Studio but it doesn't work. When I hit F5, I get a new vs2019 started but it doesn't load TargetApp.sln and offers me to open a project. If I open TargetApp.sln manually and try to debug, I don't get visualizers working for FILETIME. Also, as @maxruben mentioned, it's not clear how to make visualizers that work for multiple types. That should be explained/shown in the example. |
@pps83 For the issue of F5'ing not working, can you open a new issue? Please include:
For the second question (multiple types): There are probably many different answers depending on how separate you want your implementations to be, but in the most simple case, just add the additional type to your natvis. You should be able to either reuse the same VisualizerId, or declare a new one. If you decide to declare a new one, you could either declare multiple classes (one for each VisualizerId) or you could have one class that handles them all. In the later case, your .vsdconfigxml would look like this: <Implements>
<InterfaceGroup>
<Filter>
<!-- Example of supporting three different visualizers. -->
<VisualizerId RequiredValue="D3C901B3-8005-435E-803D-DF43E6C3ED29"/>
<VisualizerId RequiredValue="748F6A19-A624-4026-A39C-8019532B586E"/>
<VisualizerId RequiredValue="D6DFE1A0-4A83-4BAC-B3BB-0FB8BF9149DA"/>
</Filter>
<Interface Name="IDkmCustomVisualizer"/>
</InterfaceGroup>
</Implements> |
If you build it, resulting CppCustomVisualizer.vsix doesn't install in vs2019.
Also, there seem to be x64 versions, but .vsix doesn't build with x64 version.
The text was updated successfully, but these errors were encountered: