Unnessary folders after pulish in windows

Dani_S 3,746 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

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,460 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 75,036 Reputation points Microsoft Vendor
    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 Answers by the question author, which helps users to know the answer solved the author's problem.