WCF service reference Visual Studio 2022 duplicates .DLL types

Рейтинг: 0Ответов: 1Опубликовано: 15.08.2023

Everyone! My app is a Client for WCF hosted at local machine. According to wcfapp instruction, I added 1) a reference to wcf service; 2) a reference to WCFApp.dll. After adding reference to wcf service, vs community 2022 generated too much types, that duplicate such one in WCFApp.dll. The same steps in VS 2015 creates only 3 interfaces and 1 class - exactly what is needed, without any further type conflicts in code. I tried

  • first dll, then build app, then reference to service - in all the step combination
  • set the wcf reference in multiple type using only in WCFapp.dll assembly

Who ever faced the same problem? Is there another way to set wcf reference in VS2022 project, may be, handly? Thanks for attention

Ответы

▲ 0

На данный момент пришел вот к какому решению: вручную очистил файл references.cs от задублированных типов. В процессе очистки ориентировался на результат в VS2015 (нужные типы). Где необходимо, заменил в этом же файле пространство имен проект.WCFreference на WCFApp (название библиотеки DLL). Проект скомпилировался, запустился, методы API работают.