dotnet / dotnet/wcf

dotnet-svcutil tool sometimes makes public types when specifying /internal

Open
#5,894 1 comment 0 reactions 1 assignee Claimed by @imcarolwang View on GitHub
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

I've attached a repro for the problem. In an empty console app with the wsdl from the zip file saved to the project root, run the following command:
```
dotnet-svcutil MinimalRepo.wsdl -d MinimalRepro --internal
```
This will generate a file MinimalRepro\Reference.cs which has the type Data which has been created as a public type and not internal as specified. This has a property called `DataRecords` which is of type `ArrayOfXElement` which has been generated as an internal type. This causes a compilation error as a public type has a public member which references an internal type, which is invalid.

[MinimalRepo.zip](https://github.com/user-attachments/files/25028587/MinimalRepo.zip)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.