Share via

Unnessary folders after pulish in windows

Dani_S 5,581 Reputation points
2024-07-17T08:51:34.1133333+00:00

Hi,

Which folder are no need after publish :

dotnet publish -f net8.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=None -p:WindowsAppSDKSelfContained=true /p:PackageCertificateThumbprint="c01ba45666762f3615cf6813aeb4dc4b1919541d" -p:RuntimeIdentifierOverride=win10-x64

I do not support muti-languages.

I added all folders.

User's image

User's image

Developer technologies | .NET | .NET MAUI
{count} votes

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-07-18T06:45:51.2533333+00:00

    Hello,

    If you want to get rid of these languages folders when publish your application. Please set the -p:WindowsAppSDKSelfContained=false.

    Before running published application, you need to install Latest downloads for the Windows App SDK - Windows apps | Microsoft Learn

    When your application is self contained(WindowsAppSDKSelfContained=true), what actually happens is that Visual Studio copies the contents of the Windows App SDK framework package to your application directory. This is the file named Microsoft.WindowsAppRuntime.1.x.msix. So, you can't really stop the creation of the language directories.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.