.NET Compact application throws TypeLoadException when not run through debugger - compact-framework

If I run my .NET Compact application using ConmanClient, everything works. But if I try running my application by executing it directly from the shell, it throws TypeLoadException (a window appears displaying this without any additional information). I use .NET Compact 3.5 and Windows CE 6.0 R2.

Related

Running IIS Express in 32-bit crashes my ASP.NET Core web application

I have an ASP.NET Core web application which I'm trying to run in 32-bit with IIS Express. I followed other guides and tips to make IIS run in 32-bit, but every time i try to run the application it crashes with the error message:
System.BadImageFormatException: Could not load file or assembly. An
attempt was made to load a program with an incorrect format.
I have tried the following:
Set the build and debug to run x86
And unchecked the Use the 64 bit version of IIS Express for web sites and projects
But my project still closes almost immediately with the error mention above. Is there a setting that I am forgetting about or something else I need to do before the project can run in 32-bit.
I'm using visual studio 2017 on Windows 10 with IIS Express version 10.0.14393.0 and AspNetCore 2.1

VB.NET application requests .NET 4.5 even though I built it to use .NET 3.5

I created an application in VB.NET Visual Studio 2013. I set the target as .NET Framework 3.5 (through Solution Explorer -> Application Properties), but when I rebuild the application and run it in another system, it asks for .NET 4.5 to run the application.
I checked several times, and I have definitely selected only 3.5 in my source.
same problem happened with me
Use ccleaner
clean the cache and regex errors
launch vs 2013 again
( PS : before you build the app select 3.5 framework at the start )

Mismatch .net framework between local (Windows 8.1) and server (Windows server 2003) generating sql exception

I have asp .net 4 application running in development (local) on windows 8.1 & Visual Studio 2013, installed .net framework version 4.5, IIS Express
The production server is setup with windows server 2003 and installed .net framework version 4.0, IIS 6
The web application Target Framework is .net framework 4
Lately i have encountered SqlException (0x80131904): "Some part of your SQL statement is nested too deeply".
This exception occurs only in production (on windows server 2003) where the runtime version is 4.0.30319.1022
In development (local on windows 8.1) where the runtime version is 4.0.30319.34011 this exception does not occur.
The SQL generated by LINQ in the server is different than the SQL generated in the local.
After a little research i found that different version of .net is causing this behavior.
As far as i know, the difference between the two versions is:
version 4.0.30319.1022 is built on .net framework 4.0 and version 4.0.30319.34011 is built on .net framework 4.5
Since .net framework 4.5 is not supported on windows server 2003, I would require targeting the older version on my dev machine.
Is there a way to target my dev instance to use the exact same .NET framework version or entities dll that is used in order to receive the same behavior in both dev & prod instances?
Thanks in advance,
Shai

.NET framework, Windows XP

We have built an app with Visual Studio 2012 and it runs beautifully on any Windows 7 or Vista machine, 32 or 64 bit. However, when I try to run the app on an Win XP machine, I get this:
**
Prerequisite check for system component Microsoft .NET Framework 4.5
(x86 and x64) failed with the following error message:
"Installation of the Microsoft .NET Framework 4.5 is not supported on
this operating system. Contact your application vendor."
**
And then of course, when I try to install .NET 4.5 on the Win XP machine, I find out it's not supported.
At this point, I'm just wanting to know what can be done to get this app to run on Win XP. It's a calculator application written in visual basic.
Thanks Guys!
.Net framework 4.5 is not supported in Windows XP. If you're not using any .Net 4.5 features you can rebuild your app using .Net Framework 4 (In the Project properties).
I always hate these kind of answers, but a quick google search indicates that you can't get .net 4.5 to run on Windows XP.
IF you really really need your application to run, you can always use earlier versions of the framework
you can do this by
Right click on your project and go to
properties
application
target framework
and change that to something elxe

Running .EXE file made in visual studio 2005 failure

I would like to run a .exe file made with visual studio 2003 but I get an error every time I run it on a windows 7 machine, vista machine, and xp machine. The error on Windows 7 and vista says "application has stopped working" and then makes me close the error box.
In windows xp it's a little different error, "the application failed to operate (0xc0000135) Click on OK to terminate the application."
That error code seems to indicate the application failed to initialize correctly.
It is possible that the anticipated .NET version is not present.
As far as I know, VS 2003 by default compiles against the .NET 1.1 library. There is no straightforward way of installing this on a Windows 7 or Vista box. Do you need to compile it against the .NET 1.1 library, or can you load it in VS2005, change the output .net version to 2.0 or higher, and recompile the application?
If you have the source code to the application, try running the application in debug mode and stepping through line by line until you find the exception. If you do not have the source code, possibly try running the application in a couple different compatibility modes. Another option to try is to check the windows event log for anything more specific.
If you want to get really deep into it, you can use SysInternals ProcMon.exe and filter on the failing exe to view the WinAPI calls that are happening during the failure.
Also, a basic search of forums shows that error is usually accompanied with framework issues. Either recompile the application or check out what your required framework is in the VS2003 project settings.