Closed logicsdrive closed 4 years ago
Hey @logicsdrive would you be able to share your project file where the dependencies are defined? I believe our SDK depends on System.ComponentModel.Annotations
but version 4.5.0.
What a coincidence, also running into this issue. However, instead of "The located assembly's manifest definition does not match the assembly reference", it is, "The system cannot find the file specified" Edit: this is occurring in an mvc 4.6.1 project.
@StephenJosey We are also running into this issue. We are also using the 4.6.1 .net framework. I have tried building the C# project from this repo and including the DLL in our project AND also getting the packages through nuget. Both result in the System.ComponentModel.Annotations issue.
We have also tried routing the old version to the newer version of Annotations:
`
<assemblyIdentity name="System.ComponentModel.Annotations" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.5.0.0" />
</dependentAssembly>
`
Our packages .config is as follows:
`<?xml version="1.0" encoding="utf-8"?>
This seems to be an issue outside of our SDK. Please see the following thread for a possible fix: https://github.com/dotnet/corefx/issues/33643#issuecomment-482475390
I had the same problem. To fix it you need to go to the properties of System.ComponentModel.Annotations and check false in Specific version.
I had this problem for some time and tried all sorts to no avail. However, I discovered the version showing for Version 4.5.0 in the library reference properties is 4.2.1.0. When I changed the version to 4.4.1 via NuGet, the version in the properties changed to 4.2.0.0. This fixed it for me and was able to load the Swagger UI. I hope you will find this helpful.
I had a problem when updating Service References in an ASP.Net Web Application inside Visual Studio: The WSDL import extension encountered an exception in System.ServiceModel.Description.DataContractSerializerMessageContractImporter, stating it "Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies". As suggested by @tobbyioa I nugot System.ComponentModel.Annotations, 4.4.1, which seems to help for now.
Many thanks to @tobbyioa changing the version of System.ComponentModel.Annotations
to 4.4.1 resolved the issue for me.
Closing this out - work arounds above, but can't be resolved in our SDK.
I am using VS 2017 with .net framework 4.7.2 and when i try to run the application i am getting error "Could not load file or assembly 'System.ComponentModel.Annotations, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference"
When i tried to search for package system.component.Model.Annotations on Gnut there is no version available 4.2.0.0 and then i tried to install 4.3 but it says not compatible with .net framework. Please help what to do ?