How do I fix "the code excecution cannot proceed because hdf5.dll was not found" error? - opencv

I recently uninstalled and reinstalled Anaconda, along with Python on my Windows PC. I removed a bunch of path variables (and admittedly cannot remember which ones I had).
I am using VS Code and OpenCV 4.6.0 (along with the contrib modules). The project builds just fine; however, when I run this program I receive the error "the code excecution cannot proceed because hdf5.dll was not found"
Does anyone know how to fix this?
This error was also posted here: Getting the error : 'The code execution cannot proceed because hdf5.dll was not found' in Visual Studio 2015
But I cannot seem to get this to work.

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.

OpenCV build on Windows Visual Studio error: 'setlocal' is not recognized as an internal or external command

I am building OpenCV source code on Windows 10 with Visual Studio 2015, but encounter an strange error.
First of all, I configured the source code with CMake. After configuration successfully done, I opened the configured OpenCV solution with VS2015 and press F7 to build. However, seems that every project being built encounter following error caused by 'setlocal' is not recognized.
6>------ Build started: Project: IlmImf, Configuration: Debug x64 ------
6> 'setlocal' is not recognized as an internal or external command,
6> operable program or batch file.
Things are strange because previously I also built OpenCV source code on Win10 with VS2015 and there was no any such kind of error before. But not know why this error appears now.
How do resolve this error?

ASP.NET 5 and Yeoman genetaror issue

First of all I looked into [this][1] post for possible workaround but unfortunately there is none.
My issue is somewhat closer but steps I went through are different so I decided to put up my question in a new thread.
My requirements were:
Installing ASP.NET 5 but I did not want to install full VS 2015 rather I went for DNVM (Dot Net Version Manager) and DNX (NET Execution Environment). This post says we can install from Command Line tool so I used this.
Installing Code for Visual Studio which I did
Installing a aspnet-generator using yo which I did using the following command: npm install -g yo generator-aspnet but ended up with some error messages. Please see screenshot below:
Even I got above errors I went on and ran yo aspnet which was supposed to give me choice of what type of application I want to create etc. But here I ended up with errors again. Please see screenshot below:
I googled a lot but nothing looked suitable or closer to my issue. I don't want to play with Windows Registry.
I am completely screwed up with this problem :( Somebody please show me the right path and help me out of this stand-still situation.
Thank you
This is unfortunately a bug with npm. Here is the usual troubleshoot:
Make sure you're on the latest npm version
Delete the node_modules folders and retry installation
If this doesn't fix it, then you should open an issue on the npm bug tracker.

Resources