我已经通过添加引用添加了dll,并使用了derective,但仍然给我错误找不到类型或名称空间名称" SSCommuniLib"(您是否缺少using指令或程序集引用? ?)我正在Windows服务中使用类库. 我多次删除并添加了dll,但仍然无法正常运行. 警告1无法解析引用的程序集"SSCommuniLib,版本= 1.0.0.0,区域性=中性,processorArchitecture = MSIL",因为它依赖于"System.Web,版本= 4.0.0.0,区域性=中性,PublicKeyToken = b03f5f7f11d50a3a ",它不在当前目标框架".NETFramework,Version = v4.0,Profile = Client"中. LeadsolarService
I have added the dll by adding reference as well as used using derective but still it is giving me error "The type or namespace name ''SSCommuniLib'' could not be found (are you missing a using directive or an assembly reference?)" I am using a class library in my windows service . I removed and added the dll several times but still it is not working. Warning 1 The referenced assembly "SSCommuniLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". LeadsolarService
推荐答案您可以尝试将项目(类库和主项目)的.NetFramework版本都更改为4吗? .您可能需要添加System.web以使您的类库可行. 转到项目"->应用程序"->目标框架"的属性. Can you please try to change the .NetFramework version to 4 for both the project(the class library,and the main project). You might need to add System.web to make workable of your class library. Go to the Properties of the Project->Application->Target Framework.
更多推荐
在其他项目中使用类库的dll
发布评论