DotVVM extension install errors on Visual Studio 2019 - visual-studio-2019

I'm attempting to install DotVVM in Visual Studio 2019. Right now I can find it when I 'manage extensions' and it downloads and installs without error. However when I restart Visual Studio post installation I get an error stating 'The DotVVM package did not load correctly' and points me to an xml output file. The contents of said file shows:
SetSite failed for package [DotvvmPackage]
Source: System.ComponentModel.Composition
Description: The composition produced multiple composition errors, with 3 root causes. The root causes are provided below. Review the CompositionException.Errors property for more detailed information
No exports were found that match the constraint: ContractName DotVVM.Integration.VisualStudio.Dialogs.DialogFactory RequiredTypeIdentity DotVVM.Integration.VisualStudio.Dialogs.DialogFactory Resulting in: Cannot set import DotVVM.Integration.VisualStudio.VsPackages.DotvvmPackageDependencies.DialogFactory (ContractName='DotVVM.Integration.VisualStudio.DialogFactory') on part DotVVM.Integration.VisualStudio.VsPackages.DotvvmPackageDependencies.Element: DotVVM.Integration.VisualStudio.VsPackages.DotvvmDependencies.DialogFactory (ContractName='DotVVM.Integration.VisualStudio.Dialogs.DialogFactory') DotVVM.Integration.VisualStudio.VsPackages.DotvvmPackageDependencies
No exports were found that match the constraint:
Pretty much the same error except it's talking about 'DotVVM.Integration.VisualStudio.Common.Licensing.ILoginProvider'
No exports were found that match the constraint:*
Same error except it's talking about 'DotVVM.Integration.VisualStudio.Services.CommandService'
Now I have been trying to find other topics and came across many that said to delete (or rename) the '%appData%'/Local/Microsoft/VisualStudio/16.0/ComponentModelCache' folder which I've tried with no luck. Removed it out of every VisualStudio version folders as well. Restarted Visual Studio of course after. That folder did rebuild itself but I got the same error again.
I've also tried uninstalling and reinstalling it as well. Tired with running Visual Studio as an admin for kicks. Even downloaded the DotVVM.Integration.VisualStudio.2019.RTM.vsix file directly (both 4.0.534 and 4.0.539) and installing it that way with no luck.
I also tried fully uninstalling and reinstalling Visual Studio 2019 all together with no luck. I made sure the entire VisualStudio/16.0 folder was also gone between installs.
I have been able to install other extensions alright just to see.
It seems like I'm missing something or some files when it's trying to install, but I can't figure out what. Any ideas?

Turns out my version of Visual Studio was the issue. My cooperate environment locks me to 16.10.2 which is not the latest version. Visual Studio updates claims I'm up to date but I am not.
The version of DotVVM (4.0.539) doesn't support version 16.10.2 of visual studio, hence the error. I did find an older version of DotVVM (2.5.254) that does support that version of visual studio and that worked fine.

Related

Package installation error when new blank application in nanoframework is created

When i try create new blank application in nanoframework, i get package installation error.
error message
It seems some problem in nanoframework visual studio extension, my version is NET nanoFramework VS2019 Extension v2019.5.0.8.vsix, but i also tried another versions with same problem.
I have visual studio 2019 community edition and i have installed almost all components.
When i press ok, project is loaded, but is not possible compile it, because there are missing all assemblies. When i try add assembly, theres nothing to add and add nuget packages from nanoframework store leads to error.
when i try this:
pm> Install-Package nanoFramework.CoreLibrary.NoReflection -Version
1.10.1-preview.9
I get this error:
NU1202: Package nanoFramework.CoreLibrary.NoReflection
1.10.1-preview.9 is not compatible with netnanoframework10 (.NETna noFramework,Version=v1.0). Package
nanoFramework.CoreLibrary.NoReflection 1.10.1-preview.9 supports: net
(.NETFramework,Version=v0.0)
similiar when i try another package versions.
So the extensions is installed incorectly, but i cant find why. i tried it more times. uninstall and install again. from extenstion store, and from disc. nothing successfull.
The webserver NuGet released today fixes the issues with the version mismatches.
The issue with VS2019 16.9 remains. Reported to VS Developer Community here. Please up vote to help increase priority.
What is the Community version you're using?
After a little test, there seems to be an issue with the latest release of VS2019. A work around would be to:
Use V16.8.X
or
use an already created solution that you can edit.
or
add the required nuget to the project once it has been loaded (after the error):
Update: now fixed! it was due to a change to fix nuget, but caused an unintended consequence with nanoFramework.

