C# application .Net 2.0 Couldn't run in Windows XP - windows-xp

I built a .Net 2.0 Application for Windows XP but I made it in Windows 7.
The application contains a Mysql.data connection and CrystalReport. When I try to run it on Windows XP, the application does not run, giving an error message of:
The application failed to initialize properly (0xc000007b).
I tried to rebuild application in Windows XP, but when I rebuilt and ran it in Visual Studio, the following error occurs:
Could not load file or assembly or one of its dependencies. The module was expected to contain an assembly manifest.
How can I fix this?

Please try the following:
1.Uninstall the .NET Framework 3.5 from Add/Remove Programs (in the Control Panel) on Windows XP or Programs and Features on Windows Vista/Windows 7.
Even if the uninstall fails, go on to step 2.
2.After the Framework 3.5 has been uninstalled or if it failed, download and run the .NET Framework removal tool.
Here's the link to Aaron Stebner's Framework Removal tool on Windows Live Skydrive:
http://cid-27e6a35d1a492af7.skydrive.live.com/self.aspx/Blog_Tools/dotnetfx_cleanup_tool.zip?wa=wsignin1.0&sa=17797669
Aaron Stebner is a Microsoft employee. The tool he's developed is linked on that page and makes easy work of cleaning up damaged .NET Frameworks from your system so they can be reinstalled. When you run the tool, choose the .NET Framework 3.5 from the list and choose to cleanup. After this is done, reinstall the .NET Framework 3.5 that Design 3 needs by running the Expression Design 3 setup package again. It will detect that the .NET Framework 3.5 is missing and reinstall it for you. After that's done, try running Design 3 again.
3.If that still fails to resolve the problem, go to START, RUN and type CMD to run a command prompt. Type CHKDSK /R and hit ENTER. Hit the letter Y and restart the machine. Allow the machine to do the check disk scan. After this is done and it goes back into Windows, try Expression Design again.
more information here

Related

Server Manager not available/accessible after removing .Net feature in widows server 2019

I have removed .Net Framework feature from "Server Manager -> Remove Roles and features Wizard".
(This image is from a different server)
Later I noticed that this activity has affected many windows features (Server manager, IIS Manager, Turn on off windows features etc..).
After removed .Net Framework feature I was not able to find the Server Manager application.
I tried answer in this link and able to restore ServerManager.exe but once I try to load the server manager it's giving below error,
I may be able to resolve this if I can re enable .Net frame work feature. But not sure how to do that without using server manager(since I cannot open sever manager).
Appreciate any solutions or suggestions regarding this.
Finally able to re enable .Net feature and access server manager by following below steps,
Open command prompt
Run the command: dism /online /enable-feature /featurename:NetFx4ServerFeatures /ALL and press return.
Type PowerShell and press enter.
Run the command: Install-WindowsFeature PowerShellRoot,PowerShell,PowerShell-ISE.
Restart the server.
Credit belongs to this blogger:
https://glennopedia.com/2020/02/14/why-you-shouldnt-remove-net-in-windows-server/
This kind of errors are caused due to lack of .NET framework on your machine or if you installed old version of framework. You need to install an appropriate .NET Framework on your computer.
Updating .NET framework on your computer will solve your problem maximum.
Install it from the Microsoft website.
Run as Administrator , the server manager will open.
Now you can try to add.

Deploying .NET Framework 4.5 with Installshield

I have written an application that I deploy via Clickonce, but I want to deploy it via Installshield, so I am experimenting with it. I found and downloaded dotnetfx45_full_x86_x64.exe, the redistributable for .NET Framework 4.5, and made a Installshield prerequisite from it. I wrote a simple application that has a RDLC report that just says “Hello World”, and it needs .NET Framework 4.5, and used Installshield to deploy it. The Reportviewer needs Microsoft SQLClrTypes_x86.msi and SQLClrTypes_x64.msi, and ReportViewer.msi, so I got those and made Installshield prerequisites from them. For the ReportViewer.prq, I specified SQLClrTypes_x86.prq and SQLClrTypes_x64.prq, as dependencies, and for SQLClrTypes_x86.prq and SQLClrTypes_x64.prq I specified dotnetfx45_full_x86_x64.prq as a dependency.
When I installed my little application on my test computer (running Windows 7), it installed the 4.5 framework, said it needed to reboot, and asked if I wanted to reboot now, and I clicked Yes. I was thinking it would reboot and continue the installation, but when it rebooted, that was the end of the installation. I ran setup again, it asked if I wanted to install the 4.5 Framework (it asked me the first time, too), so I clicked No. After clicking No, it installed the rest of my program, and it ran perfectly.
How can I get the installation to continue after it reboots from installing the .NET Framework 4.5?
Thanks
Here's a blog I wrote about 9 years ago:
Using InstallShield 12 to Install .NET Framework 3.0
It hasn't changed much. You want to use the prereq editor to change the reboot behavior to Note it, fail to resume if the machine is rebooted, and reboot after the installation.
Also please note that InstallShield consumes it's PRQ files from the ISProductFolder (C:\Program Files (x86)\InstallShield.... ) I don't care for this from a CM perspective. I recommend isolating the file and file references to relative paths based on ISProjectFolder and keeping all of these files in your source control tool.
Behavior Tab

PowerShell 3.0 Installation Error on Windows 7 SP1

