我在我的 ASP.NET MVC 3 Visual Studio 2012 项目中使用 Zendesk C# API Wrapper ( https://github.com/eneifert/ZenDeskApi )。我引用了 ZenDeskApi DLL,在本地调试模式下一切正常。
当我尝试发布网站时,我首先收到以下错误:
Could not load file or assembly '...\Source\Bin\ZenDeskApi.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
然后我尝试添加包附带的 RestSharp.DLL:
Could not load file or assembly '...\Source\Bin\RestSharp.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
然后我尝试添加包附带的 Newtonsoft.Json.NET35.DLL:
Could not load file or assembly ...\Source\Bin\Newtonsoft.Json.Net35.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
问题是否可能是 Newtonsoft.Json.NET35.DLL .NET 3.5 版本?与 MVC 需要的 .NET 4 不兼容?
我下载了 RestSharp 源代码 ( https://github.com/restsharp/RestSharp ) 以尝试将 Newtonsoft.Json 引用更新为 .NET 版本 4.0 (可在此处获得http://json.codeplex.com/ ) 但我的惊喜 RestSharp 没有引用它。
我应该怎么做才能发布我的网站?
谢谢。
编辑:与此同时,我在这里发现了这个 api 的 v2:https ://github.com/eneifert/ZendeskApi_v2但我总是遇到各种 DLLS 的 .NET 版本的问题。如何找到使用 .NET 4.0 的所有必要内容?