0

I developed a WinForms app in .NET which works fine in the development computer.

Compiling it, generated a bin/Release folder where there's the executable file together with some dll files and a .config file (attached below)

Now I need to run this software in a fresh installed computer with Windows 10.

I installed .NET 6.0 Runtime in the computer, but when I try to execute the .EXE file it does absolutely nothing.

EDIT: .Net Framework 4.7.2 is already installed in the computer, so the .NET Framework shouldn't be the problem.

I tried executing it from console to see if it outputs something and it does nothing.

I would expect some error log file requesting a particular library or some popup error, but it shows nothing.

How can I know which Frameworks / libraries are missing? I can go through my development computer and install the Frameworks that I consider meaningful, but I don't want to pollute the new computer with unnecessary software.

Is there a way of knowing which particular Libraries does an executable need to run?

enter image description here

This is the Executable .config file in the bin/Release folder. It used .NETFramework 4.7.2 for development

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <startup> 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
    </startup>
    <system.web>
    <membership defaultProvider="ClientAuthenticationMembershipProvider">
      <providers>
        <add name="ClientAuthenticationMembershipProvider" type="System.Web.ClientServices.Providers.ClientFormsAuthenticationMembershipProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" />
      </providers>
    </membership>
    <roleManager defaultProvider="ClientRoleProvider" enabled="true">
      <providers>
        <add name="ClientRoleProvider" type="System.Web.ClientServices.Providers.ClientRoleProvider, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" serviceUri="" cacheTimeout="86400" />
      </providers>
    </roleManager>
  </system.web>
</configuration>
  • .NET 6 is .NET *Core* 6, not .NET Framework. Windows 10 [already includes .NET Framework 4.7.2](https://learn.microsoft.com/en-us/dotnet/framework/migration-guide/versions-and-dependencies#net-framework-472) since 10 April 2018 Update (Version 1803) and later versions come with 4.8 – Panagiotis Kanavos Jan 14 '22 at 11:28
  • Look in the Application event log for a crash notification. Do ensure an unhandled exception makes [enough noise](https://stackoverflow.com/a/3133249/17034) so both you and your users know what went wrong. – Hans Passant Jan 14 '22 at 11:30
  • mmm thanks. I tried now to install .net framework 4.7.2 and it says: `.NET Framework 4.7.2 or a later update is already installed on this computer.` I'll update my question –  Jan 14 '22 at 11:30
  • Yes, because it's bundled with Windows 10. In fact, recent Windows versions come with 4.8 – Panagiotis Kanavos Jan 14 '22 at 11:31
  • Did you check the Event log? Applications don't just disappear when they crash. The OS itself displays an error dialog and logs the crash. You'd have to explicitly add code that ignores exceptions for the application to just disappear – Panagiotis Kanavos Jan 14 '22 at 11:33
  • where can I find the event log? There's no log file created in the folder where the executable is. Running it does and returns absolutely nothing. –  Jan 14 '22 at 11:34

0 Answers0