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

Issue building with Windows Desktop 6.0.2 #6109

Closed
RussKie opened this issue Feb 10, 2022 · 6 comments
Closed

Issue building with Windows Desktop 6.0.2 #6109

RussKie opened this issue Feb 10, 2022 · 6 comments
Assignees
Labels
regression status: This issue is a regression from a previous build or release

Comments

@RussKie
Copy link
Member

RussKie commented Feb 10, 2022

After updating to 6.0.2 you may experience issues running WPF apps built against 6.0.2 on 6.0.0 or 6.0.1 runtime with the following error.

CoreCLR Version: 6.0.121.56705
.NET Version: 6.0.1
Description: The process was terminated due to an unhandled exception.
Exception Info: 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'

For an available workaround please refer to dotnet/core#7176.

@dotMorten
Copy link
Contributor

dotMorten commented Feb 11, 2022

We're hitting this too. Didn't happen with 6.0.1. If we build a class library with 6.0.2, then try and consume it in an application built on a PC with 6.0.0 or 6.0.1 on it (ie haven't update VS yet), the compilation will fail.

CSC : error CS1705: Assembly 'MyClassLib' with identity 'MyClassLib, Version=1.2.3.0, Culture=neutral, PublicKeyToken=8fc3cc631e44ad86' uses 'PresentationFramework, Version=6.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'PresentationFramework' with identity 'PresentationFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

@FG-rgb
Copy link

FG-rgb commented Mar 8, 2022

Hello, is there a possibility to tell visual studio 2022 (v 17.1.0) to explicitly build with .net 6.0.0 or 6.0.1 instead of 6.0.2?

@RussKie
Copy link
Member Author

RussKie commented Mar 9, 2022

6.0.3 has been released today, please consider updating. Also check dotnet/core#7176 for suggested workarounds.

@Molinarius
Copy link

I see exactly the same issue after updating to Visual Studio 17.1.1, .NET 6.0.3, .NET SDK 6.0.201, on 2 different computers.

@FG-rgb
Copy link

FG-rgb commented Mar 9, 2022

Me too. A helping workaround is using a global.json in solution dir:

{
"sdk": {
"version": "6.0.100",
"rollForward": "disable"
}
}

@RaulFunezp
Copy link

Thank you FG-rgb

After several weeks trying to solve this problem with the other suggestions your workaround works fine for me using a global.json and version 6.0.103.

I am using WPF, .NET 6.0.3, .NET SDK 6.0.201.

Me too. A helping workaround is using a global.json in solution dir:

{ "sdk": { "version": "6.0.100", "rollForward": "disable" } }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression status: This issue is a regression from a previous build or release
Projects
None yet
Development

No branches or pull requests

6 participants