Исходный код вики Генерация клиента
Редактировал(а) Alexandr Fokin 2023/01/05 20:38
Скрыть последних авторов
| author | version | line-number | content |
|---|---|---|---|
| |
4.3 | 1 | |(% style="width:349px" %)((( |
| 2 | ===== Вариант 1. | ||
| 3 | Используя инструмент [[VisualStudio>>doc:Разработка.NET.VisualStudio.WebHome]] (UI) ===== | ||
| 4 | )))|(% style="width:1144px" %)Use the WCF Web Service Reference Provider Tool | ||
| |
1.1 | 5 | https://docs.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide |
| |
4.3 | 6 | |(% style="width:349px" %)((( |
| 7 | ===== Вариант 2. | ||
| 8 | Используя утилиту dotnet-svcutil (CLI) ===== | ||
| 9 | )))|(% style="width:1144px" %)((( | ||
| 10 | (% id="cke_bm_629S" style="display:none" %) (%%)WCF dotnet-svcutil tool for .NET Core | ||
| |
1.1 | 11 | https://docs.microsoft.com/en-us/dotnet/core/additional-tools/dotnet-svcutil-guide?tabs=dotnetsvcutil2x |
| 12 | |||
| 13 | dotnet-svcutil | ||
| 14 | https://www.nuget.org/packages/dotnet-svcutil | ||
| 15 | |||
| |
4.3 | 16 | ---- |
| 17 | |||
| |
1.1 | 18 | 1) Установить инструмент |
| |
4.3 | 19 | {{code language="cmd"}}dotnet tool install --global dotnet-svcutil --add-source https://api.nuget.org/v3/index.json --ignore-failed-sources{{/code}} |
| |
1.1 | 20 | |
| |
2.1 | 21 | 2) Сгенерировать клиентский код |
| |
4.3 | 22 | {{code language="cmd"}}dotnet-svcutil http://contoso.com/SayHello.svc{{/code}} |
| 23 | ))) |