1

I'm creating a package of my UWP App for Microsoft store.

My app supports 3 languages: English - default, Swedish and Danish.

If I do not manually clean up obj and bin folder then the generated MyApp.appxbundle file do not contain language packs: MyApp_language-sv.appx, MyApp_language-da.appx, as a result my app can not be localized to those languages.

I do not want to cleanup the folders each time. Any ideas except creating a script to delete the folders on build?

DasiyTian_1203
  • 1,038
  • 1
  • 6
  • 16

1 Answers1

0

I do not want to cleanup the folders each time. Any ideas except creating a script to delete the folders on build?

For doing this, you could add the following into YourProject.csproj file.

<Target Name="AfterBuild">
    <!-- Remove obj folder -->
    <RemoveDir Directories="$(BaseIntermediateOutputPath)" />
    <!-- Remove bin folder -->
    <RemoveDir Directories="$(BaseOutputPath)" />
</Target>

Steps

Unload Project

enter image description here

Edit .csproj file add the above to the file.

enter image description here

At last reload your project.

Nico Zhu
  • 32,367
  • 2
  • 15
  • 36