Unable to run WPF desktop app on some PC's - c#

I have created a WPF desktop application using the community edition of Visual Studio 2017.
The problem that I am facing is that my application does not run on some PCs where I try to install my application whereas it runs fine on others. On the OCs where it does not work, when I execute my application no errors are thrown but in the task manager the status of my process changes to suspended and then the process is removed from the set of running processes.
I am able to debug and run application on my PC (Win 10 64 bit OS), and on couple of other PCs that have Windows 8 64 bit OS, but the ones on which the application fails to run are Windows 10 PCs, but I am not sure if Win 10 is the problem since the application is running on my PC.
When creating the installer for my application, I have the following options selected:
.Net framework 4.6.1(x86 and x64) as a pre-requisite.
Download prerequisites from the same location as my application.
I need help in debugging what is cause for this problem, since at this point I do not know what is stopping my application from running. How can I debug what is going wrong on these deployment PCs?
I have tried installing on different PCs, but could not identify the reason why it is working on some whereas not on others.
I thought maybe the "Microsoft Visual C++ Redistributable 2017" is a requirement so I downloaded and installed on the client machine but this too did not help.
I also disabled the anti-virus software, but this too did not help.

Related

.NET portable application stops working on windows terminal server until stopped for every user

We deploy our .NET applications (.NET-Framework 4.5.2 and upwards) on a network drive. To explain, we build it in Visual Studio and copy the contents of bin/release. Several users who are connected to different terminal servers of Windows Server 2012 R2, Windows Server 2016 or Windows Server 2019 via RDP run the application. Most of the time it works great, but from time to time the application stops working. Either it doesn't start at all or it crashes at a specific action. The action at which it crashes is always different. After we close the application for all users on the terminal server, it works again without any problems. It looks like all users share the same process and if one crashes, it crashes for everyone.
Is this a known problem and do you have any solutions? For easy and fast update reasons, we cannot install the application directly on the server.

Analyzing with SonarQube Scanner for MSBuild on Windows 10

Two weeks ago I was able to run and analyse .net projects on windows 10 but after some times, it stopped. I am getting this app can't run on your PC , To find the version for your PC, Check with the software publisher.
I was following this url Scanning using Ms Build
I have also changed my local security option, the option of allow UIAccess applications to prompt for elevation without using the secure desktop to Enabled.
I am using windows 10.0.16299 x64 and there is no recent updates done on the computer.
I am running the command from sonar-scanner-msbuild-4.0.2.892\SonarQube.Scanner.MSBuild.exe and I have sonarqube-7 installed and running.
What Am I missing, I am not sure what caused the execution to stop and I checked there is no antivirus or firewall blocking and there is no error .

run c sharp program without installing in client machine

I want to run an application in client machine without installing it in the client machine. the application file should be in my usb pen drive and when I go to customer pen is plug in client machine and run the application. The system is developed by c#. Please send any ideas.
Build it in .Net framework 2. Then you can run it in almost all the windows machine except windows 8. .Net framework 2 is disabled by default in windows 8. You can enable it and run your app. Framework 2 will be available when installing windows and can run by double clicking the exe
If you are just interested in running the C# program, there are various online C# compiler available. For eg:
http://www.compileonline.com/compile_csharp_online.php
http://ideone.com/
If it is an application in .exe, you should be able to run it in windows without installing anything, as Windows already contains a version of .Net by default.
If you just have the dlls, scripts etc, you are in deep trouble.
It sounds as if you're after a linker/merger/virtualizer. I don't have any experience with these tools but they are cited quite often:
Xenocode
Thinstall
ILmerge
Salamander
SkaterPro
Spoon Studio

Releasing my Application to Users

I am experiencing complications when running my application on other PCs.
What can I do in Visual Studio 2012 that can ensure that any PC will run my application without complications?
These are the complications as I know them:
1) On Windows 7, the application will not run
2) On Windows XP, a window pop's up and shows an error stating: "Not a valid Win32 Application.".
My application is a Windows Form built in Visual Studio 2012 using Windows 7. This is my first time building an application for other users.
I found a similar related issue here:
http://blogs.msdn.com/b/vsnetsetup/archive/2012/10/16/setup-exe-is-not-a-valid-win32-application.aspx
However, that did not resolve the error. I've made sure that the Configuration Manager target platform is Any CPU.
Runs okay for me on both a WinXP and Win7 machine with .NET 4.5 installed.
Can you try building against a lower framework version (under the forms project properties, change target framework to 3.5 or 4.0) and retry on the computers that failed? If it then runs correctly, you can either continue building against a lower version or optimally, make sure your installer checks the correct framework version is installed.

Error when launching MapPoint 2006/2011 from C# .NET application on Windows Server 2008

I am running into an issue when attempting to use MapPoint libraries within our C# .NET application from a published app on a Windows Server 2008 machine. When instantiating the MapPoint.MapClass, I get the error:
"Your registry settings for this application were not copied correctly. To correct these settings, run Setup again for this application from the location where you originally installed it."
I am able to launch MapPoint just fine by itself outside of the app, the error only comes up when running the published app. We have multiple servers that clients run the app on, and the server running Server 2003 is able to launch MapPoint just fine. In addition, XP and Win7 machines also work fine. We also have a Foxpro application that also utilizes MapPoint's API installed on the 2008 server, and it doesn't have any issues.
MapPoint is included as a COM reference in the VS project referring to "Microsoft MapPoint 13.0 Object Library (North America) 8.3".
Looking online, I found a bunch of possible solutions, but nothing worked. I have tried:
Uninstalling MapPoint 2006 entirely and manually removing all entries from the registry, then reinstalling
Doing the same as 1 but then installing the trial of MapPoint 2011, resulting in the exact same error message
Disabling UAC
Setting MapPoint.exe's compatibility mode to Server 2003 and XP
Please let me know if anyone has any other suggestions.
it does sound like something is partially installing / being blocked. Is this a user issue? Ie. Can you install for all users?
it doesn't explain the MP2006 issue, but I would avoid the trial version for API work - the trial nag screen can be a problem. Eg. If you start the app hidden, the user cannot always see the nag screen to dismiss it.
You say you are instantiating a Map class. What about the Application (or _Application) class: you must have one of these to create the Map.

Categories

Resources