Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception thrown when starting application #210

Closed
TytanRock opened this issue Aug 16, 2022 · 8 comments
Closed

Exception thrown when starting application #210

TytanRock opened this issue Aug 16, 2022 · 8 comments

Comments

@TytanRock
Copy link

Running the dcsfp.exe (as admin or not) for the latest release does nothing.
Starting the application from command line gives the following exception in output:

Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'PresentationFramework, Version=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The located assembly's manifest definition does not match the assembly reference. (0x80131040)
File name: 'PresentationFramework, Version=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

But if I build it from source I can run it myself.

@jdahlblom
Copy link
Contributor

I really have no idea here what is going on.

@TytanRock
Copy link
Author

I went through the releases to see the oldest release that causes this problem, and found that release 4.6.8117.1 works while 4.6.8179.1 does not.

I'd be willing to do more tests back and forth on a per-commit level, but I don't have a way to reproduce it locally. Are there instructions on your release workflow? I may be able to reproduce locally by going through your release and can help narrow it down further.

@jdahlblom
Copy link
Contributor

OK, I think maybe @Mutex666 knows more about this. I just checked the 4.6.8179.1 release and can't find anything special. Did some googling too.
Stackoverflow
One guy apparently had this when doing some XAML changes which is actually done in that release, quite similar to what he describes. But since it works for me so I can't test anything.
Hmm.

@Mutex666
Copy link
Collaborator

Hi, not familiar with this problem but it looks like this kind of error :
dotnet/wpf#6109.
I'll try to follow the workaround and tips and compile a new version with the latest version of the framework to see if it fixes the bug for you.

@Mutex666
Copy link
Collaborator

Hi @TytanRock . I just made a new release trying to fix your problem. I could not reproduce the problem here, can you check if it's working better for you?

https://github.com/DCSFlightpanels/DCSFlightpanels/releases/tag/v4.6.8266.1

Thanks :-)

@TytanRock
Copy link
Author

Sorry, no luck with 4.6.8266.1
Same behavior and exception as in the original post.

@TytanRock
Copy link
Author

I spent more time on this and think I've got a root cause.

First, I was able to reproduce by performing the releases myself, and tested different versions.

  • 6.0.0 Works
  • 6.0.1 Didn't build
  • 6.0.2 and on produced my above problem

Then, some more googling around eventually led me to this PR, where the relevant section is the commit documenting what's going on: dotnet/core#7346

So I checked what libraries I had installed, and saw that my Visual Studio dev environment was on version 17.0.5 with an update for 17.3.1 available. After I updated, 4.6.8266.1 worked!

I don't know what exactly updated to make it all work, but I suspect there's a dotnet package somewhere that users can update and get this to start working. Maybe it'd be worthwhile to document this in the troubleshooting section and detail my fix? Or if you know of a package that may be related, point users to that to update the relevant package?

Thanks for the help!

@Mutex666
Copy link
Collaborator

Hmm,

Must be a rare coincidence of installed SDK version with visual studio, compilation of the program with a bugged 6.0.2 framework and maybe other ? In the latest build I forced the framework to 6.0.4 on DCSFP project only, I should have maybe use the 6.0.0 version but for that I must also force the framework on the projects NonVisuals & ClassLibraryCommon.

I think that the fact that you updated to the latest version of Visual studio , it also installed the .net 6.0.4, maybe that solved the issue somehow.

Since I'm not a fan of forcing framework in the projet file, I'll post during a W-E a new version on master without the line so that we go back in the 'normal' state and hopefully the future new release will work for you. If not, we always have the option to force the framework usage to 6.0.0 in the 3 projects file and hope for the best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants