Using the Zip task in MSBuild -
I am currently working on trying to use msbuild zip work in a project
My project file looks something like this:
& lt; Asset group & gt; & Lt; MSBuildCommunityTasksPath & gt; $ (SolutionDir) \ creation & Lt; / MSBuildCommunityTasksPath & gt; & Lt; / PropertyGroup & gt; & Lt; Import Project = "$ (MSBuildCommunityTasksPath) \ MSBuild.Community.Tasks.Targets" /> & Lt; ItemGroup & gt; & Lt; Include FileToZip = "C: \ File Path" & gt; & Lt; / FilesToZip & gt; & Lt; Include FileToZip = "C: \ File Path" & gt; & Lt; / FilesToZip & gt; & Lt; / ItemGroup & gt; & Lt; Target name = "first build" & gt; & Lt; PropertyGroup & gt; & Lt; ReleasePath & gt; \ Releasepath & lt; / ReleasePath & gt; Zip file = "@ (FilesToZip)" working directory = "$ (release path)" zip file name = "HTMLeditor.html" zip =
< However, the zip file is updated but the files specified in the item group FilesToZip in it are not included. I understand It is not coming that why they are not being recognized! I have a double path and it is right that any idea?
I think you do something like that Want to:
Add itemGroup & gt; FileToZip = "C: \ filepath; C: \ file path "/> As I mentioned in my comment, just a variable ( FileToZip ), And repeating it, repeating it with different values does not give you an array in which both the values are included. You only end with the last value (and not the array at all), your include The attribute is a selector that is used to create an array and has many values, Wildcards and other patterns that are used to create that array for you.
A link for MSDN that you can use about the include attribute Gives more information to:
Comments
Post a Comment