-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[release/7.0] Could not load file or assembly System.Text.Json Version=7.0.0.0,or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) #77988
Comments
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsBuild InformationBuild: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=72698 Error MessageFill the error message using known issues guidance. {
"ErrorMessage": "The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)",
"BuildRetry": false
}
|
@dotnet/area-system-text-json this is an error coming from System.Text.Json btw. |
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis Issue DetailsBuild InformationBuild: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=72698 Error MessageFill the error message using known issues guidance. {
"ErrorMessage": "The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)",
"BuildRetry": false
}
|
Another 7.0 PR affected (unrelated change: it is just bumping the emscripten dependencies): #77818 |
Also showed up in the PR to update the arcade dependencies in 7.0: #78107 Queue:
|
It seems this problem started after this 7.0 PR got merged: #73737 which introduced some System.Text.Json code in the affected tests. Pinging @dotnet/area-extensions-logging for help fixing this. |
Tagging subscribers to this area: @dotnet/area-extensions-logging Issue DetailsBuild InformationBuild: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=72698 Error MessageFill the error message using known issues guidance. {
"ErrorMessage": "The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)",
"BuildRetry": false
} Report
Summary
|
CC @eerhardt |
That PR was merged 3 months ago. How would that have caused this to start happening in the past week? |
Hmm I can be wrong too. But it's the last change that this test project received in 7.0, and the addition of S.T.Json code was a big coincidence. I am also not seeing the same problem in any other test projects (so far). |
All the failures appear to be on .NET Framework. My suspicion is that something changed in the build infra or on .NET Framework that caused this to start failing. I don't think a PR from 3 months ago would have caused this, unless it has been failing for the last 3 months. |
Looks like the |
Could it be desktop binding redirect issue? @carlossanlop do you know if there any other tests failing for the same reason? CC @ericstj |
Yes - that is what I am saying above. To investigate this, I would download the test .zip file, and inspect which assembly is compiled against |
|
I knew this looked familiar. I remember looking at it with @eerhardt. Do you recall doing anything about it in 6.0? Perhaps the smallest change here would be to not use the reference assembly projects for p2ps when IsPackable is true (since, after all we aren’t going to ship them in that case), or perhaps as a smaller change just do that for net4x configurations. |
I actually think that the smallest change to fix this would be just to set two properties in order to make sure that auto binding redorects are created correctly. I haven't been able to validate this as I'm away from my desk but I'll try it out in a bit. |
If we can build against correctly versioned reference we should. Reduce the cases where we require redirects. |
That's fine by me. That said, that's a change that probably should be made in main first and later cherry picked to release branch. I would suggest to, in the mean time, merge the pr I have opened in release that would fix the build and tests by generating redirects, and we can later remove that once we have the reference version fixes ready. |
Tagging subscribers to this area: @dotnet/area-infrastructure-libraries Issue DetailsBuild InformationBuild: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=72698 Error MessageFill the error message using known issues guidance. {
"ErrorMessage": "The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)",
"BuildRetry": false
} Report
Summary
|
I thought I remembered this issue as well, but couldn't find it last week. For release/6.0 to work around the issue, I did this: Lines 21 to 25 in ce7aaec
|
Manual backport of c8503d3 Fixes dotnet#77988 Unblocks dotnet#78532 Introduce the AnnotateTargetPathWithContract switch to make it configure-able when a source project should return the reference project's assembly instead of the source assembly, when other projects compile against it. Set it so that reference assemblies are only returned for NetCoreAppCurrent tfms or when the project isn't packable. - Fix System.DirectoryServices.AccountManagement build System.DirectoryServices.AccountManagement now builds against src/System.DirectoryServices instead of ref/System.DirectoryServices (because the package doesn't contain the ref assembly). Because of that, the compiler now gets confused because of the System.DirectoryServices.Interop namespace and the global Interop class. This happens even though the DirectoryServices.Interop namespace doesn't include any public types. That results in the following errors: src\libraries\System.DirectoryServices.AccountManagement\src\System\DirectoryServices\AccountManagement\AD\SidList.cs(50,26): error CS0246: The type or namespace name 'SID_AND_ATTRIBUTES' could not be found (are you missing a using directive or an assembly reference?) src\libraries\System.DirectoryServices.AccountManagement\src\System\DirectoryServices\AccountManagement\interopt.cs(439,20): error CS0246: The type or namespace name 'UNICODE_INTPTR_STRING' could not be found (are you missing a using directive or an assembly reference?) This commit fixes that by removing the System.DirectoryServices.Interop namespace and moving the types into the parent namespace. - Suppress nullable warnings in Serialization.Schema Now that Schema compiles against the source assembly of System.CodeDom, it receives nullability errors. I'm suppressing them manually for now but am filing an issue to correctly fix those. Related: dotnet#78036
Manual backport of c8503d3 Fixes #77988 Unblocks #78532 Introduce the AnnotateTargetPathWithContract switch to make it configure-able when a source project should return the reference project's assembly instead of the source assembly, when other projects compile against it. Set it so that reference assemblies are only returned for NetCoreAppCurrent tfms or when the project isn't packable. - Fix System.DirectoryServices.AccountManagement build System.DirectoryServices.AccountManagement now builds against src/System.DirectoryServices instead of ref/System.DirectoryServices (because the package doesn't contain the ref assembly). Because of that, the compiler now gets confused because of the System.DirectoryServices.Interop namespace and the global Interop class. This happens even though the DirectoryServices.Interop namespace doesn't include any public types. That results in the following errors: src\libraries\System.DirectoryServices.AccountManagement\src\System\DirectoryServices\AccountManagement\AD\SidList.cs(50,26): error CS0246: The type or namespace name 'SID_AND_ATTRIBUTES' could not be found (are you missing a using directive or an assembly reference?) src\libraries\System.DirectoryServices.AccountManagement\src\System\DirectoryServices\AccountManagement\interopt.cs(439,20): error CS0246: The type or namespace name 'UNICODE_INTPTR_STRING' could not be found (are you missing a using directive or an assembly reference?) This commit fixes that by removing the System.DirectoryServices.Interop namespace and moving the types into the parent namespace. - Suppress nullable warnings in Serialization.Schema Now that Schema compiles against the source assembly of System.CodeDom, it receives nullability errors. I'm suppressing them manually for now but am filing an issue to correctly fix those. Related: #78036
Fixed by #78730 |
Build Information
Build: https://dev.azure.com/dnceng-public/cbb18261-c48f-4abb-8651-8cdcb5474649/_build/results?buildId=72698
Build error leg or test failing: Microsoft.Extensions.Logging.Console.Test.ConsoleLoggerTest.AddConsole_IsOutputRedirected_ColorDisabled
Pull request: #77187
Error Message
Fill the error message using known issues guidance.
Report
Summary
The text was updated successfully, but these errors were encountered: