ObjectExporter icon indicating copy to clipboard operation
ObjectExporter copied to clipboard

Visual Studio 2019 Install Failing

Open ToddTaylor opened this issue 6 years ago • 40 comments

When attempting to install the Object Exporter in Visual Studio 2019 (16.0.0 Preview 1.1), an error occurs with the following message:

12/27/2018 2:32:30 PM - Extension cannot be installed to the following products due to missing prerequisites: 12/27/2018 2:32:30 PM - Microsoft Visual Studio Enterprise 2019 12/27/2018 2:32:30 PM - ------------------------------------------------------- 12/27/2018 2:32:30 PM - Identifier : Microsoft.VisualStudio.Component.CoreEditor 12/27/2018 2:32:30 PM - Name : Visual Studio core editor 12/27/2018 2:32:30 PM - Version : [11.0,16.0) 12/27/2018 2:32:30 PM - Error : The prerequisite version specified does not match the version installed 12/27/2018 2:32:30 PM - 12/27/2018 2:32:30 PM - System.InvalidOperationException: No modifications could be applied.

ToddTaylor avatar Dec 27 '18 20:12 ToddTaylor

The fix is very simple... just some minor tweaks to the .vsixmanifest:

https://blogs.msdn.microsoft.com/visualstudio/2018/09/26/how-to-upgrade-extensions-to-support-visual-studio-2019/

ToddTaylor avatar Feb 07 '19 19:02 ToddTaylor

Hi - can you please provide an updated build for 2019 as I tried the fixes suggested but couldn't get it to compile.

robalexclark avatar Mar 25 '19 12:03 robalexclark

I will try and provide a 2019 build in the next couple of weeks.

OmarElabd avatar Mar 25 '19 17:03 OmarElabd

Dunno if this is in bad taste, but in the meantime I've been using this, which works at runtime instead of being a plugin.

https://www.nuget.org/packages/ObjectDumper.NET/

dharmaturtle avatar Apr 30 '19 00:04 dharmaturtle

It is not enough to change .vsixmanifest only. You should do same things for catalog.json as well.

ibyet05 avatar May 01 '19 13:05 ibyet05

I can't install for VS2019 either: image

mzhukovs avatar May 15 '19 03:05 mzhukovs

Hi! Is there any update on when the extension will work "out of the box"?

keyle56 avatar Jun 25 '19 16:06 keyle56

The fix is very simple... just some minor tweaks to the .vsixmanifest:

https://blogs.msdn.microsoft.com/visualstudio/2018/09/26/how-to-upgrade-extensions-to-support-visual-studio-2019/

I updated the file - but it appears I need a license to Telerik.WinControls.dll in order to do the build?

sehuff avatar Jul 04 '19 03:07 sehuff

Nevermind my last comment I just had to unblock the downloaded files before the build. However, I know have the same issue as mzhukovs - prerequisites that cannot be resolved.

sehuff avatar Jul 04 '19 03:07 sehuff

Looks like a pull request has been pending for a little over a week that might fix this issue. Hopefully gets merged soon. Looks like a great product.

domusvita-zz avatar Aug 15 '19 17:08 domusvita-zz

Is there any news on this topic. When installing the extension only vs2017 is proposed.

maxcl10 avatar Oct 01 '19 09:10 maxcl10

Is this fixed? I tried the latest version and sadly it doesn't work in VS2019 such a shame

vurso avatar Oct 09 '19 14:10 vurso

I compiled a version using one of the pull requests: ObjectExporter.zip it should work fine with VS2019.

ldy985 avatar Oct 09 '19 18:10 ldy985

I compiled a version using one of the pull requests: ObjectExporter.zip it should work fine with VS2019.

Thank you, this one works on VS2019 Community Edition too!

krs4444 avatar Oct 31 '19 08:10 krs4444

I compiled a version using one of the pull requests: ObjectExporter.zip it should work fine with VS2019.

Thank you, this one works on VS2019 Community Edition too!

Someone should fork this project (with the fixed version).

vurso avatar Feb 16 '20 22:02 vurso

Instead of rebuilding, you can also hack the vsix:

  • Change the extension from vsix to zip, and unzip it
  • In both manifest.json and catalog.json find CoreEditor and replace that key-value pair with "Microsoft.VisualStudio.Component.CoreEditor":"[15.0,17.0)"
  • In extension.vsixmanifest replace the content of the Installation XML node with:
    <InstallationTarget Version="[14.0,17.0)" Id="Microsoft.VisualStudio.Community" />
    <InstallationTarget Version="[14.0,17.0)" Id="Microsoft.VisualStudio.Pro" />
    <InstallationTarget Version="[14.0,17.0)" Id="Microsoft.VisualStudio.Enterprise" />

Hope it helps someone :)

SteGriff avatar Mar 05 '20 15:03 SteGriff

Still can't install the extension: error "This extension is not installable on any currently installed products." Installation log:

