2016-10-11 6 views
0

WiX 설치 관리자와 사용자 지정 작업 프로젝트가 있습니다. 사용자 지정 작업의 프로젝트에 대한 참조로 C# 라이브러리를 추가했습니다. 이 C# dll은 하나의 C++ dll에 DllImport를 사용합니다. 설치시 DLL을로드 할 수 없습니다 : mycpp.dll : 지정된 모듈을 찾을 수 없습니다. 나는 mycpp.dll을 CA 프로젝트에 추가하고 속성을 사용해 보았습니다 : 임베디드 리소스, 출력 디렉토리로 복사 - 결과는 없습니다. 설치 프로그램에서 mycpp.dll을 찾으려면 어떻게합니까?WIX 사용자 지정 작업 : dllimport 사용

답변

1

이전에이 문제가있었습니다. 윅스의 MSBuild에서 파일을 읽은 후 나는 결국 사용자 지정 작업 DLL을 포함하는 자동 압축 풀림 패키지에 필요한 DLL을위한 목록으로 사용되는 속성을 발견했다. makesfxca를 실행할 때 사용되는 CustomActionContents라는 속성이

wix.ca.targets에서 (SDK를 폴더에).

다음은 사용자 지정 작업 DLL을 패키징하는 msbuild 대상 세트에 대한 설명입니다. 당신은 로컬 복사본으로 mycpp.dll에 대한 참조를 표시 할 수 있으며이 될 것입니다 자동으로 선택하거나 사용자 지정 작업에 새로운 속성을 추가 할 수 있습니다 같은

<!-- 
================================================================================================== 
PackCustomAction 

Creates an MSI managed custom action package that includes the custom action assembly, 
local assembly dependencies, and project content files. 

[IN] 
@(IntermediateAssembly) - Managed custom action assembly. 
@(Content) - Project items of type Content will be included in the package. 
$(CustomActionContents) - Optional space-delimited list of additional files to include. 

[OUT] 
$(IntermediateOutputPath)$(TargetCAFileName) - Managed custom action package with unmanaged stub. 
================================================================================================== 
--> 

<!-- 
Items to include in the CA package: 
- Reference assemblies marked CopyLocal 
- Project items of type Content 
- Additional items in the CustomActionContents property 
--> 

그래서 그것은 본다 프로젝트 (아마도 csproj을 편집하고 속성을 추가) DLL에 경로를 포함하고 집어 얻을 것이다.

관련 문제