FineCodeCoverage icon indicating copy to clipboard operation
FineCodeCoverage copied to clipboard

Prevents NuGet Package Manager from opening

Open bhaeussermann opened this issue 2 years ago • 43 comments

Installed product versions

  • Visual Studio: 2022 Enterprise 17.0.0
  • This extension: 1.1.154

Description

When there is a problem with the configuration of a test project and the extension is enabled I cannot open the NuGet Package Manager on the project or solution.

Steps to recreate

  1. In Visual Studio, create a new solution with a .NET 6 NUnit test project (select the "NUnit Test Project" template).
  2. Make the test project "broken" by removing the Microsoft.NET.Test.Sdk NuGet package.
  3. Install / enable the "Fine Code Coverage" extension.
  4. Restart Visual Studio.
  5. Re-open the solution.
  6. Right-click the solution in the Solution Explorer and select "Manage NuGet Packages for Solution..."

Current behavior

The NuGet Package Manager doesn't open.

Expected behavior

The fact that the test project is not properly configured should not prevent the NuGet Package Manager from opening.

bhaeussermann avatar Nov 22 '21 05:11 bhaeussermann

Please check you activity logs. See https://github.com/FortuneN/FineCodeCoverage/issues/108

tonyhallett avatar Nov 22 '21 08:11 tonyhallett

@tonyhallett deleting the .vs folder did not resolve the problem.

Here are the log entries from ActivityLog that are written when I try to open the NuGet Package Manager:

  <entry>
    <record>790</record>
    <time>2021/11/22 08:40:51.160</time>
    <type>Error</type>
    <source>NuGetPackage.ShowManageLibraryPackageForSolutionDialog</source>
    <description>XamlParseException - Provide value on &apos;System.Windows.Markup.StaticExtension&apos; threw an exception.</description>
  </entry>
  <entry>
    <record>791</record>
    <time>2021/11/22 08:41:20.206</time>
    <type>Error</type>
    <source>NuGetPackage.ShowManageLibraryPackageForSolutionDialog</source>
    <description>Exception - The component &apos;NuGet.PackageManagement.UI.PackageManagerControl&apos; does not have a resource identified by the URI &apos;/NuGet.PackageManagement.UI;component/xamls/packagemanagercontrol.xaml&apos;.</description>
  </entry>

bhaeussermann avatar Nov 22 '21 08:11 bhaeussermann

Have you tried the Steps To Create with another extension instead ?

tonyhallett avatar Nov 22 '21 08:11 tonyhallett

I disabled "Fine Code Coverage" and performed the "Steps to Create" installing the "Smooth Caret" extension instead at step 3. At step 6 NuGet Package Manager opened without issues.

bhaeussermann avatar Nov 22 '21 10:11 bhaeussermann

I followed your steps and do not have any issue. I am using the community edition though.

Microsoft Visual Studio Community 2022 (64-bit) Version 17.0.1

Can you update your version ?

I cannot see any reason why fine code coverage should impact nuget.

tonyhallett avatar Nov 22 '21 10:11 tonyhallett

I updated Visual Studio to 17.0.1. The behavior is the same.

