Reuse of Types not working with WCF dotnet-svcutil tool for .NET Core
- Dominant language
- C#
- Stars
- 1.8k
- Forks
- 576
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 2
Description
**Common Types in assembly references are not reused**
**To Reproduce**
1- I produced the common types from Common.xsd with xsd.exe in C# classes:
C:\Users\xxx\source\repos\BrokerSln\Broker\WSDL\uAPI_WSDLschema_Release-V19.2.0.12>xsd.exe /c common_v49_0\Common.xsd /namespace:Broker /out:..\\..\\..\\CommonBroker\Common\
I made sure to have the namespace called **Broker**
2- I added the classes in the class library project called CommonBroker of target framework .Net Standard 2.0

I compiled the project with no problem.
I expect the type **Broker.typeErrorInfo** to be reused.

3- I added a new class library project called Broker of target framework .Net Standard 2.0
The project references the CommonBroker project

I add a new WCF reference

I also make sure the namespace is **Broker**

We can see the project CommonBroker is in the reused types

I generate the code

And unfortunately the type **Broker.typeErrorInfo** is generated again in Reference.cs

How can we make sure the tool can spot the reused types in our assembly?
Thanks for your help
Contributor guide
Assessment
This issue has not been assessed yet.