2012-01-05 43 views
4

因此,通過搜索互聯網,我設法找到了一個顯然工作的「Google Voice API」。太棒了!我正在開發一個應用程序,用於檢測服務器進程何時崩潰/出錯,然後通過文本通知我。這將是非常有用的,因爲服務器不是完全可靠的,有時需要重置,有時我懶得從沙發上脫下我的屁股/忙着做別的事情。使用Google Voice API編譯C#.NET應用程序

反正API:

http://sourceforge.net/projects/gvoicedotnet/

我加入了DLL作爲裝起來也有智能感知參考,應有盡有。我將dll添加到我的.cs文件中(使用using [哈哈])。在添加完所有內容之後,我決定編譯,以確保它能夠編譯,當然它不會。

的錯誤:

Error 201 The type or namespace name 'Google' could not be found (are you missing a using directive or an assembly reference?)

總之,由於某種原因,在每次編譯它刪除DLL作爲參考?這似乎是一個指標(我懷疑是參與)有些的唯一的事情是這樣的警告

The referenced assembly "Google.Voice.Service, 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". Please remove references to assemblies not in the targeted framework or consider retargeting your project.

TL;博士參考自動保持未引用的成爲。

+0

你可能會發布一些代碼? – 2012-01-05 02:13:08

+0

您的應用程序使用.NET Framework的哪個版本進行編譯? – 2012-01-05 02:16:27

+1

System.Web不支持4個客戶端配置文件。將版本更改爲4.0完整 – kenny 2012-01-05 02:22:59

回答

4

您需要將您的目標框架更改爲完整的.Net 4框架,然後添加對System.Web的引用。

+0

啊好吧,是啊,我想知道爲什麼我有一個客戶資料。如果我已經擴展了,我可以補充一點(當我安裝Visual Studio時,應該已經安裝了這個東西,這就是我問的原因。) – ksandarusi 2012-01-05 02:25:47

+0

是的,你應該能夠改變目標框架。你知道怎麼做嗎? – 2012-01-05 02:27:00

+0

是的,非常感謝你! – ksandarusi 2012-01-05 02:32:15