Publish Portable and Self-Contained .NET Application in Windows 7 - c#

I need to release an application that:
must not be installed
must not involve the installation of dependencies for its execution if they are not installed on the PC in use (no versions of C ++, versions of .net Framework, etc ...).
For this purpose I made the application in .NET 5.0 and published it according to the settings visible in the image.
In the settings I specify the Self-Contained property.
Running the application on Windows 11, Windows 10 and Windows 8.1 I have no problems but on Windows 7 I have a .NET Runtime ID 1023 error as in the image.
What could be the problem? How should I publish the application so that I don't need to install anything?

Unfortunately Windows 7 SP1 is supported only with Extended Security Updates installed. The same statement also applies to net6.
I managed to get it to work (with net6) by installing those updates from the Microsoft Update Catalog:
Windows6.1-KB3063858-x64.msu
Windows6.1-KB2999226-x64.msu
Win7AndW2K8R2-KB3191566-x64.zip
this is Windows Management Framework 5.1
Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.29.30135
In addition, in some installation, I had to also install PowerShell v7.2.1 .
I was unable to run the application on a fresh install of Windows 7 SP1 in any way.

Related

Create app for Windows Mobile 6 (and above)

What IDE (and version) and it components should I use to build that app? For now I write in C# so that will be cool if it is possible
This is what i use for wm:
VS 2008 pro, Microsoft .NET Core SDK 2.1 (x64), Windows Mobile 5.0 Pocket PC SDK. Im not sure about Davide Piras' answer above. I have never heard that anyone managed to install WM 6 project profiles in any VS above 2008 version. Beside v2008, i also have VS2012 installed and it doesnt register any MW project from Mobile SDK 5.0.
in the past i used Visual Studio .NET 2005 with the .NET compact Framework, that allows you to build apps for windows mobile 6.
mind that there is no above, Windows Phone ( 8 or 10 ) is a completely different beast than Windows Mobile 6 and app development for Windows Phone is still done in .NET but I don't think you have code or binary compatibility between Windows Mobile and Windows Phone.

Windows application developed using VS2012 is not running in windows XP SP3

I have developed an windows application in Visual Studio 2012 with .NET framework 4. But when i tried to install my application in Windows XP SP3 it shows that the .exe is not a valid win32 application. Please help me to solve.
This could be one of two, or both, issues. First, ensure that you have the .Net Framework installed on that machine. Second, make sure the application is compiled targeting x86 platform. Most likely, it is the the second issue.

Application.exe is not a valid Win32 application error

I have written a Console application that client is trying to run it on their Windows Server 2003 R2 machine machine and they get that error message.
If I go to Build -> Configuration Manager all my projects are set to Platform of "Any CPU" and Configuration of
"Release"
What else I might have missed? They don't want to actually run the console application by double clicking on it, they want to give it to the Windows schedules tasks so it can pick it up and rn it on certain times
Starting with .NET 4.5, the compiler generates an EXE that's marked to be compatible only with Windows version 6.0 and greater. Vista and up. Such an executable will fail to run immediately when started on XP and Server 2003, they are Windows versions 5.0. You get this error before it can tell you that .NET 4.5 isn't installed on the machine.
You must target .NET 4.0 or less. Same requirement on any DLLs you have a dependency on, including unmanaged ones. More about this in this post.

Not a valid win32 application while launching the installer

I have created a c# application using visual studio 2012 and uses a 4.5 framework.I created an Installer using NSIS(HM-NIS-EDIT Wizard).The installer works fine on windows 7 32 and 64 bit.But when I tried running the installer on windows Xp, it gave me an error saying not a valid win32 application.I want that it should work on windows XP as well.
I wanted to know what the possible reason could be.
1)Should I change the framework to 3.0 or 3.5?
2)Or do i have to change the code in NSIS.
Please suggest
Link of my installer https://www.dropbox.com/s/zrxp4fswnqydu9t/Usm.exe
Thanks,
.NET 4.5 is not supported on Windows XP. There's no way to go around this. .NET 4.0 is the last version that supported Windows XP SP3. You can add many 4.5 features using NuGet packages like Microsoft.Bcl.Async for async/await support and Microsoft.Net.Http for HttpClient.
I think your installer is not created with NSIS but with Advanced Installer. I tried to run it on Win7 Pro 64bit and the result is "The system could not find the file specified.".

C# Windows forms app created using Visual Studio 2012 not working on windows xp

I have created a windows forms application using C#.net 4.0 on Visual studio 2012.
App works great on windows 8 and windows 7 but when I try to run the same app on Windows XP I get following error message.
Following are the prerequisites for my app:
1. .net Framework 4.0
2. Windows Installer 4.5
3. ReportViewer 2010
4. MYSQL DB 5.6
5. Visual Basic PowerPack 10
I have installed all these pre-requistes on Windows XP. My 1 click setup installs the application correctly but on application Start up I am receiving error.
I also tried upgrading visual studio 2012 and then rebuilding and publishing the app but still the same error persists.
Following is the screen shot from the Application Event logger
Screenshot from Project's configuration manager
Screenshot from Project Properties
Can anyone suggest me what could be the issue.
If your program icon (or possibly any icons used by your program) has any images that are larger than 64x64 pixels, you can get this error on XP (in System.Drawing).
Check all your icon files and ensure that none contain images larger than 64x64
You Need Service pack 3 for XP and check the EXE build whether it might build for X64 and also check your XP machine is having .Netframework 4.0 change that into AnyCpu and once again build
the EXE and check with XP. and change your framework as .NetFramework 4.0
Are you targeting Mixed Platforms/Any CPU/x86? Can you try different build configurations?
Are you referencing any third party DLL's?
Can you catch and log details of the exception, or does the program fail to execute entirely?
I've had strange issues before when compiling for Mixed/Any CPU, and x86 machines throw a wobbler if the program isn't specifically targetted to x86.

Categories