Add link to web link from project - ChannelBase not found

I am creating a Silverlight application. Since I have classes that will be consumed by Silverlight and .NET modules, I created a Silverlight project with all the classes in it, and then linked the .NET project (Add Link) with the classes in the Silverlight project. Thus, I have one class file compiled separately as Silverlight and .NET assemblies. I want to repeat the same for web service links. Meaning, I have web links in a Silverlight project. I am trying to add a reference.cs link from a Silverlight project to a .NET project. When I compile a .NET project, the ChannelBase class cannot be resolved, it seems, due to a mismatch in the class definition in the Silverlight and .NET platform libraries. This results in a compilation error indicating unresolved ChannelBase. Sounds like a dead end to me.Do you see a way to solve this problem?

+3
source share
2 answers

I am afraid that this is impossible. Both proxies are completely different: one of them is synchronous, and the other is not.

The best you can do is to separate the classes defined by the service, and not the whole proxy. Just create these classes in advance, use "Add as link" to reuse them in both projects, and then, adding a link to the service, check the "Reuse types in reference assemblies" option.

+1
source

- . . -, slsvcutil.exe .net monotouch. ChannelBase not found. . , CookieContainer - , low , , - monotouch.

+1

Source: https://habr.com/ru/post/1767078/


All Articles