How to resolve compile errors after adding a WCF net tcp service reference in .Net Core Console App

Bob Hanson 46 Reputation points
2021-06-29T20:58:04.433+00:00

Hello all,

After I was able to add a WCF net tcp service reference to my .Net Core Console App targeting .Net 5, under the Dependencies -> Assemblies, System.ServiceModel is listed but has a yellow triangle.

When I checked the Microsoft Learn on this, there was mention it would add needed Nuget packages but non are listed for the project.

110306-test-core-console-app-adding-wcf-net-tcp-endpoint.png

Please advise and thanks for your help,

Bob

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,461 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,131 questions
0 comments No comments
{count} votes

Accepted answer
  1. Theobald Du-MSFT 326 Reputation points
    2021-06-30T03:04:26.123+00:00

    Hi @Bob Hanson ,

    1. Find the Manage Nuget Packages option in the drop-down box of the project option above.
    2. Enter Nugetpackagemanager, search for System.ServiceModel in the search box in Browse to find the corresponding nuget package.
    3. Install it for the project.

    ----------

    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Theobald Du

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful