2017-01-10 40 views
0

현재 zLib 용 NuGet 패키지 (http://www.zlib.net/)를 만들려고합니다. "grpc zlib"NuGet 패키지 (https://www.nuget.org/packages/grpc.dependencies.zlib/)를 사용하여 폴더 구조를 복사 한 다음 zLib .dll, .lib 및 헤더 파일을 추가했습니다. 작동하고 grpc의 ZLIB 패키지를 사용NuGet 설치 패키지 오류

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

: 난, VS 내 패키지를 설치 한 후 난 다음 얻을 오류를하려고 할 때 https://drive.google.com/file/d/0B_2A8x02vzDwOWVGUmxkeGdBNm8/view?usp=sharing

그러나 :

내 자체 제작 된 ZLIB NuGet 패키지입니다 벌금.

미리 도움을 주셔서 감사합니다.

답변

1

패키지의 어셈블리 및 winmd 파일을 식별하려면 .targets을 추가해야합니다.

오류 및 패키지에 따르면 \ target 폴더 또는 .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 패키지의 대상 파일을 조사하여 파일이 어떻게 보이는지 확인했습니다.

+0

답변 해 주셔서 감사합니다. 당신의 원래 문제에 대한 이유가 밝혀지기 때문에. 도움이되는 답변을 표시하십시오. 이는 동일한 문제가있는 다른 커뮤니티에 도움이됩니다. –