I have been trying for a couple days to get Windows Management Framework 3.0 to install on my Windows 7 Enterprise, SP1 desktop machine. The installation seems to go fine, and at the end it requests a reboot as it should. After the reboot, it says installation has failed and rolls everything back out.
In the System Setup Logs it shows the following error:
Package KB2506143 failed to be changed to the Installed state. Status: 0x80070005.
I definitely meet the pre-requisites. I have uninstalled .NET 4.5 and 4.0 and re-installed both, with reboots in between. It always comes back with that same error.
Any ideas?
Make sure you run the installation as Administrator. It's not sufficient to be logged on with an account that has local admin privileges; you need to select Run as administrator from the context menu, or run it from an elevated command prompt. I ran into that error the first time I tried to install Management Framework 3.0 by just double-clicking the downloaded .exe file. It worked when I launched it from an elevated prompt (Run as administrator would have the same effect).
For me the problem was the .Net Framework WoW64 features were missing. More specifically mscoree.dll couldn't be found. Installing the NetFx2-ServerCore-WoW64 & NetFx3-ServerCore-WoW64 features fixed the problem for me.
http://josheinstein.com/blog/2011/09/solved-this-program-cant-start-because-mscoree-dll-is-missing-from-your-computer/

Lightswitch Desktop Application Wont Run in XP SP3

I have developed an application in Lightswitch 2012, and now need to deploy it to a desktop PC running XP SP3.
I have already looked at two previous posts Can't run Lightswitch 2012 Programm under Windows XP and
Lightswitch Desktop Application Wont Install in XP SP3
The two posts both refer to executing [editbin vslshost.exe /SUBSYSTEM:WINDOWS,5.01 /OSVERSION:5.1] to modify the vslshost.exe file, though only the first post says it worked.
In my case, I have tried the above to update the vslshost.exe file, but when I publish my LS2012 project it reverts back to the default vslshost.exe file. And if I manually swap the file with the copy I modified, when I run the deployed app I get the following error:
System.Deployment.Application.InvalidDeploymentException (HashValidation)
- File, vslshost.exe, has a different computed hash than specified in manifest.
- Source: System.Deployment
So, the questions are
am I doing something wrong?
is there a master copy of vslshost.exe I need to update instead?
(BTW, I also ran the VS2012 (KB270250 from VS2012 Update 1 CTP 4))
Thanks for your help
As this is an internal company app, I have just convinced our IT guy to upgrade the machine, because the certain grief of trying the different possible solutions was just too much.
BUT if you MUST deploy to XP
To find out more, here are two pretty exhaustive posts with input directly from the Lightswitch team:
Progress on LS2012 desktop apps installing AND running on XP yet?
Windows XP 32 bit deployment
Enjoy....(???)

Make .NET Framework 4 wpf application portable or more reliable to install

I am required to create a simple application. Since I am good at WPF and I don't know win forms that good I implemented my application by creating a .Net Framework 4.0 WPF project in Visual Studio. Everything works great the application runs like it is supposed to.
Since the application is required to run in multiple platforms (Windows XP and above) I am including the prerequisites when publishing my applications. The prerequisites happen to be:
1) WIC (Windows Imaging Component) old computers need that to run the .net framework 4.0
2) Windows installer 3.1 (needed in order to install the next prerequisite)
3) Windows .NET Framework 4.0 Client Profile
If I install those prerequisites then the application runs like it is supposed to.
Now the problem is:
My boss did not approve my application because he tried installing it in a Windows XP machine with SP2 and this are the things that happened:
Step 1)
// first prerequisite (WIC) took less than 1 minute to install everything
// is working great so far.
Step 2)
// second prerequisite (Windows Installer 3.1) takes about 2 minutes to install
// which is great. After the installation is done the computer needs to be
// restarted in order to continue with the installation. Things are not going
// that good now but we are still ok...
Step 3)
// After the computer is done rebooting it continues with the last prerequisite
// (Windows .NET Framework 4.0 Client Profile). That takes 10 minutes to install!!!!
Step 4)
// My application has all the prerequisites needed to be installed so it installs in
// about 1 minute
We recorded the time, and the application took about 25 minutes to install from start to finish. The computer where we tested the installation was a virtual computer using 2 cores and 1 GB of memory with 3.1 GHZ.
What do you guys recommend in order to speed up this installation? Should I use a different technology such as windows forms using .net 2.0? It will be nice if I can deploy the application that I have already created. If you guys could help me make this application portable I will really appreciate it. In order to do so I tried building my application with all the required references copied to the output directory. That did not work... Or any ideas of how to make the installation be faster will be of great help as well.
If you're using .NET Framework 4.0 (which is not going to come out-of-the-box with any versions of Windows, especially Windows XP) there's no way to get around the install of .NET 4.0 on the target machine. Your major bottleneck is going to be the download of .NET 4.0 files from Microsoft to the machine.
I've run into similar problems where the initial install of an application takes forever because of the .NET 4.0 download and install. We even encountered an issue where the application couldn't be install because there was insufficient disk space for the download.
One option would be to pre-push the prereqs out to all the machines you'll be install this on before deploying your application.
Otherwise, you might be forced to use an older version of the .NET framework. Here's a list of the framework versions which shipped with various versions of windows.
http://blogs.msdn.com/b/astebner/archive/2007/03/14/mailbag-what-version-of-the-net-framework-is-included-in-what-version-of-the-os.aspx
Unfortunately, if your organization is committed to using a 10 year old operating system then they either need to accept that modern tools will require a lengthy install process while all prereqs are loaded... or else force you to use a 10 year old software technolgy.