.Net 4.6 website not loading Reference Assemblies correctly
Resolution:
My library projects were referencing some core libs (System.*
etc) with the RequiredTargetFramework
option set to 3.5. This was only evident in the csproj file, example:
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
Thus causing all sorts of issues with .net versions, visual studio was trying to sort it by adding binding redirects into my web.config to point these to v4 (and include reference assemblies), unsuccessfully.
Removing all RequiredTargetFramework
elements from the csproj files has solved the problem.
.NET Core vs .NET Framework - Could not load file or assembly 'System.ServiceModel, Reference assemblies should not be loaded for execution
Actually, it turned out to be quite simple!
I had to add a reference to System.ServiceModel.Primitives
nuget in the .NET core application and it started to work all ok!
Related Topics
What Is the Meaning of "This" in C#
How to Programmatically Limit My Program's CPU Usage to Below 70%
Calculating Hmacsha256 Using C# to Match Payment Provider Example
Removing the Delay After Keydown Event
In-Memory Database Doesn't Save Data
Rotate a Graphics Bitmap at Its Center
Determine Operating System in .Net Core
Find Image Format Using Bitmap Object in C#
ASP.NET Identity Cookie Across Subdomains
Dispatcher Invoke(...) VS Begininvoke(...) Confusion
Collection Was Modified; Enumeration May Not Execute Error When Removing a Listitem from a Listbox
Where Is My System.Numerics Namespace
Visual Studio Installer > How to Launch App at End of Installer
Xaml Gridview Itemtemplate Not Binding to Control
Is It Safe for Structs to Implement Interfaces
ASP.NET Dynamically Button with Event Handler