2012-04-17 9 views
1

NuGetパッケージリストアとともにPostSharpをソースリポジトリにデプロイすることは可能ですか? ポストシャープパッケージをコミットすることでこれが動作することができますが、これはパッケージ復元機能の値をいくらか無効にします。NuGetパッケージリストアを使用してPostSharpをソースリポジトリにデプロイ

ここに私がしたことがあります。 Deploying post sharp into a source repo

  • 私はそうのようにコミットせずに使用するようにナゲットを設定している:Using NuGet Without Committing Packages to Source Control

  • 私は私のcsprojでこれを見、私はそうのようなpostshapを設定しようとしていた

    • <Import Project="..\packages\PostSharp.2.1.6.13\tools\PostSharp.targets" /> 
      <Import Project="$(SolutionDir)\.nuget\nuget.targets" /> 
      

      (私は無駄にEM)

      そして、私のビルドサーバー(CC.net)は、次のエラーを報告します。

      D:\wwwroot\www.snip.co.nz\http\www.snip.co.nz.csproj (714,3): 
      
      errorMSB4019: The imported project  "D:\wwwroot\www.snip.co.nz\packages\PostSharp.2.1.6.13\tools\PostSharp.targets" was not found. Confirm that the path in the &lt;Import&gt; declaration is correct, and that the file exists on disk. 
      
      CacheAttribute.cs (8,7): 
      errorCS0246: The type or namespace name 'PostSharp' could not be found (are you missing a using directive or an assembly reference?) 
      …etc… 
      

    答えて

    1

    あなたは現在(v2.1.6.13)がパッケージの復元をサポートするためにcsprojを修正する必要があり、 インポートターゲット要素内に、ここに示す条件を追加します。

    <Import Project="..\packages\PostSharp.2.1.6.13\tools\PostSharp.targets" 
        Condition="Exists('..\packages\PostSharp.2.1.6.13\tools\PostSharp.targets')" /> 
    
    関連する問題