2017-01-10 9 views
0

現在、zLib用のNuGetパッケージ(http://www.zlib.net/)を作成しようとしています。 "grpc zlib" NuGetパッケージ(https://www.nuget.org/packages/grpc.dependencies.zlib/)を使用してフォルダ構造をコピーしてから、zLib .dll、.lib、およびヘッダーファイルを追加しました。NuGetインストールパッケージエラー

これは私の自己細工zlibのNuGetパッケージです:私はVSに私のパッケージをインストールしようとすると、しかしhttps://drive.google.com/file/d/0B_2A8x02vzDwOWVGUmxkeGdBNm8/view?usp=sharing

その後、私はエラーを次取得:grpcのzlibのパッケージを使用して

Severity Code Description Project File Line Suppression State Error Could not install package 'zlib 1.2.8'. You are trying to install this package into a project that targets 'native,Version=v0.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author. 0

が働いています良い。

ご協力いただきありがとうございます。

答えて

1

パッケージ内のアセンブリおよびwinmdファイルを識別するには、ターゲットを追加する必要があります。

エラーとパッケージに従って、.targets /または.propsが\ buildフォルダにありませんでした。

C++ and JavaScript projects that might consume your NuGet package need a .targets file to identify the necessary assembly and winmd files.

this linkの「ターゲットの追加」の部分を参照してください。

.targetsの詳細情報は、文書内の.targetsコンテンツに焦点を当ててください。Deep Dive into NuGet Native .targetsは、.targetsおよび/または.props拡張子のパッケージIDと同じ名前にする必要があります。

+0

応答ありがとうございました:) –

+0

多分あなたは私からの別の質問を見ることができました。 (http://stackoverflow.com/q/41591797/6172447) –

0

私のNuGetパッケージのポイントは明らかに.targetsファイルがないことでした。 thisthis(@Wendy - MSFTのおかげで)のファイルを追加しました。また、いくつかの既存のzlibパッケージの.targetファイルを見て、ファイルがどのように見えるかを調べました。

+0

お返事ありがとうございます。あなたの元の問題の理由が見つかって以来。有益な答えをマークしてください。これは、同じ問題を抱えている他のコミュニティにとって有益です。 –