简体   繁体   中英

System.ServiceModel disappear

After installing .Net Framework 4.0 it seems like I cannot find System.ServiceModel in .Net tab through "Add Reference..." by using VS2008. But you can see it and add it in VS2010 version.

Can someone tell me why, and how I can have both version, and still can use it in VS2008?

Thanks

If you go to the Visual Studio 2008 or 2010 command prompt (usually under All Programs - Visual Studio 20XX - Visual Studio Tools) and type in:

gacutil /l System.ServiceModel

What do you get back?

If you have VS2008 & VS2010 installed, you should see two items listed (from my Win7 machine that has VS2008 & VS2010 installed):

The Global Assembly Cache contains the following assemblies:
System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL
System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL

Number of items = 2

You should also see if you have System.ServiceModel.dll in C:\\Program Files\\Reference Assemblies\\Microsoft\\Framework\\v3.0 (from ChrisF's comment above). The GAC should be referencing the assembly from there. If you have the DLL there, but don't see it in the GAC, you can add it as a reference from the Add Reference dialog just by browsing to it.

Let me know what you see. I'll try to get back ASAP. Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM