1

I am currently working with visual studio 2017 with 4.6.1 .net framework. I created setup file for my desktop application the setup installs and runs perfectly in my system. The issue is that the setup installs successfully in other computers but the application not getting opened.

edit

Downloaded .net framework in client system but still same issue occurs.

edit 2

I ran a dependency scan using Dependency walker. It said there were a bunch of files the system could not find - error opening file. The system cannot find the files specified.

  API-MS-WIN-APPMODEL-RUNTIME-L1-1-0.DLL
  API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
  API-MS-WIN-CORE-WINRT-L1-1-0.DLL
  API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
  API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
  API-MS-WIN-SHCORE-SCALING-L1-1-1.DLL
  DCOMP.DLL
  IESHIMS.DLL

Also, there was an error with modules with an x86 type found - including the setup.exe - but I am unaware how this happened. I have selected 64 wherever I saw the option listed. Please find the screenshot. If this is indeed the issue, how do I solve this?

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
priyanka s
  • 126
  • 2
  • 11
  • 2
    check the Windows Event Log, anything about .Net Framework? – Minijack Nov 28 '18 at 05:59
  • On first glance this could be the **Visual C++ runtime**? A very common problem. Though you specify C#, I guess you could have C++ components. What version of Visual Studio do you use to compile your project? [The latest supported Visual C++ downloads](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads). Look in Add / Remove Programs on machines that work and don't work respectively for what version of the runtime that is installed? Finally: I presume you don't install debug versions of your binaries? Runtimes for these require developer PC debug dlls. – Stein Åsmul Nov 29 '18 at 10:30
  • For the record, those dependencies are API-Sets. [Please see attempted explanation here](https://stackoverflow.com/a/53509976/129130). Did you try to scan dependencies with the newer [Dependencies.exe](https://github.com/lucasg/Dependencies/releases)? It is a modern rewrite of Dependency Walker capable of handling API-Set resolution. It has a few quirks as of yet though. [The peview.exe file included with the tool you can safely delete for safety](https://github.com/lucasg/Dependencies/issues/26). Not malware as such, but can cause some drama as "unwanted software" detected by anti-virus. – Stein Åsmul Nov 29 '18 at 11:24

5 Answers5

2

Application Launch Problems: Here is a short version: WPF application crashes when I launch. Chattier version. Nice one from Martin Prikryl: Application does not work when installed with Inno Setup


Logs: Always check all event logs, application logs and MSI logs - if available. Just to mention it. Maybe try to attach debugger for testing as described here - provided the application gets off the ground at all. Then step through code.

The Usual Culprits: You probably just lack a runtime (example), have a bitness problem (32/64-bit) or insufficient permissions / privileges, or configuration errors (ini, xml, registry, etc...).

To summarize - torpedos, full spread below - nothing too dumb not to mention :-):


Missing Runtimes: First, always check for missing runtimes. For example: .Net, .Net Core, Java, Silverlight, Direct X (used even for applications now), VC++ Runtime, MS-XML (legacy), etc.... Remember that they come in different versions and some can not co-exist on the box whilst others can run side-by-side.


Error Code: Looking up error codes and exception messages.


Debugging Tools: Some information on debugging tools.


ProcMon.exe: The tool of the trade. The one-size-fits-all tool. The bee's knees, the topper-most, the quantum leap, the cat's pajamas (yes, it is a Top Gear Hamster allusion). It can be a challenge to use it effectively, but it is the best general-purpose debugging tool that is free.


Other Ideas:

  1. Configuration Settings?
    • Dev-box sins: Hard coded references? Test Servers / UAT links?
    • Manifests, INI files and XMLfiles?
    • Registry settings? HKLM / HKCU
    • Connection strings. See Authentication & Authorization section below as well.
  2. Platform & Bitness? (ARM, Intel 32 / 64, etc...).
    • Very common to read from wrong registry hive (the classic time waster):
      • HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\MyApp\MySettings (32-bit)
      • HKEY_LOCAL_MACHINE\SOFTWARE\MyApp\MySettings (64-bit)
  3. Prerequisites & Dependencies?
  4. Missing / Broken Registration (indirect dependencies)
  5. Permissions & Privilege? - local - ACL permissions and NT privileges?
  6. Authentication / Authorization - network related
    • Local user, domain user, Active Directory: group membership, group policy, etc...
    • Launching User: User profile issues? Maybe try with another user logged on where it fails?
    • Authentication Mode: Windows Authentication. SQL Server Authentication, etc...
  7. General Network & Proxy issues? (proxies, WINS, DNS and all the complexities involved in networking. UNC paths reachable?)
  8. Licensing? (conceivably related to hardware dongles and drivers)
  9. Security software interference? (software / hardware firewall, anti-virus, encryption tools and suites, etc...)
  10. OS version or edition? (Windows 7 problems)
  11. Localization? Non-English systems?
  12. Drivers?
  13. Hardware?
  14. Encoding?
  15. System corruption? (wrong time, disk errors, file and path names are too long, disk full, "wrong something")
  16. Target Machine Nature? Virtuals? SOE? Are the target machines real machines? Test machines?
  17. Locking / Blocking / In-Use files and registry keys?
  18. Malware? Can cause practically anything in terms of problems.

Links:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
  • Added a couple of more bullet points and details. You can see changes by clicking "edited x hours / minutes ago" (if available). – Stein Åsmul Nov 29 '18 at 13:13
0

make sure that the 4.6.1 .net framework is installed on the client system.Because the application requires .net frame work installed on the computer

nikhil kumar
  • 55
  • 1
  • 10
  • why particularly 4.6.1 only? please provide reference also why .net framework required to run winform application so that OP can understand – Nakul Nov 28 '18 at 06:11
0

To successfully deploy an application, you must also deploy all components that are referenced by the application.View the Deployment Process

Users might need administrative permissions or similar user permissions on the computer to install bootstrapped components. For ClickOnce applications, this means that the user might need administrative permissions to install the application regardless of the security level specified by the application. After the application is installed, the user can run the application without administrative permissions.

I am assuming you and your client are running install and application run as Administrator.

0

Possible root cause:

  1. System prerequisite is not meet, you should check all dependencies is ready on the target client system, or add the prerequisite to your installation guide
  2. Privilege issues, you might copy files or change registry locally with administrator rights, but the client is not. If so, you need change files to "C:\Users{username}\AppData\Roaming" or install with administrator privilege on the client system.

In such a situation, app possibly crashed in client system:

  1. Check your application log if any errors
  2. Check windows Log if any errors
  3. Dump system info using WinDbg.exe and debug it
Lei Chi
  • 216
  • 1
  • 14
-1

I also faced that kind of problem before. Just try to install another location not inside the program file of C:\ Drive. You may choose different drive or you may install in C drive also but not inside the program files.

niksan karkee
  • 157
  • 1
  • 17