System.ServiceModel.Primatives v4.8.1.0 Manifest Definition Mismatch #13868
Comments
This problem is still present with VS Version 16.9.0 Preview 5.0. |
@alaskanrogue can you attach a reproduction please? |
@PureWeen Shane, I will try to produce one. It may take a few days. |
@PureWeen See attached zip. It contains two solutions. The one with the lower version is operational. The one with the higher version has the new NuGet's and demonstrates the issues, but because of the downsizing of the solution they are being shown as warnings about conflicts, so the app will not break. One note: When debugging either, there will be an error related to this extension entry in the manifest:
|
Hi, @alaskanrogue - would you mind clarifying what the versions you're working with are? Which was the one that was functional and which was the one where you noticed this issue? (I checked out your repro, and it seemed to me that both projects were on 5.0 and failing to build) |
Hello @rachelkang The Sentry_v4-5-3 solution should be operational and the Sentry_v4-8-1 solution should not be. As previously stated, when debugging either, there will be an error related to the following extension entry in the manifest. Delete the extension before building and debugging. (It needs to be deleted repeatedly.) This may be the cause of the failures occurring in both solutions at this moment.
|
@alaskanrogue - thanks for clarifying! I'm able to build now and run now on 5.0 without any issues. I can't see anything about |
@rachelkang Are you saying you have upgraded the As to your question, I don't recall those warnings, just the error which prompted this problem report. |
I seem to be struggling with this problem for at least half a year now now. I have also found similar issues from a long way back. Some details.
So please, address this problems as soon as possible. It has been very frustrating to see announcements of a solution in an upcoming Visual Studio, which turned out to be no solution at all! |
This issue has been moved from a ticket on Developer Community.
[severity:Other]
Based on closure and suggested transfer of problem https://developercommunity2.visualstudio.com/t/SystemServiceModelPrimatives-v4810/1325403?entry=myfeedback&ref=native&refTime=1612915194643&refUserId=1f64de6b-9dbf-42ff-ab5b-9e1204f4baa5 and the subsequent closure and suggested transfer back of the problem https://github.com/dotnet/wcf/issues/4523, this problem is reopened here.
When attempting to run a Xamarin.UWP application on Windows v19941.746 with VS 16.9.0 Preview 3.0, I am encountering the following error:
System.IO.FileLoadException HResult=0x80131040 Message=Could not load file or assembly ‘System.ServiceModel.Primitives, Version=4.8.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
A similar error occurs with an Android simulator or phone:
System.TypeLoadException: ‘Could not load type of field ‘Sentry.ISoapServices:SoapClient’ (0) due to: Could not load file or assembly ‘System.ServiceModel.Primitives, Version=4.8.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies.’
The error is not present in debugging an iPhone. The problem was present in v4.8.0.0.
Currently the GAC references the v4.0.0.0 NuGet’s. With the upgrade, the solution and project config files reference the new version, but not the GAC.
Based on the comments in the original problem report, I downgraded to v4.3.0.0 which allows the UWP app to run (not sure why), but not the Androids which reference v4.1.1.0. Downgrading to 4.0.0.0 is not Net.Standard 2.0 compatible. Upgrading to v4.6.0.0 which is NS2.0 compatible results in the current issues. Upgrading to v4.7.0.0 has the same results. As another experiment, I manually replaced the related NuGet's in the GAC with the current versions. Same results.
It appears digging deeper that issue is related to Microsoft.Common.CurrentVersion.targets Line 2181 and the assemblies being resolved against.
As an experiment, removing all "ServiceModel" NuGet's across all five solution projects, cleaning and re-building, I responded to the errors reported by only re-installing the NuGet's necessary to the PCL project. Because of the earlier discovery, I used the v4.1.1.0 versions of the NuGet's. The error is not present in either UWP or Android now.
With it's release, VS v16.9.0 Preview 4.0 is now in use and the problem persisted.
The question in my mind is if the GAC and the assemblies list above are being updated during the NuGet's installations?
The previous problem reports have log files and screen shots of the various builds attached.
Original Comments
Feedback Bot on 2/14/2021, 00:56 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Marc W. George on 2/16/2021, 11:48 AM:
In researching, I discovered the attached .targets file at C:\Windows\Microsoft.NET\Framework64\v4.0.30319. Examining it, I found these specifications for System.ServiceModel.Primitives which don’t list 4.8.1 nor previous v4.x versions that I have used, so I don’t believe it is the active targets specification.
What I need to know is how to determine which “.targets” file is active so I can examine it. I have 3,524 .target files on my system, but only 5 targeting System.ServiceModel, which all are from 2019. The project was set to use .NET Standard 2.0 for which I don’t find a .targets file. I just upgrade to v2.1 to see if this would help. Is this file associated?
Microsoft.ServiceModel.zip
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: