dotnet / dotnet/wcf

wcf library components 6.0.0 exception: 'Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.'

Open
#5,287 18 comments 2 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

**Describe the bug**
'Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.'

**To Reproduce**
Steps to reproduce the behavior:
1. Creates a .net application (.net 6.0) using wcf library components System.ServiceModel.** (Http, NetTcp and Duplex, etc.) v4.10.2 [https://github.com/dotnet/wcf/releases/tag/v3.4.1-rtm] and wcf service (.net framework 4.8).
2. .net application registers duplex communication with wcf service.
3. Upgrades wcf library components to [v6.0.0] (https://github.com/dotnet/wcf/releases) from v4.10.2, then it will throw an exception that 'Could not load file or assembly 'System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.'.
4. I tried to fix it through add NuGet package [System.ServiceModel.Primitives](https://www.nuget.org/packages/System.ServiceModel.Primitives/) to reference, but it still have the same error.

**Expected behavior**
It should be worked just like v4.10.2 after upgrading the wcf library components to v6.0.0.

**Screenshots**
![image](https://github.com/dotnet/wcf/assets/144885924/173352c3-961b-46f3-b730-482fb175bda3)

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.