I have included custom code into csproj file which Zip the whole project on build. I would like to exclude my custom MSBuild code from csproj file while zipping. How to do that?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could call your zipping target directly when running your csproj
If you need to control zipping/not-zipping for normal builds you could add a condition to your zipping target
The example above would run the zipping only when doing a RELEASE build (unless you didn’t introduce another custom Configuration).
You could declare your own project level property for your zipping Condition and specify (and override a default value) it when calling msbuild
msbuild your.csproj /property:DoZip=true