How do I deploy XULRunner folder to output directory after installing abcpdf gecko via nuget?

StackOverflow https://stackoverflow.com/questions/15077650

  •  11-03-2022
  •  | 
  •  

Pergunta

I installed the ABCpdf.ABCGecko package via nuget, and it gave me this dialog:

Finished! Please deploy the XULRunner folder to your output directory manually.

I don't really know wtf this means... I have an idea, but don't know precisely where or how to modify my build configuration to allow this to occur. Has anyone done this, and if so, how?

Foi útil?

Solução

My original attempted answer worked fine for my development setup, but didn't work on our staged deployment setup, as for some reason it didn't include the XULRunner files inside the web package created using MSDeploy. I've found what seems to be a simpler setup, below:

<ItemGroup>
  <Content Include="XULRunner\**\*.*">
    <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
  </Content>
</ItemGroup>

I'm not 100% sure if this works universally, but it seems to work better in every development and deployment scheme I've encountered thus far.

Outras dicas

I found how to accomplish this via this SO answer. The relevant changes to the project's .csproj file are below:

<Target Name="AfterBuild">
  <CallTarget Targets="CopyXULRunnerToDeployFolder" />
</Target>
<Target Name="CopyXULRunnerToDeployFolder">
    <ItemGroup>
        <MyFiles Include="XULRunner\**\*.*" />
    </ItemGroup>
    <Microsoft.Build.Tasks.Copy SourceFiles="@(MyFiles)"  DestinationFiles="@(MyFiles->'$(OutputPath)\XULRunner\%(RecursiveDir)%(Filename)%(Extension)')"/>
</Target>
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top