NullReferenceException when installing any Extension in VS2019

I got the exact same problem posted here:
Attempting to Install an extension to VS2019 results in a NullReferenceException
Same error, same log.
But since I cannot comment nor answer and the question has not been answered as of yet, I'm asking again.
I am using VS2019 Community, but I had VS2017 Enterprise at one point. (student license)
Every single extension I tried to install so far has led to this error. For example "Live Share", "Open Command Line", "Github Extension for Visual Studio", "Markdown Editor".
I believe it started with Live Share when suddenly an update wouldn't install for no reason. I guess that was back with VS2017 even. But I cannot recall, I just assume. With the newly installed VS2019 I was never able to install any extension via the in-app Extension feature, nor by downloading with browser and then trying to open it.
What I've tried:
0) Every suggestion by Perry Qian-MSFT
1) Repairing Visual Studio 2019
2) Reinstalling Visual Studio 2019
3) Uninstalling "Live Share"
4) Deleting various Folders or contents thereof:
C:\Users\Admin\AppData\Local\Microsoft\VisualStudio
C:\Program Files (x86)\Microsoft Visual Studio\2017 (trying to get rid of any remnants)
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions
Next I'll deinstall as much as possible: VS2019 and Installer and try to see what's left, what could have remained that causes such pain in the a***.
But since my internet will be busy with reinstalling afterwards for a while this question goes up now.
Update1: The installer made some problems getting uninstalled. Deinstallation via Windows Software Management failed with an error but it was still removed from the list. Now I've deleted the folder and will try and reinstall the installer. I don't know why I didn't try that before throwing it all over board.
Update2: I decided to start with a simple barebones VS2019 version without any workloads. But it still doesn't work. So back to throwing everything out and looking for the remainder.
Update3: I now tried to delete various folders then reboot and tried to reinstall a barebone VS 2019 Community again. Still same error.
Here's a list:
C:\Program Files (x86)\Microsoft Visual Studio Tools for Unity
C:\Program Files (x86)\NuGet
C:\Program Files (x86)\MSBuild (except for .\Microsoft\Windows Workflow Foundation)
C:\Users\Admin\AppData\Local\Microsoft\VisualStudio Services
C:\Users\Admin\AppData\Local\Microsoft\VisualStudio\Packages
C:\Users\Admin\AppData\Roaming\Microsoft\Microsoft Visual Studio
C:\Users\Admin\AppData\Roaming\Microsoft\VisualStudio
C:\Users\Admin\AppData\Roaming\Visual Studio Setup
C:\Users\Admin\AppData\Roaming\vs_installershell
C:\Users\Admin\AppData\Roaming\vs-report-problem
C:\Users\Admin\Documents\Visual Studio 2013
C:\Users\Admin\Documents\Visual Studio 2017
C:\Users\Admin\Documents\Visual Studio 2019
Oddly enough my personal settings are still persistent. So these will be my next target. But where are they stored? Any pointers?
Update4: Seems like settings are stored in a cloud, hm. I made a local backup and tried to reset them resulting in yet another error.
Your settings were reset, but there were some errors.
Error 1: An error occurred while importing settings for 'Product Updates' [code 5396].
Was this 'Product Updates' Setting the culprit?
Update5: The settings reset didn't seem to accomplish anything at all.
Update6: So, I've signed out of VS, reinstalled VS2019 again and this time it seems like settings were actually reset. Still no luck. This is getting really frustrating.
That's it. I'm done. Apart from reinstalling Windows 10 I have no clue what could help now. Maybe there was some registry error? I am lost here.
Thanks to #dxiv who made me aware of the InstallCleanup.exe.
I don't know what that tool does additionally to what I did and I cannot tell what was wrong in the first place. But that thing actually helped!
Thanks again!

Can't open or create projects: The type initializer for 'MonoDevelop.Projects.MSBuild.MSBuildEvaluationContext' threw an exception

