I have an ASP.Net Web forms project in Visual Studio 2022. When I try to build it, an error message appears.
An API call exited abnormally. (Exception from HRESULT: 0x800300FA (STG_E_ABNORMALAPIEXIT))
This error also appears when I try to exit Visual Studio. I have to kill the process to proceed.
The same project works fine in Visual Studio 2019.
Any idea where to start? The error message is not very insightful.
I already tried setting the rights on the framework Temporary ASP.NET Files folder. I didn't help.
The issue is also only with one project - other projects work fine.
Is there a way I can get a Visual Studio log. Any ideal where this is stored for Visual Studio 2022?
Try deleting the .vs folder at the root of your project that fixed it for me
Vs22 is now x64 bits, and is the first such version to be so.
This also means we see a lot more issues and errors in regards to running your application as any CPU as opposed to forcing the project bit size.
It's not clear if you always forced the bit size, or perhaps your project say references unmanaged code that's say x32 bits.
So I would force and change the project to run as x32 bits if that was the settings in the past.
And in fact any CPU used to result in your application (f5) to run as x32 bits, now that default any CPU setting will result in a x64 but running and debug session.
You don't mention your current project settings, but I would try x32 bits, especially if you used any CPU in the past.
I had a same issue after recent Visual Studio 2022 update. Was not able to build, run, publish solution at all. To resolve it I just pushed all my changes into repo and cloned it to new folder.
Have no idea what was a root cause, but it helped...
I was able to get rid of the issue through a combination of the following:
Closed Visual Studio
Removed **/bin/** **/obj/**
Updated Visual Studio to the latest version
Removed the component cache: %USERPROFILE%\AppData\Local\Microsoft\VisualStudio\1x.0\ComponentModelCache
Removed all temporary files in %USERPROFILE%\AppData\Local\Temp
Those locations are also mentioned on the internets, but I didn't touch them:
%USERPROFILE%\AppData\Local\Microsoft\Team Foundation
%USERPROFILE%\AppData\Local\Microsoft\VisualStudio
%USERPROFILE%\AppData\Local\Microsoft\VSCommon
I get this error when using SQLite.
DllNotFoundException: Unable to load DLL 'SQLite.Interop.dll': The
specified module could not be found. (Exception from HRESULT:
0x8007007E)
I tried several solution without success.
Tried using x86/x64
Tried this:
Visual Studio 2017 Xamarin UWP break, unable to load "sqlite3"
Added 2015 Visual C++ runtime dependency for UWP.
Tried manually adding the .dll and set it to "copy always".
Tried installing locally depedencies from here
I'm really out of ideas.
I had this problem running in release but not in debug.
I am using VS2017 15.9.5
Using Release manager I changed all the projects to use Release x64
Strangely the Platform tab asked me to make a new Platform and I had to do this in order to be able to pick an x64 platform
I wound up installing the SQLite modules in all the projects, not just the data tier. it would not work with just the data tier, even though I had Copy local true.
Here are the nuget packages I used
In my company I'm running Visual Studio 2015 Enterprise and just recently upgraded to Windows 10. Unfortunately, now I can't run any web project using versions of asp.net earlier than 5 (owin/katana) - always getting error :
"Could not load file1or assembly 'XXX' or one of its dependencies.
The process cannot access the file because it is being used by another
process. (Exception from HRESULT: 0x80070020) ".
Now, I've found a few posts like this and the answer is mostly that some other application is running on port 80, 8080 etc blocking visual studio's iis express. The problem is that I get this error regardless of port I'm using (even on some random 34535 etc).
The interesting part is that when I run kestrel (app on asp.net 5) it works and runs fine without any error.
Anyone has any ideas ?
Okay, so I had this issue and resolved it by uninstalling Panda antivirus, which presumably was locking the assemblies for just long enough to interfere with loading them some of the time.
If anyone else is having this issue, and there is definitely an assembly that won't load (as opposed to a port that's already been bound to) then try checking your antivirus!
Greetings!
I am developing Asp.net application, in which i need to use sqlite as database, i tried to add reference to 64 bit dll file System.Data.SQlite file.
When i run my application it shows as below error
Error 1 Could not load file or assembly 'SQLite' or one of its dependencies. An attempt was made to load a program with an incorrect format.
What will be the reason for this, and how can i fix this.I am using visual studio 2010.
Thanks in advance
sangita
is your application built to target 64 bit? Or is it built to target AnyCpu and running on a 64 bit platform?
Have you tried using the 32 bit version of SQLite? It sounds like you are trying to load the 64 bit version of the dll when you are in a 32 bit environment...
I am currently using SQLite for Windows Forms but while running the project it is showing the error:
Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I had added the DLL of System.Data.SQLite.dll but it is showing the same error. Please can any one help me by giving the perfect answer regarding this problem? Thanks in advance
This should fixed my issue.
Add the following DLLs.
Microsoft Visual C++ Runtime Package
SQLite for Windows Runtime
Use Project "Add Existing Item" and select the sqlite3.dll "As link". Click OK. Choose DLL in project and set "Copy Local" value to True.
Maybe you haven't added the version for the right platform? SQLite is distributed with one X86 (32 bit) assembly and one X64 (64 bit) assembly.
If your application is a 32 bit application you should use the System.Data.SQLite.dll located in the "bin" directory of the System.Data.SQLite distribution, if it is a 64 bit application you should use the one in "bin\x64".
However, from looking at the error message a second time I'm not sure if that's it. Are you making native calls to SQLite? In that case you may have to rename the dll to sqlite3.dll.
As you may know System.Data.SQLite is a bundling of the original native sqlite3.dll and a managed ADO.NET provider (unless you are using some old version in which case I'm not sure - you might need the native sqlite3.dll separately)
In my case I'm working on a UWP project. I had to add a reference to Visual C++ 2015 Runtime for Universal Windows Platform Apps and the error was gone. It can be added in the Reference Manager under Universal Windows > Extensions. Detailed solution can be found here.
After struggling for 3 days,finally found a way to resolve.
As of March 2018,if you try to use sqlite-net via Nuget Package Manager,it adds two files and few reference dlls to your solution independent of type of project UWP or Android etc.
And after that if you compile and run the solution will fail with an exception
Unable to load DLL 'sqlite3': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
This is because it is unable to load sqlite3.dll as it is not added to the solution via NUGET package manger.So you need to add it manually.
To add,first determine your project is 32 bit or 64 bit then download the respective Precompiled Binaries for Windows Runtime from https://www.sqlite.org/download.html and add them manually (copy and paste).
So now your solution will look like below one and it will run without issues.
I had the same issue when I downloaded the latest sqlite provider and I tried a solution from here but it didnt work, hence I downloaded the earlier version and its works fine.
Had this problem recently - after attaching procmon to my process, I found that the latest System.Data.SQLite libs (the ones built for .NET4) have a dependency on the MSVC 2010 runtime, and the servers didn't have this installed. Fortuantly, this can be pulled down from the Microsoft website.
I had exactly the same problem for the UWP project in a Xamarin.Forms application.
Adding reference to "SQLite for Universal Windows Platform" to the UWP project solved the problem.
Copy sqlite3.dll to the System32 folder. It worked for me. And thanks too!
I'm building a native Windows Phone 8.1 app with a PCL and a Droid project. I had the same error and I put the reference to the right version of sqlite3.dll (wpa81) and all worked.
Especially if you've updated to Visual Studio 2015 RTM and are developing Universal Windows apps, try uninstalling the SQLite for Universal App Platform extension and reinstalling (see http://sqlite.org/download.html).
All of these seem to be solutions for certain situations. For me, and for #Marlon Ticao on this page, the application just can't find the DLL.
There are 2 solutions. Copy it to a directory that is in you path (such as System32) or you can copy it into the same directory that your executable is.
I had this exact problem using a 3rd party built sqlite3.dll -- the app would not launch. I used the dependency walker to find that this sqlite3.dll had a dependency on msvcr110.dll. Once I included this file, all was well.
Don't forget to deploy the published runtimes folder too in .NET (Core) projects, it should contain that DLL for various targets.