VS2013 generating events, removing unnecessary DLLs

Source: Internet
Author: User

A project in the solution is a Windows Service that is used to remove events from the message queue and send notification emails;

The UI is an MVC site, and two project references the same class library, which references third-party generated PDF component Pechkin;

Every time I build a website, Pechkin's 7 DLLs are automatically copied to the Bin directory, 7 DLLs add up to 30 megabytes, and the Web site runs with an error (Modify IIS application pool can be resolved), every time I debug the site, To manually remove these DLLs from the bin directory is inefficient ,

In fact, only Windows Services project used to Pechkin, the site does not need, so I think of the VS generation event, under the build event through the macro command to automatically delete these DLLs, I did this

Right-click property on site = "Generate Event

$ (TargetDir) is the output directory, is the site's Bin directory, more command parameters can be clicked "Macros";

If EXIST to determine whether there is a file, a conditional judgment statement, do not change line;

DEL is to delete one or more files.

if EXIST $ (TargetDir) Pechkin.dll del $ (TargetDir) Pechkin.dll IF EXIST $ (TargetDir) Pechkin.Synchronized.dll DEL $ ( TargetDir) Pechkin.Synchronized.dll if EXIST $ (TargetDir) Libeay32.dll DEL $ (TargetDir) Libeay32.dll if EXIST $ (TargetDir ) libgcc_s_dw2-1. dll DEL $ (TargetDir) libgcc_s_dw2-1.DLL IF EXIST $ (TargetDir) Mingwm10.dll DEL $ (TargetDir) Mingwm10.dll if EXIST $ (TargetDir) Ssleay32.dll DEL $ (TargetDir) Ssleay32.dll if EXIST $ (TargetDir) Wkhtmltox0.dll DEL $ (TargetDir) Wkhtmltox0.dll

for more commands, refer to this website http://www.lxway.com/486410602.htm

VS2013 generating events, removing unnecessary DLLs

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.