2017-05-23 9 views
0

하늘색 웹 역할을 실행중인 tweetinvi를 사용하여 api 요청을 시도하면 아래 오류가 발생합니다.tweetinvi가 로컬 호스트에서 작동하지만 하늘색 서버에서 dll 오류가 발생 함

은 ' 버전 = 2.6.10.0, 문화 = 중립, PublicKeyToken은 = b03f5f7f11d50a3a System.Threading.Tasks'또는 해당 종속성 중 하나를 파일이나 어셈블리를로드 할 수 없습니다. 시스템이 지정된 파일을 찾을 수 없습니다.

나는이 DLL의 nuget 패키지를 설치했는데, 그때 (같은 유형이 두 위치에서 선언 된) 분명히, system.threading.tasks에서이 mscorlib.dll

.NET 버전의 내부에 번들로 제공하기 때문에 컴파일 오류가 발생합니다 : 4.5

tweetinvi 버전 : v4.0.30319 강력한 이름

답변

1

난 당신이 tweetinvi 버전을 언급 한 가정은 런타임 버전입니다. TweetinviAPI을 사용하여 데모를합니다. 그것은 내 편이 제대로 작동합니다.

1.Create cloudservive 프로젝트와 WebRole로 : 가능한 경우,

다음

내 세부 단계입니다 .. 다시 다시 배포하거나 다시 테스트 할 수있는 새로운 cloudservie를 만드는 시도를하시기 바랍니다.

Nuget

enter image description here

3.Create Tweetinvi 응용 프로그램 (https://apps.twitter.com/)와 tweetinvi 2.Reference

소비자 키, 소비자 비밀, 액세스 토큰, 액세스 토큰 비밀을 얻을

enter image description here 4. HomeController About()에 다음 코드를 추가하여 테스트하십시오.

Auth.SetUserCredentials(string consumerKey, string consumerSecret, string userAccessToken, string userAccessSecret); 

      // Publish the Tweet "Hello Tweetinvi" on your Timeline 
      Tweet.PublishTweet("Hello Tweetinvi! "); 

애저에 cloudservice 및 방문 (http://xxxxx.cloudapp.net/Home/About가) 시험 결과를 얻을 5.Publish

. 트위터에서

6.Check, 그것은 제대로

enter image description here

작동