-
Notifications
You must be signed in to change notification settings - Fork 424
.Net Plaform Standard implementation on .Net 4.7 has version inconsistency for System.Net.Http #558
Comments
mm I'm not sure why do you think this is a problem related to System.Net.Http. I believe that the problem has more to do with the fact that you are trying to use reflection to load a library that was compiled against .net standard 1.6. @weshaggard can probably provide more info here, but I believe that everytime that you try to use reflection to load an assembly, you should do it using the runtime for which the assembly was targeting. |
Any help on the above issue will be much appreciated. |
I'm tracking related issues and information in a list. They are related to System.Net.Http, System.Runtime, System.IO, System.ValueTuple, System.Buffers and others. https://github.com/dotnet/corefx/issues/32587 .NET 4.7.2 helps with some but not all of these. You can look at my comments on some of these issues for some ideas on how to work around those problems. I also have a central list of ideas to try. |
Closing as dupes of the issues listed in the above comment |
I have been using WCF service with .Net 4.7 version and it has project reference of Standard library with version 1.6. If I am using reflection getting bellow error
System.IO.FileLoadException: 'Could not load file or assembly 'System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)'
Code which generates error:
Type type = (from assembly in AppDomain.CurrentDomain.GetAssemblies()
where assembly.GetName().Name == "TestStandard"
select assembly.GetType("MoE.ERS.DTO.ResourceRequests.PlaygroupResourceRequestDTO")).FirstOrDefault();
I have attached sample project reference for which i am getting below error. Also i tried binding redirect in Web.config and still no luck.
Any quick help will be much appreciated.
WcfService1.zip
The text was updated successfully, but these errors were encountered: