dotnet / dotnet/msbuild

MSBuild with WebPublishMethod to package produces wrong file names with special characters in zip file

Open
#6,165 14 comments 0 reactions 0 assignees View on GitHub
has-repro triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 8h
Merged PRs (30d)
141

Description

I am using below MSBuild command to generate a package zip for a web application which contains files with Swedish characters. The generated zip corrupts the file name.

`"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin\MSBuild.exe" "C:\Users\asranja\Source\Repos\WebApplication4\WebApplication4.sln" /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="C:\Users\asranja\Desktop\Package2"`

**[Solution]**

![packagezip1](https://user-images.githubusercontent.com/20986928/108163884-c1867b00-7115-11eb-8d9e-a3af1e5535fc.PNG)

**[Unzipped package]**
![packagezip2](https://user-images.githubusercontent.com/20986928/108163876-bf242100-7115-11eb-9758-3c5c0a475660.PNG)

**[Ask]**
What is the correct way to generate a webapp zip package which does not corrupt file names with special characters.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.