nanoframework / Home

:house: The landing page for .NET nanoFramework repositories.
https://www.nanoframework.net
MIT License
858 stars 78 forks source link

VS2022: Device Explorer tool window icons missing after VS extension update #1009

Open networkfusion opened 2 years ago

networkfusion commented 2 years ago

Tool

Visual Studio extension

Description

Currently the icons sometimes "disappear" when the VS2022 nanoFw extension is updated. This is a potential solution is outlined in "https://stackoverflow.com/questions/58311920/visual-studio-vsix-extension-not-showing-in-tools-menu" (although there are possibily other fixes). A solution like this "should" be tried before escalation to the VS team, as although there is a workaround (via: devenv /updateConfiguration) it is annoying.

How to reproduce

No response

Expected behaviour

No response

Screenshots

image

Aditional context

A test fix was applied via https://github.com/nanoframework/nf-Visual-Studio-extension/pull/710 but it was unsuccessful.

⚠️ Issue reported to VS team. Please up-vote and add your comment here.

Original issue closed prematurely was here.

WORKAROUND

After closing Visual Studio, run devenv /updateConfiguration from VS developer command prompt.

PNPTransistor commented 2 years ago

Hi,

Not that this helps - but I'm seeing the same thing. All NF buttons in solution explorer are now blank.

Ellerbach commented 2 years ago

Hi,

Not that this helps - but I'm seeing the same thing. All NF buttons in solution explorer are now blank.

This is how you can fix it, run: devenv /updateConfiguration from the developer command prompt. Close all the Visual Studio instances before.

oloendithas commented 1 year ago

Indeed, deployment feature also restored by running devenv /updateConfiguration

DaveSchmid commented 1 year ago

image

josesimoes commented 1 year ago

⚠️ Issue reported to VS team. Please up-vote here!

josesimoes commented 1 year ago

There are reports of this happening, so the fix may not be that good... cc @DaveSchmid

josesimoes commented 1 year ago

Reported back to VS Developer community: https://developercommunity.visualstudio.com/t/Extension-icons-missing-after-update/10242633#TPIN-N10245020-N10253771

josesimoes commented 1 year ago

Instructions on how to gather a log of issues loading images, taken from here

To toggle logging, follow the instructions below. That will create a log file called ImageLibrary.log in the %USERPROFILE% folder.

  1. Enable the logging with
    vsregedit set local HKLM “ImageLibrary” TraceLevel string Verbose
    vsregedit set local HKLM “ImageLibrary” TraceFilename string ImageLibrary.log
  2. With VS closed, open a VS developer prompt and run devenv /updateConfiguration to ensure any caching issues are captured
  3. Then launch VS and ensure your icons are missing to capture any runtime issues.
  4. Grab the log file ImageLibrary.log in the %USERPROFILE% folder.
  5. Turn off tracing with
    vsregedit set local HKLM “ImageLibrary” TraceLevel string Off
  6. Upload your log in this issue and/or directly at the issue in VS Dev Community here
DaveSchmid commented 1 year ago

I tried it. Now the icons are back. :- ) But no ImageLibrary.log on the whole computer.

josesimoes commented 1 year ago

@TerryFogg do not upin this issue. It's critical and it's meant to be highlighted at the top.

TerryFogg commented 1 year ago

@josesimoes Sorry, I don't remember doing this? and I wouldn't normally. I will be a bit more careful

matsujirushi commented 1 year ago

I did this steps, but VS didn't generate ImageLibrary.log file. 😢 https://github.com/nanoframework/Home/issues/1009#issuecomment-1385553170

image

image

atboxshop commented 1 year ago

So is there any update to solve this problem so far guys?

HuaFangYun commented 1 year ago

Thank you for your hard work. Please let me know when you repair it. Thank you.

josesimoes commented 1 year ago

Thank you for your hard work.

Thank you for your kind words.

Please let me know when you repair it. Thank you.

Just subscribe to the issue that's tracking this and you'll be notified.

pt2go commented 1 year ago

update to vs2022 17.5.5,the icon coming back..............

matsujirushi commented 1 year ago

@pt2go me too.

atboxshop commented 1 year ago

Still missing icons after updating to version 17.5.5, the device explorer's icons appear just 1 time :) right after the updating and its icons were disappear again after restart visual studio 2022. Pls fix it. Thanks guys.

pt2go commented 1 year ago

Still missing icons after updating to version 17.5.5, the device explorer's icons appear just 1 time :) right after the updating and its icons were disappear again after restart visual studio 2022. Pls fix it. Thanks guys.

.......right,icon miss

renerlemes commented 1 year ago

I updated VS to 17.6.2 version and now is working

fhtino commented 1 year ago