This morning, I found I was unable to create or open any projects on Visual Studio Community for macOS v8.1.1 (build 27) without getting the error...
The project could not be created
The type initializer for 'MonoDevelop.Projects.MSBuild.MSBuildEvaluationContext' threw an exception.
This install of VS has been working for quite some time on this Mac. VS had found and installed some updates recently. This is not a box where I work routinely; it may have last worked successfully a week or so ago.
Here is a screencapture when trying to create a Console app project, for instance. The error occurs when I hit the "Create" button.
I've found a very similar error on a now defunct Bugzilla for the old Xamarin Studio here, which links me to this resolved GitHub issue on MonoDevelop, which is now Visual Studio, from 2017, which is marked Closed and Merged.
I've also found a very similar error report raised as another GitHub issue for MonoDevelop here. No clear resolution there; just a reply that, "Seems like MSBuild is not installed?"
They both suggest MSBuild isn't in the right place, but I'm not sure how I'd fix that.
I have tried uninstalling Visual Studio (by trashing) and removing .NET using sudo rm -rf /usr/local/share/dotnet. This removed .NET, but on reinstall of VS and .NET, the error returns.
Is there a better way to perform a clean install? Is there another way to resolve this issue?
Round 2
Since the issue was MonoDevelop specific, I did a find to find any file with mono in it. I found some stuff like this...
/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono
... in the Frameworks folder, and that looked promising. I've messed with MonoDevelop in the past (remember icsharpcode?), know that it used to be its own, independent, OSS C# IDE, and blasted that Mono.framework folder away.
sudo rm -rf /Library/Frameworks/Mono.framework/
I also deleted Visual Studio and removed /usr/local/share/dotnet again, then reinstalled .NET and VS with the VS installer.
When I tried to open Visual Studio, I got a different message.
Now we're getting somewhere. I clicked the "Download Mono Framework" button in that dialog and initially tried installing the "Visual Studio" release from the page the button opened, tried reopening VS, and got the same error as before. Strangely, the VS release is 5.18.1.3, and the error message, above, says I need 5.18.1.24+. :thinking-face:
I tried downloading the latest "Stable" release of the mono framework instead, which is version 5.20.1.19.
Visual Studio opens and creates new projects without error, but...
EDIT: That was short lived. I now get a /usr/local/share/dotnet/sdk/2.1.700/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.targets(5,5): Error MSB4018: The "GenerateDepsFile" task failed unexpectedly.
System.TypeLoadException: Could not load type of field 'Microsoft.NET.Build.Tasks.DependencyContextBuilder:_filteredPackages' (12) due to: Could not resolve type with token 01000025 from typeref ...
error when I try to build the stock console app.
NOTE: There is an official process for deleting Mono I missed, and is better than the quick & dirty rm -rf I tried, above.

After Upgrading to Specflow3 and Deveroom Go To Definition not working for Steps in Feature

Here is my setup:
Specflow 3.0.191
Specflow.tools.MsBuild.Generation 3.0.191
Specflow.NUnit 3.0.191
Visual Studio 2019 Version 16
Deveroom Extension 1.1.1
When I am in a feature file in Visual Studio I am not able to go to the definition of any of my steps. I have tried F12 as well as right clicking on the step and choosing Go To Definition. Neither goes anywhere or pops any kind of error. There is a disconnect that doesn't prohibit the tests from running but does cause the Go To Definition not to work.
I have followed the configuration guide from the Specflow site (https://specflow.org/2019/updating-to-specflow-3/). My tests are running and working. I have deleted the specmap files from the %TEMP% directory and that didn't do anything. I uninstalled/reinstalled the deveroom Visual Studio plugin also which didn't work.
I welcome any insight.
Thanks,
J.R.
We are having the same issue with what I believe the root cause is the Visual Studio Extension version. According to the link you provided it should be supported by Specflow version 2.3.2 or higher, but we are still having issues with 2.4.1
A workaround for us was to uninstall the extension and then install the version appropriate .vsix file for the Visual Studio version below:
https://github.com/techtalk/SpecFlow.VisualStudio/releases/tag/v2017.2.7
And then remember to un-check automatic updates for this extension
I have been struggling with this for some time. I found that I had the following in my specflow.json config file:
{
"allowDebugGeneratedFiles": true
},
changing this to
{
"allowDebugGeneratedFiles": false
},
and rebuilding fixed the issue for me.

DNX design time error - System cannot find file specified

When i try to run the ASP NET 5 solution, i get below error.
Microsoft Visual Studio Error
The following error occurred attempting to run the DNX design time process (dnx-clr-win-x86.1.0.0-beta8).
The system cannot find the file specified.
The DNX design time process provides intellisense, build, and reference information to Visual Studio and without it your experience will be very limited. Please try closing and reopening Visual Studio to see if that corrects the problem. Alternatively, check that the DNX version is properly installed or try changing to a different installed DNX version using the project property pages.
The project is not finding DNX SDK (if you look at the project properties you may see an empty drop-list next to 'Solution DNX SDK version').
If you are on windows 7, I suspect you may have an old version of powershell installed. You need at least version 3.0.
See this answer on a similar issue:
https://stackoverflow.com/a/31549273/299529

Resources