syd711 / vpin-studio

Competition, table, and player management for VPins.
MIT License
32 stars 2 forks source link

Error Visual Pinball Backup Manager and .NET Framework #230

Closed franzernst closed 6 months ago

franzernst commented 6 months ago

I have problems with the backup manager in VPin Sttudio or .net framework. As soon as the PC has booted, this message appears: "To run this application, you must install missing frameworks for .NET.

Would you like to download it now?" When I click Yes, nothing happens. I have installed .net manually (32 and 64bit) - without success. When I click on Visual Pinball Backup Manager in the preferences in VPin Studio, the app freezes.

I have VPin Studio 2.18.1 Newest Pinup Popper, VPin Mame etc. Windows 11

IMG_1428 IMG_1427

syd711 commented 6 months ago

Thanks for reporting, I'll take a look on Monday.

mmattner commented 6 months ago

@franzernst - if you can provide any further info I can look also (I worte VPBM). The error relates to .NET libraries .. the error dialog comes from there.

I am hoping I can work out which .NET packages are missing that impact you.

This general issue seems to occur semi regularly for all sorts of apps, ie:

https://community.thehomeremote.com/t/exe-says-you-must-install-missing-frameworks/3448

Could you also please run the command ‘ dotnet --info’ from a command prompt and provide the results.

franzernst commented 6 months ago

@mmattner thank you very much for your support. Sorry, I' m a noob - how and where can I run the command?

mmattner commented 6 months ago

As well as doing the above could you navigate to c:\windows\microsoft.net\framework64\ and list the installed frameworks.

I renamed all folders other than V4.0.30319, and confirmed 4 files starting with sbs are in the framework64 directory

I need Microsoft Windows Desktop Runtime - 6.0.29 (x64) or similar to be installed in the ‘Add or Remove Programs’ tool

The attachment he’d image is the result of running ‘dotnet —info’

IMG_4208

franzernst commented 6 months ago

This here?

C:\Users\arndf>dotnet --info

Host: Version: 8.0.4 Architecture: x64 Commit: 2d7eea2529 RID: win-x64

.NET SDKs installed: No SDKs were found.

.NET runtimes installed: Microsoft.NETCore.App 6.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 8.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found: x86 [C:\Program Files (x86)\dotnet] registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables: Not set

global.json file: Not found

Learn more: https://aka.ms/dotnet/info

Download .NET: https://aka.ms/dotnet/download

mmattner commented 6 months ago

Thanks - could you also navigate to c:\windows\microsoft.net\framework64\ and list the installed frameworks

I’m trying to look for differences in our systems. I did read there can some odd behaviour depending on the frameworks you have installed.

I had seen this issue on my windows 11 laptop a year ago but it went away - probably because a framework or package got installed which resolved it. My next step will be to do a clean install on my laptop and see if I can make the error re-appear if nothing shows up in your setup.

the other long shot is you have a much later version of Windows desktop (8.x) installed compared to mine (6.x). At least one person (with the same issue but caused by a different application) had luck installing the 6.0.29 desktop fwk from https://dotnet.microsoft.com/en-us/download/dotnet/6.0/runtime

franzernst commented 6 months ago

image

Is the screenshot sufficient for you?

mmattner commented 6 months ago

Yes. Thankyou. I’ll put a post together later tonight with a few steps for you to try. I think the issue comes down to fun and games with versions of .net. I managed to get it running on a fresh windows 11 install so think I know the package you need.

mmattner commented 6 months ago

OK, so to summarise what I found. I performed a reset of my Windows 11 laptop to take it back to a factory install. I then installed VPBM onto it and tried to start it and got a dialog saying "To run this application, you must install .NET Desktop Runtime 6.0.5 (x64).

I opted to click yes and install it ... the result was that I was taken to the following URL: https://download.visualstudio.microsoft.com/download/pr/d0849e66-227d-40f7-8f7b-c3f7dfe51f43/37f8a04ab7ff94db7f20d3c598dc4d74/windowsdesktop-runtime-6.0.29-win-x64.exe

I installed that, and then checked my system. When I run dotnet --info I see JUST the following two entries in .NET runtimes installed Microsoft.NETCore.App 6.0.29 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 6.0.29 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

When I looked in c:\windows\microsoft.net\framework64\ I see JUST: image

I can also confirm., that when I look at my Windows 10 Development laptop, I have 9 different versions of Microsoft.NETCore.App and Microsoft.WindowsDesktop.App installed, with 6.0.29 being the latest for both.

Looking at your results, the contents of c:\windows\microsoft.net\framework64\ seem to match mine (assuming everyhing is there. These filesizes of the files in the top level directory there match mine (its notas accurate as a MD5 comparison, but good enough for now). The only think I cant check is if the contents of v4.0.30319 match. IF it helps, I right clicked on mine and it has a size of 193 MB (203,244,983 bytes) - there are 635 files in 33 folders. Looking at the contents of this folder it seems quite likley that this is critical to the app running as it contains a lot of dlls for stuff that I would be using ... VPBM is a WPF application.

So that leaves the results of your dotnet --info command.

MY "guess" here is that its critical that you instal 6.0.29 of the windows desktop ... the link I sent you. You have version 6.0.16, but thats an older version. I suspect if you install 6.0.29 it will sit there alongside 6.0.16 ... because thats what my windows 10 laptop does ... see image below: image

When you install 6.0.29, I expect that not only will it install Microsoft.WindowsDesktop.App 6.0.29 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] - you dont have any version 6 WindowsDesktop.App stuff installed, but it will also add a verson of Microsoft.NETCore.App 6.0.29 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] alongside your existing 6.0.16.

The only other difference that leaves then is that you have some 8.0.4 stuff installed - I dont know the implications of that, so wont advise you to remvoe or keep..... I'm sort of hoping that installing 6.0.29 just works given my windows 10 laptop has 2.x, 3.x, 5.x, and 6.x stuff installed .... if that doesnt work, then I may have totry and intall 8.0.4 and see if that breaks anything with VPBM.

I really hope that helps, let me know how you go as Im very keen to see if it work, or if I have to keep digging.

franzernst commented 6 months ago

That solved my Problem!! Thank you very much for your support! Now I'm looking forward to getting to know VPin Studio and the Backup Manager better. Thank you very much for your work. And sorry for the delay - I'm a little bit ill right now!

syd711 commented 6 months ago

Great that it worked out! I close the ticket then.