System.ServiceModel References

♀尐吖头ヾ 提交于 2021-01-28 06:40:56

问题


I'm trying to use System.ServiceModel

using System.ServiceModel; 
using System.ServiceModel.Channels;
using System.ServiceModel.PeerResolvers;

in C# winform desktop application, but I can't find it in Visual Studio 2015 to add it to the project References, which must be System.SeviceModel in Framework I guess, not sure

Any advice would be useful


回答1:


Update your project target framework to .NET 4.5 by Right clicking your project, going to properties, then application, then target framework. Change the target framework to .NET Framework 4.5.

In my VS2015 instance, when I go to Add References-> Assemblies, System.ServiceModel is there, and it looks to be in the C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5 folder.

If System.ServiceModel is not in the list, you can attempt to get it via the Right Click-> Manage NuGet packages-> Browse, and search for ServiceModel, get the one from Microsoft.



来源:https://stackoverflow.com/questions/43873476/system-servicemodel-references

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!