.net System.ServiceModel.Web.dll 在哪里?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1825417/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Where is System.ServiceModel.Web.dll?
提问by Konamiman
I am developing a Windows service that exposes a WCF service intended to be consumed by a Silverlight application, as explained in this blog post: http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/03/27/10291.aspx
我正在开发一个 Windows 服务,该服务公开旨在由 Silverlight 应用程序使用的 WCF 服务,如本博客文章所述:http: //mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/03/27/10291 .aspx
The problem I am facing is that I need to use the WebInvoke attribute, which is defined in the System.ServiceModel.Web.dllassembly, but when I try to add a reference to that assembly in the project (by using Visual Studio's Add Reference dialog - .NET tab), there is no assembly with that name.
我面临的问题是我需要使用在程序集中定义的WebInvoke 属性,System.ServiceModel.Web.dll但是当我尝试在项目中添加对该程序集的引用时(通过使用 Visual Studio 的添加引用对话框 - .NET 选项卡),没有具有该名称的程序集。
So, am I doing something wrong, this assembly is not part of the standard .NET Framework, or it is a bug in Visual Studio? By the way I'm using VS2010 beta 2 and the project targets .NET Framework 4.
那么,我做错了什么,这个程序集不是标准 .NET Framework 的一部分,还是 Visual Studio 中的一个错误?顺便说一下,我使用的是 VS2010 beta 2,并且该项目的目标是 .NET Framework 4。
回答by MattC
Are you targetting .NET4 Full or Client Profile? The latter does not include the System.ServiceModel.Web assembly.
您的目标是 .NET4 Full 还是 Client Profile?后者不包括 System.ServiceModel.Web 程序集。
回答by Hemant
Apparently when you select .NET framework 4.0 while creating the project, Visual Studio 2010 Beta 2 actually targets .NET framework 4 client profile. Change the target framework to .NET framework 4using project properties.
显然,当您在创建项目时选择 .NET framework 4.0 时,Visual Studio 2010 Beta 2 实际上针对 .NET framework 4 client profile。使用项目属性将目标框架更改为.NET framework 4。
回答by Sujoy
Please look at the following folder for System.ServiceModel.Web.dll
请查看以下文件夹 System.ServiceModel.Web.dll
C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\
C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\
回答by Yudi Tri Wibowo
I use Visual Web Developer and facing the same issue. My project is already configured targetting .Net 4.0 Framework. The solution for my case is adding reference to my my project by :
我使用 Visual Web Developer 并面临同样的问题。我的项目已经针对 .Net 4.0 框架进行了配置。我的案例的解决方案是通过以下方式添加对我的项目的引用:
right click on References, choose Add Reference and find System.ServiceModel.Web under .Net Tab
右键单击 References,选择 Add Reference 并在 .Net 选项卡下找到 System.ServiceModel.Web
回答by Augusto Humire Martinez
Check your project properties and on the Application tab make sure you have selected the full ".NET FRAMEWORK" and not ".NET FRAMEWORK CLIENT PROFILE" in the target framework combo.
检查您的项目属性,并在“应用程序”选项卡上确保您在目标框架组合中选择了完整的“.NET FRAMEWORK”而不是“.NET FRAMEWORK CLIENT PROFILE”。
回答by user838291
You can find the configuration with the below steps.
您可以通过以下步骤找到配置。
Right Click Project in Solution Explorer
Choose Properties
Choose CompileTAB on the left
At the end of the compile page click Advanced Compile Option*s Button, this will bring up the A*dvanced Compiler Settings
The last control is a drop down reading "Target framework(all configurations)
在解决方案资源管理器中右键单击项目
选择属性
选择左侧的编译选项卡
在编译页面的最后点击Advanced Compile Option* s 按钮,这将调出 A*dvanced Compiler Settings
最后一个控件是一个下拉阅读“目标框架(所有配置)”
回答by SohelElite
Add the following reference to your project
将以下引用添加到您的项目中
System.ServiceModel.Web.dll
If you are not able to find System.ServiceModel.Web in - 'Add Reference' click on Component Name to sort the list.
如果在“添加引用”中找不到 System.ServiceModel.Web,请单击“组件名称”以对列表进行排序。


