簡體   English   中英

AppHarbor ASP.NET Google Spreadsheets托管

[英]AppHarbor ASP.NET Google Spreadsheets Hosting

我最近使用Visual Web Developer 2010創建了一個ASP.NET網站。在我的代碼中,我正在使用這些引用來訪問Google Spreadsheets:

Google.GData.Client
Google.GData.Extensions
Google.GData.Spreadsheets

使用Git Shell將項目推送到AppHarbor網站后,我收到以下錯誤:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Google.GData.Client". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\temp\orluajnw.mop\input\DVPT\DVPT\DVPT.csproj]
     C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Google.GData.Extensions". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\temp\orluajnw.mop\input\DVPT\DVPT\DVPT.csproj]
     C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1578,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "Google.GData.Spreadsheets". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. [D:\temp\orluajnw.mop\input\DVPT\DVPT\DVPT.csproj]

如何防止這些錯誤並包括這些參考? 所有幫助將不勝感激。

看來您可能是從GAC引用了這些dll。 在這種情況下,由於它們不會在AppHarbor的構建計算機的GAC中提供,因此您必須將dll包含在上載的代碼中。

一種簡單的方法是創建一個libs文件夾(在您的解決方案所在的同一級別上,這是一個不錯的位置),並將所有必需的dll放在此處。 然后從當前項目中刪除對這些dll的現有引用,然后從該libs文件夾中再次添加它們。 另外,對於這些引用中的每個引用,可能有必要將CopyLocal屬性設置為True (如果單擊引用,則在解決方案資源管理器下方的“屬性”選項卡中將看到CopyLocal)。

可以在以下位置找到有關“復制本地”的更多信息: http : //msdn.microsoft.com/zh-cn/library/vstudio/t1zz5y8c(v=vs.100).aspx

這樣,AppHarbor將能夠構建代碼,因為它將在您剛剛上載的libs文件夾中查找那些dll,以及其余的代碼。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM