Why SQLite crash in UWP with cannot find the file specified? - sqlite

I install the SQLite from Nuget as below:
And after I ran the program it throws this error:
I feel strange that it showed the Version is 1.0.109.0 but not the version I installed which 1.0.109.2
What's more, I tried the way what Could not load file or assembly 'System.Data.SQLite, Version=1.0.109.0 - Why does it search for version 1.0.109.0 when I have referenced 1.0.109.1
said
But all the way no works.
In addition, I opened the .csproj and here is the SQLite package reference:
The version in .csproj is right.
What's wrong with it.Would you please tell me how to solve it? Thank you.

Make sure that the SQLite assembly gets copied to your output directory so it can be found at runtime. It should if you install the SQLite package in your UWP app project.

Related

System.Threading.Tasks.Extensions unloaded by IIS

I have a project with assembly which refers to System.Threading.Tasks.Extensions, Version=4.6.28619, It's an old ASP.NET App hosted on IIS. After compilation, the app is running and everything is OK. After some time, the app throws an exception.
"System.Exception: Could not load file or assembly
'System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral,
PublicKeyToken=cc7b13ffcd2ddd51.
After the recompilation and restarting the APP, everything works fine, but after a few hours, the exception is thrown again. What could be the problem?
I have tried to change web.config to use System.Threading.Tasks.Extensions in the correct version, but it didn't help.
Version=4.6.28619 is file version, not the Assembly Version. I did goodle on System.Threading.Tasks.Extensions history.
I found the 4.3.0 should be the correct version in your project.
Other version couldn't find 4.1.0.0 version dll like picture above. Package version >=4.4.0, using 4.1.1.0. <4.3.0, using 4.0.0.0.
Now you can follow the suggestions below to check the issue
Find the package System.Threading.Tasks.Extensions like my first picture.
If you have multi project, make sure all the projects using the same version package.
Delete the .vs folder
Check the web.confg/app.config file, and check the version of System.Threading.Tasks.Extensions, if there are duplicates, please delete them.
If the steps above not works for you, maybe the issue related to deployment. You can try the binding redirects.

Where does the Qt sqlite plugin look for extension libraries

I have made the appropriate modification as found in this thread to enable the Qt sqlite plugin to load extensions. However, when I run SELECT load_extension('spatialite_mod'), I now get the error The specified module could not be found
On a Windows Qt installation, where do I need to put the spatialite_mod.dll file so that it can be found a runtime? I have already tried putting it in the binary directory without any success.
This turned out to be a multi-part problem.
The answer to the original question is that Qt looks for the libraries in the working directory (QDir::currentPath()) and in the Windows PATH.
Part 1:
On Windows, the specified module could not be found error also can mean that one of mod_spatialite.dll dependencies was not found. In my case, I had forgotten to move these dependencies to the same directory as mod_spatialite.dll. They include:
libgcc_s_dw2-1.dll
libstdc++-6.dll
libsqlite3-0.dll
libxml2-2.dll
zlib1.dll
libfreexl-1.dll
libgeos_c-1.dll
libgeos-3-5-0.dll
libiconv-2.dll
liblzma-5.cll
libproj-9.dll
Part 2:
The libgcc_s_dw2-1.dll and libstdc++-6.dll libraries shipped with libspatialite do not work with Windows 10. Read more about this here and here. They would crash the program when loaded. The fix for me was to grab the same libraries from my Qt installation at C:\Qt\5.11.3\mingw53_32.

Couldn't install any packages .Net Framework NuGet

I have a solution with a lot of projects targeting .net framework but not any with .core NuGet. The case is that, quite occasionally I started getting the following error while trying to set up any package from manage NuGet packages
HRESULT E_FAIL has been returned from a call to a COM component
Did someone run into the same issue and how you managed to resolve it
Go to your C:\Users\{USER}\AppData\Roaming\Microsoft\VisualStudio folder, and you should find a folder in there called 15_{id}. Open it, and have a look at the ActivityLog.xml. If you have a look in it you should find the error in there and the library that's causing it. In my case it was caused by Microsoft.visualstudio.shell.interop.IVsReferenceManager2 within the Microsoft.VisualStudio.Shell.Interop.11.0.dll library.
This post helped me solve the issue then: Msdn forum
1.Open "Developer Command Prompt for VS 2017" as Admin
2.CD into "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\PublicAssemblies"
3.Run "gacutil -i Microsoft.VisualStudio.Shell.Interop.11.0.dll"
After a restart, it all worked well.
Please Follow the Source
referencemanagerpackage-fails-to-install-vs-2017-community-edition

My .cshtml page does not open

I am getting this error could not load file or assembly
microsoft.visualstudio.projectsystem.dotnet.14.0
version=14.0.0.0,culture=neutral,,public key token=b03f5f7f11a3a
or one of it's dependancies.the system cannot find the file specified.
Check the version of microsoft.visualstudio.projectsystem.dotnet in packages.config and see if it is different then the version of your DLL. If the problem still persists, run the code
update-package -reinstall
in your Package Manager Console.
Let me know for further problems regarding this.

Package tried to add reference to System.Runtime which was not found in the GAC

ASP.NET 4.5.1 or 4.5.2
Updating Nuget package MicrosoftAspNet.Identity.EntityFramework from version 2.2.1 to version 3.0.0-rc1-final
I get the following error:
Failed to add reference. The package 'Microsoft.AspNet.Identity.EntityFramework' tried to add a framework reference to 'System.Runtime' which was not found in the GAC. This is possibly a bug in the package. Please contact the package
owners for assistance.
I had a similar issue with another package.
I "solved" it adding a manually reference to missed library, updating the package and then removing the reference added manually:
On your project go to References -> Add Reference... and then click on Browse...
On my installation (Windows 10), your file is located on: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll
Add, update and then remove.
I know, it is not a solution, but it will allow you continue working until get a real solution.
I had the same issue, but adding the MySQL package to my project.
The way that i solved was just very closely to the answer given by Sebastián Guerrero.
So i will be adding a manually reference to that missed library (system.runtime) and than installed the MySQL package and it works perfectly.
ATTENTION: I only unnistall the system.runtime package after installing the MySQL.
References -> Add Reference... and then click on Browse...
On my installation (Windows 10), your file is located on:
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll
I had the same issue when running Install-Package Microsoft.Azure.Management.Fluent on .NET framework 4.5.2
Solved the issue with the following steps:
Installed Microsoft.Rest.ClientRuntime latest version from Nuget.
After that, installed latest version of Microsoft.Azure.Management.Fluent from Nuget.
I had this problem when I opened the project after a while.
The problem was it was originally built with Microsoft.Net.Compilers.2.4.0 and I was on 3.3.1.
The project strangely added two required Imports to the .csproj file, one for the 2.4.0 compiler,and a duplicate for the 3.3.1 version. I just needed to:
Right click on the project file
Unload the project
Edit the csproj file
Remove the 2.4.0 references (was also a reference in an Error element)
Close file
Right click on project, reload file.
Rebuild All

Resources