Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cant deploy on azure webapp #18

Open
richardNieuwlandAlten opened this issue Mar 21, 2022 · 2 comments
Open

cant deploy on azure webapp #18

richardNieuwlandAlten opened this issue Mar 21, 2022 · 2 comments

Comments

@richardNieuwlandAlten
Copy link

richardNieuwlandAlten commented Mar 21, 2022

Hi, i like to run a command line app in the cloud, but the 7z.dll which is added by me to the project with 'always copy' doesn't end up in the target folder on the webapp after publish. That way, preventing the app to run. Any clue what i need to set in my vs project to use the 7dll that way ?
Note: the same happend when i was trying to use the 7dll in an Azure Function.

@luuksommers
Copy link
Owner

The always copy flag copies files to the Bin folder, you can try to set the build action as content to have the file available during publish.

@chucker
Copy link

chucker commented Nov 7, 2022

Try adding a section as follows to your csproj:

  <Target Name="CopySevenZipForPublish" BeforeTargets="PrepareForPublish">
    <Message Importance="high" Text="Copying 7-zip DLLs" />
    <Copy SourceFiles="@(SevenZipSharpInteropFiles)"
          DestinationFiles="@(SevenZipSharpInteropFiles -> '$(PublishDir)%(RecursiveDir)%(Filename)%(Extension)')" />
  </Target>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants