Type cannot be resolved because it is an assembly that is not referenced

1

I have several WCF clients each implemented in its own .NetStandard 2.0 assembly. They all execute without issues when referenced from my .NET Framework 4.6.2 MSTEST project. When referenced from my UWP project, however, every client executes as expected, except one of them throws the following exception:

System.TypeLoadException HResult=0x80131522 Message=Type 'generatedProxy_2' from assembly 'ProxyBuilder, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' is attempting to implement an inaccessible interface. Source= StackTrace:

Interestingly, I click on the exception for more information in VS Studio Debugger, I get the following detail:

$exception error CS0012: The type 'FaultException<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ServiceModel.Primitives, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

I added the the latest (4.4.0) System.ServiceModel.Primitives package along with automatic binding redirects to all my wcf projects, including the UWP one, but it didn't resolve the issue. Why is this happening?

c#
.net
wcf
asked on Stack Overflow Dec 12, 2017 by ATL_DEV

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0