开发者

conflicting Dlls

Iam getting following error when iam using 'System.Net.HttpStatusCode' in my wcf project.

The type 'System.Net.HttpStatusCode' exists in both 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\S开发者_运维百科ystem.dll' and 'D:\HKMP\Branch\NewAmelio\amelioSL\Web\Services\bin\System.Net.dll'

HttpResponseMessageProperty property = new HttpResponseMessageProperty();

// Here the response code is changed to 200.

property.StatusCode = System.Net.HttpStatusCode.OK;


In your Visual Studio project do you have the reference to System.Net.dll marked as "Copy Local"? Select the reference in Solution Explorer and then press F4 to open the property grid. You'll want to make sure that Copy Local is set to "false" because this reference is already available on every computer with the .NET Framework installed.

You'll then also want to delete any copy of System.Net.dll that you have in your project folder as well as delete it from source control.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