09.03.2020 22:45:04 - Microsoft VSIX Installer
09.03.2020 22:45:04 - -------------------------------------------
09.03.2020 22:45:04 - Initializing Install...
09.03.2020 22:45:04 - Extension Details...
09.03.2020 22:45:04 - 	Identifier      : 07fb5b16-f4be-4488-9a19-b4f36d2c05a6
09.03.2020 22:45:04 - 	Name            : Object Exporter
09.03.2020 22:45:04 - 	Author          : Omar Elabd
09.03.2020 22:45:04 - 	Version         : 1.8.0
09.03.2020 22:45:04 - 	Description     : Object Exporter creates serializations of in memory objects from your various debugging windows. Currently supported output formats are: CSharp Object Initialization Code, JSON and XML.
09.03.2020 22:45:04 - 	Locale          : en-US
09.03.2020 22:45:04 - 	MoreInfoURL     : http://www.omarelabd.net/exporting-objects-from-the-visual-studio-debugger/
09.03.2020 22:45:04 - 	InstalledByMSI  : False
09.03.2020 22:45:04 - 	SupportedFrameworkVersionRange : [4.5,)
09.03.2020 22:45:04 - 
09.03.2020 22:45:04 - 	Supported Products : 
09.03.2020 22:45:04 - 		Microsoft.VisualStudio.Community
09.03.2020 22:45:04 - 			Version : [14.0,17.0)
09.03.2020 22:45:04 - 		Microsoft.VisualStudio.Pro
09.03.2020 22:45:04 - 			Version : [14.0,17.0)
09.03.2020 22:45:04 - 		Microsoft.VisualStudio.Enterprise
09.03.2020 22:45:04 - 			Version : [14.0,17.0)
09.03.2020 22:45:04 - 
09.03.2020 22:45:04 - 	References      : 
09.03.2020 22:45:04 - 
09.03.2020 22:45:04 - Searching for applicable products...
09.03.2020 22:45:04 - Found installed product - Global Location
09.03.2020 22:45:04 - Found installed product - AtmelStudio
09.03.2020 22:45:04 - VSIXInstaller.NoApplicableSKUsException: This extension is not installable on any currently installed products.
   at VSIXInstaller.App.InitializeInstall(Boolean isRepairSupported)
   at VSIXInstaller.App.InitializeInstall()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

breadshort avatar Mar 09 '20 19:03 breadshort

Still can't install the extension: error "This extension is not installable on any currently installed products." Installation log: snip

@breadshort, what version and edition of VS are you installing it into? Add the version numbers and editions to manifest.json, catalog.json, and extension.vsixmanifest, as described above.

SteGriff avatar Mar 10 '20 15:03 SteGriff

@breadshort, what version and edition of VS are you installing it into? Add the version numbers and editions to manifest.json, catalog.json, and extension.vsixmanifest, as described above.

2017 Enterprise 15.9.20 (trial) 2019 Community 16.4.5 2019 Pro 16.4.5 (trial) 2019 Enterprise 16.4.5 (trial)

I did everything that @SteGriff described (see attached file ObjectExporter.zip ) still can't install the extension (same error)

UPD: I think that some people don't work on my VS - I can't install the Microsoft Code Analysis extension either. I'll find out why.

UPD2: Solved. The problem was because of the wrong version of vsixinstaller.exe.

breadshort avatar Mar 10 '20 16:03 breadshort

@SteGriff thanks for the tips but I double click the ObjectExplorer.vsix file I get:

Microsoft.VisualStudio.ExtensionManager.MissingPackagePartException: This VSIX package is invalid because it does not contain the file extension.vsixmanifest at the root. The VSIX file may be corrupted.

The extension.vsixmanifest file is there though.

After doing the edits you suggest, I zip the folder, I rename to ObjectExplorer.vsix

Thanks

x123-design avatar Mar 13 '20 12:03 x123-design

@gustier

After doing the edits you suggest, I zip the folder, I rename to ObjectExplorer.vsix

You should not archive a folder, but the contents of a folder.

breadshort avatar Mar 13 '20 12:03 breadshort

@breadshort Ah, right, makes sense. I dragged them out of the zip and edited and dragged back - seemed to install ok Thanks

x123-design avatar Mar 13 '20 12:03 x123-design

@breadshort Ok, I have checked the extension is enabled which it is. However, when I hit a breakpoint I expect to see the 'Export Objects' in the menu. Any ideas how to get the exporter window?

x123-design avatar Mar 13 '20 12:03 x123-design

@breadshort - in VS 2019

x123-design avatar Mar 13 '20 12:03 x123-design

@gustier

Any ideas how to get the exporter window?

Main menu -> Tools -> Export Objects

look

breadshort avatar Mar 13 '20 13:03 breadshort

@breadshort Yes, been using ctrl+E, ctrl+O, as no menu in VS 2019.

The Object Exporter is proving very buggy.

@anyone, Is there a commercial product that does this which supports newer versions of .net?

x123-design avatar Mar 13 '20 14:03 x123-design

As mentioned earlier in the thread, it's worth looking at ObjectDumper.NET, I found its output to be better, but you do need to write some code (not very difficult): https://www.nuget.org/packages/ObjectDumper.NET/

SteGriff avatar Mar 13 '20 14:03 SteGriff

Nice, Thanks

x123-design avatar Mar 13 '20 14:03 x123-design

I am not affiliated with this product in any way other than being a customer. But I find OzCode to be useful and it has an almost identical object exporting feature. https://oz-code.com/debugging-redefined/

bigloudjeff avatar Mar 13 '20 14:03 bigloudjeff

I actually prefer ObjectDumper.net these days because I use a program called NCrunch that makes it simple to see the console output of tests. I have an extension method .D() that takes the object it's attached to and feeds it to ObjectDumper.net, which then prints it to the console. Makes me want to write tests now, as compared to being forced to do it. Unfortunately, NCrunch is not free, nor am I aware of another program/plugin that makes it simple to see a test's console output.

image

I made a small repo here that demonstrates how you can "dump" the console to a file. When combined with an autoupdating text editor like VS Code, the experience is somewhat better. Somewhat =\ If someone could figure out how to execute the "Repeat last run" command twice in a row, that would be great.

Edit: Aaaand I figured it out. To execute "Repeat last run" repeatedly, make a change in your code, save, and then try to run it again. I guess VS is trying to save you from running the same test over and over.

dharmaturtle avatar Mar 13 '20 16:03 dharmaturtle