If the issue can't be reproduced, I'm happy to have it closed since it happens only when that particular package is not included in the project (which generally shouldn't happen).

bhaeussermann avatar Nov 23 '21 03:11 bhaeussermann

Now all of a sudden it seems to be happening in my other solution, regardless of whether the necessary packages are included 🤔.

bhaeussermann avatar Nov 23 '21 06:11 bhaeussermann

Have you tried deleting your nuget cache ? image

tonyhallett avatar Nov 23 '21 09:11 tonyhallett

I tried that. Still no luck 😕

bhaeussermann avatar Nov 23 '21 12:11 bhaeussermann

@bhaeussermann did you successfully install ?

tonyhallett avatar Dec 17 '21 21:12 tonyhallett

@tonyhallett It's still an issue. If the extension is enabled, NuGet Package Manager won't open. I have to disable the extension and restart VS in order to open NuGet Package Manager. It happens in all of my VS solutions as far as I can tell.

I do acknowledge that the issue is non-reproducible. Perhaps I should try reinstalling Visual Studio.

bhaeussermann avatar Dec 18 '21 16:12 bhaeussermann

I just updated Visual Studio to 17.0.4 and it seems the issue is fixed now 🙂

bhaeussermann avatar Dec 27 '21 06:12 bhaeussermann

Good news !

tonyhallett avatar Dec 27 '21 09:12 tonyhallett

I updated Visual Studio to 17.0.5 and now the issue has reappeared 😕

bhaeussermann avatar Jan 21 '22 06:01 bhaeussermann

Can you show me the options you have set

image

tonyhallett avatar Jan 21 '22 12:01 tonyhallett

It's exactly the same as yours 🤔

2022-01-24_06h46_07

bhaeussermann avatar Jan 24 '22 04:01 bhaeussermann

I had to reinstall Visual Studio because of other issues (still 17.0.5). Now it seems the issue is gone 🙂.

bhaeussermann avatar Feb 10 '22 09:02 bhaeussermann

I do hope you do not encounter it again. If you do can you check in regedit to see if visual studio has blocked the extension.

tonyhallett avatar Feb 10 '22 09:02 tonyhallett

I encounter the same issue all the time. Having the same option settings, and on visual studio 17.0.6. Fine Code Coverage v.1.1.161. I have to disable Fine Code Coverage extension to get the Nuget Package Manager showing. I have the same set of options as shown above. Is there any other part we can check for this issue?

jason-lee-rav avatar Feb 21 '22 18:02 jason-lee-rav

@jason-lee-rav Have you tried reinstalling Visual Studio? That's the thing that worked for me.

bhaeussermann avatar Feb 21 '22 18:02 bhaeussermann

Didn't try re-install really. Need to try it after hours.

jason-lee-rav avatar Feb 21 '22 18:02 jason-lee-rav

Happen to have change to VS studio upgrade to 17.1.0, and still having the same issue. I think my last bet would be re-install. I have try it tonight later, and will report back here.

jason-lee-rav avatar Feb 21 '22 23:02 jason-lee-rav

Took some time and reinstall VS2022, and it worked. Thanks for your suggestion @bhaeussermann.

jason-lee-rav avatar Feb 22 '22 07:02 jason-lee-rav

Also having the same problem here with VS 17.1.0. Disable FineCodeCoverage extension, restart VS and Manage NuGet packages works. Re-enable FCC and NuGet manager breaks. I am not a believer in reinstalling an entire software package (e.g. Visual Studio) in order to fix an issue created by an extension. Suggest you look further into why the extension causes this issue.

cutty225 avatar Mar 01 '22 06:03 cutty225

@cutty225

I am not a believer in reinstalling an entire software package (e.g. Visual Studio) in order to fix an issue created by an extension

Agreed not good.

Suggest you look further into why the extension causes this issue.

Doing so. Although this is not the easiest one to track down. Ideally someone will be able to provide a repo where this is occurring / began.

Perhaps you can try https://docs.microsoft.com/en-us/visualstudio/extensibility/how-to-diagnose-ui-delays-caused-by-extensions?view=vs-2022.

tonyhallett avatar Mar 01 '22 15:03 tonyhallett

Finally managed to track down why NuGet package manager not showing, which led me here.

I had done a repair of VS2022 (17.1.0) which fixed the issue . and package manager showed. But a couple of hours later it stopped working again. uninstalling Fine code coverage fixed the issue and it shows again.

Is there any extra info I can provide? I couldn't find any logs, errors or anything

Clive321A avatar Mar 01 '22 17:03 Clive321A

@CliveBennett

Is there any extra info I can provide?

If there is a particular solution that appeared to introduce the issue that you can provide then great. If you could try https://docs.microsoft.com/en-us/visualstudio/extensibility/how-to-diagnose-ui-delays-caused-by-extensions?view=vs-2022 then that might point to why there is an issue.

Although you cannot open the Nuget package manager window can you open the Package Manager Console ? Is the Package Manager Output Window Pane available ?

tonyhallett avatar Mar 01 '22 18:03 tonyhallett

@CliveBennett

I assume that this is not an experimental instance of VS ?

tonyhallett avatar Mar 01 '22 18:03 tonyhallett

Yes its a release version of VS2022. It was happening on the prior version, I tried upgrading to see it it resolved it as I thought was a VS issue, when it didn't I also tried a Repair, which did initially resolve, but issue then reappeared, probably after I ran Unit Tests or something.

I can still use Nuget from the Package Manager window which is still available, so can add-package manually. (No errors get reported in their though when trying to open via the Solution Explorer)

Ill have a go at the MS Docs to debug.

Clive321A avatar Mar 01 '22 19:03 Clive321A

Ill have a go at the MS Docs to debug Appreciated.

Given that this has only been reported for vs2022 it may not be a problem in 2019.

If I could get it to occur on my machine I would have a go at building the nuget vsix.

tonyhallett avatar Mar 01 '22 20:03 tonyhallett