Updated to VS 17.6.2 and is not working :(

image

pt2go commented 1 year ago

I updated VS to 17.6.2 version and now is working

my vs with 17.6.2 working perfect!

atboxshop commented 1 year ago

After updated my nanoframework extension for visual studio to the latest version and updated my visual studio to version 17.6.2, the icon re-appear again and it works perfectly. Thanks guys. 👍

fhtino commented 1 year ago

I confirm now it's working. VS 17.6.2 and nanoFramework extension 2022.3.0.60 solved the issue.

jouda13 commented 1 year ago

Hi, I’ve had a bad luck with mine. VS 17.6.5 and nanoFramework extension 2022.3.0.60 . The icons are still missing. Anybody else is having the same issue?

Ellerbach commented 1 year ago

Hi, I’ve had a bad luck with mine. VS 17.6.5 and nanoFramework extension 2022.3.0.60 . The icons are still missing. Anybody else is having the same issue?

Yes, I did. Closing all Visual Studio, then openeing the VS Dev command prompt and then running: devenv /updateConfiguration did fix the issue.

atboxshop commented 1 year ago

Confirm that after update vs studio 2022 to version 17.6.5, the icon was disappeared again. I also tried to run the devenv cmd for updating the configuration but could not fix the problem. Pls fix it guys. Thanks

atboxshop commented 1 year ago

To fix the missing icon after updating vs studio 2022 to 17.6.5, I close all visual studio 2022 app and go to start -> all apps -> Visual Studio 2022 -> x64 native tool command prompt or x86 native tools command prompt . Dont use the developer command prompt, it wont work. And run this command: devenv /updateConfiguration to fix the problem like Ellerbach mention in the previous posting. :D

manuel76413 commented 1 year ago

devenv /updateConfiguration

doesn't take effect, still blank toolbar, empty icon

atboxshop commented 1 year ago

Run x64 native tool command prompt as administrator

josesimoes commented 1 year ago

After updating to v17.7.3 a few days ago, I still have the extension with icons. Hopefully this has been fixed upstream...

torbacz commented 1 year ago

image Haven't seen them for a while.. Looks much better now 😀

torbacz commented 1 year ago

One week later, icons have disappeared :(

atboxshop commented 10 months ago

Any updates to fix this issue guys 👍 . My suggestion is that this device explorer window must remove and replace that window by a sub-menu somehow. 👍

TerryFogg commented 10 months ago

It quite frustrating as it "comes and goes". About a month ago I lost my icons. The command "devenv /updateconfiguration" run at the developer prompt can fix this sometimes. I don't have icons at the moment, and this did not fix my problem. I have been waiting for Microsoft to finish off their new Visual Studio Extension development system which is easier to debug and develop ( I hope). Still waiting and when it comes we could use this

TerryFogg commented 10 months ago

I did wonder if the fact that our icons are .png and not the older .ico has anything to do with the mishandling by Microsoft code.

CoryCharlton commented 10 months ago

Not sure if it helps at all but it looks like the issue also impacts the project icons (library and application projects but not unit tests):

image

josesimoes commented 10 months ago

Any updates to fix this issue guys 👍 . My suggestion is that this device explorer window must remove and replace that window by a sub-menu somehow. 👍

How's that? There is already an entry under View menu to show/hide Device Explorer.

josesimoes commented 10 months ago

If you guys go through the related issue in VS Developer Community you'll see that this has to do with the naming of the resources, and the strong naming and other stuff that VS resource manager is doing trying to find the image resources. Unrelated with image the format. And yes, it affect anything image resource related... 😞

atboxshop commented 10 months ago

Any updates to fix this issue guys 👍 . My suggestion is that this device explorer window must remove and replace that window by a sub-menu somehow. 👍

How's that? There is already an entry under View menu to show/hide Device Explorer.

Yes, we can hide or show the device explorer. I means if you guys can create an sub menu (without icon or using default icon) for example it will be like this in Visual Studio : View-->Other Windows-->Device Explorer--> Ping Device or Show Setting. And problem will be solved. 👍

softworkz commented 9 months ago

FYI: https://developercommunity.visualstudio.com/t/VSSDKCPSExtensibility:-Image-Loading-i/10525678?

It's MS fault.

softworkz commented 9 months ago

To fix it:

image

Include this targets file in your project

PrepareImageManifest.zip

And add this to the end of your .csproj:

<Import Project="PrepareImageManifest.targets" />

Build and run.

josesimoes commented 9 months ago

Hey @softworkz! Just read your detailed analysis at developer community issue. Nice. Thanks for taking the time to investigate this and provide a fix. We'll be on this ASAP! 👍🏻 🥇

Ellerbach commented 9 months ago

With 2023.3.0.67 all works fine again! Thanks a lot @softworkz for the deep investigation!

torbacz commented 9 months ago

With VS 17.8.1 and NF 2023.3.0.67 extensions icons are back. Thanks @softworkz!

softworkz commented 9 months ago

The favor is mutual since I learn a lot from existing VS project system extensions.

Let's help other extension developers not needing to go through all the trouble by upvoting here: https://developercommunity.visualstudio.com/t/VSSDKCPSExtensibility:-Image-Loading-i/10525678

and here: https://github.com/microsoft/VSProjectSystem/issues/373

networkfusion commented 8 months ago

Re-opening as unfortunately it is still occuring.

atboxshop commented 8 months ago

To fix it temporary, go to extension, disable nanoframework and re-enable it. After that restart your visual studio, all icons will appear.

networkfusion commented 8 months ago

To fix it temporary, go to extension, disable nanoframework and re-enable it. After that restart your visual studio, all icons will appear.

Nice workaround!

kondr1 commented 6 months ago

Both workaround doesn't work for me.