0

最近、Visual Web Developer2010を使用してASP.NETWebサイトを作成しました。私のコードでは、Googleスプレッドシートにアクセスするために次の参照を使用しています。

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

GitShellを使用してプロジェクトをAppHarborWebサイトにプッシュした後、次のエラーが発生します。

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]

これらのエラーを防ぎ、これらの参照を含めるにはどうすればよいですか?すべての助けをいただければ幸いです。

4

1 に答える 1

1

GAC からこれらの dll を参照しているようです。その場合、AppHarbor のビルド マシンの GAC では使用できないため、アップロードするコード内に dll を含める必要があります。

これを行う簡単な方法の 1 つは、libsフォルダーを作成し (ソリューションが適切な場所であるのと同じレベルに)、必要なすべての dll をそこに配置することです。次に、現在のプロジェクトからこれらの dll への既存の参照を削除し、それらを再度追加しますが、そのlibsフォルダーから追加します。また、これらの参照ごとに、CopyLocalプロパティをに設定する必要がある場合がありTrueます (参照をクリックすると、ソリューション エクスプローラーの下の [プロパティ] タブに CopyLocal が表示されます)。

Copy Local の詳細については、http: //msdn.microsoft.com/en-us/library/vstudio/t1zz5y8c (v=vs.100).aspx を参照してください。

そうすれば、AppHarbor はコードをビルドできるようになります。これは、残りのコードと一緒にアップロードしたばかりのlibsフォルダー内の dll を検索するためです。

于 2012-11-05T04:22:58.613 に答える