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

Exclude runtimes folder from publish #101

Open
natanaelfiorilla opened this issue Feb 20, 2023 · 3 comments
Open

Exclude runtimes folder from publish #101

natanaelfiorilla opened this issue Feb 20, 2023 · 3 comments

Comments

@natanaelfiorilla
Copy link

Hi,
Is it possible to exclude the runtimes folder on publish?

dotnet publish "" --output "/bin/Release/net6.0/publish" --configuration "Release" --framework "net6.0" /p:GenerateRuntimeConfigurationFiles=true --runtime linux-x64 --self-contained False

Publishing for a lambda includes /runtimes/win-x64 and /runtimes/win-x86.
Unfortunately, any attempt to exclude the folder using csproj file does not work. Maybe I'm not doing it correctly.
Thanks!

@HakanL
Copy link
Owner

HakanL commented Feb 24, 2023

Good question, I don't know if there is a way to filter the runtime files based on target.

@RomanHubyak
Copy link

#60 - The fix for .NET Framework affects .NET Core and it results in x3 binaries: 2 in /runtimes for x86 and x64, and 1 in root for the target runtime.

image

@andulv
Copy link

andulv commented Nov 27, 2023

Found a workaround that seems to solve the problem for me.

Edited .csproj file of my procject that references WkHtmlToPdfDotNet:

    <PackageReference Include="Haukcode.WkHtmlToPdfDotNet" Version="1.5.86" >
      <ExcludeAssets>build</ExcludeAssets>
    </PackageReference>

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

4 participants