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

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

  •  11-03-2022
  •  | 
  •  

Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top