Error : add a reference to assembly 'System.ServiceModel, Version=3.0.0.0'

14,452

Solution 1

Make sure that under the Reference Folder of your project you see System.ServiceModel.

Solution 2

This issue might happen when you move your solution from one higher level environment to another. ex: my colleague created it on VS2015 which has this dll automatically generated. then, when i tried to run it on my environment. it shows this error. because my environment does not generate such a library automatically.

Hopefully, you just have to add "System.ServiceModel.ClientBase" manually through "Add reference"

Solution 3

Is one a 64bit environment and the other is a 32bit environment, I have seen cases before when an assembly decides that it will only work on certain platforms, so the "Any CPU" build option is telling it to build in the wrong platform.

Share:
14,452
Mohan Kumar
Author by

Mohan Kumar

Updated on June 04, 2022

Comments

  • Mohan Kumar
    Mohan Kumar almost 2 years

    I can able to build my silverlight 4.0 application in Win xp(IIS 5.1). But when i try to build the same app in Win Server 2008 R2(IIS 7), i am getting the error,

    "error CS0012: The type 'System.ServiceModel.ClientBase`1' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'".

    The path actually it is refereing the dll on both the machines is, "C:\Program Files\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\System.ServiceModel.dll".

    What may be the issue?

    Thanx in advance