aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 123 forks source link

When publishing Deploy package to zip file, zip file is not replaced anymore #964

Open Tratcher opened 7 years ago

Tratcher commented 7 years ago

From @themetis on January 19, 2017 17:4

In my case, the deploy package contained a folder resulting of a deploy from my project before migrating to Core. The first time I delployed with Core, my zip file contained both the old folder and the new one resulting in a zip double the size it shoulde be. The zip file used to be replace but now it looks like its just been updated with new the new files.
What about removing the extra files not supposed to be there?

Copied from original issue: aspnet/Home#1906

mlorbetske commented 7 years ago

@themetis just to be certain that this is a modification of the existing file - if you move the produced zip out of your publish output & produce it again, it contains only the files you're interested in?

cc @vijayrkn

vijayrkn commented 7 years ago

@themetis - Is this issue happening with VS 2015 - project.json based project?

themetis commented 7 years ago

@mlorbetske Yes it only modify an existing file, if I delete it before I produce it, it only contains the correct files.

@vijayrkn Yes its with VS 2015 -project.json based.

Thanks!

vijayrkn commented 7 years ago

@themetis This issue is fixed in VS 2017 RC. We have replaced the powershell script used to create MsDeploy packages with cross platform msbuild tasks/targets. The new targets handles creating parameter files and upgrading existing packages. https://github.com/aspnet/websdk/blob/dev/src/Publish/Microsoft.NET.Sdk.Publish.Targets/netstandard1.0/PublishTargets/Microsoft.NET.Sdk.Publish.MSDeployPackage.targets