Vs generate events

Source: Internet
Author: User

Source: http://www.cnblogs.com/FreeDong/p/3406737.html

If Visual Studio is also used, the efficiency of the. NET program is greatly increased. This article is about Generating Events in Visual Studio. Right-click a project under solution and select "properties" to open the window to see the "generate events" option, which is not commonly used, I don't even touch it once after several years of writing code, but I need her today.

I have a solution named idletest, and the latest DLL is required for projects in another solution. The DLL generated in the original idletest is also in use for other projects, therefore, you need to copy the DLL generated by several projects in the idletest solution to a new directory. However, it is very troublesome to modify the claim each time, so we thought of generating an event. Baidu said that the command line in the event generation supports the doscommand, I tried to input"Copy [full source file path] Copy to path", It worked.
However, I need to copy the DLL generated by multiple projects to the new path, so that this "[full source file path]" is very troublesome and does not reflect reusability, is there a better way?
Open the macro in the generated event, as shown in


You can see that there is a list (containing "macro" and "value" columns ), the value of targetpath under Macro is the physical path of the DLL/EXE file generated by the current project. Double-click this row, "$ (targetpath)" appears in the box above.
Directly write down "post-event Generation Command Line" in the event generation window of each projectCopy $ (targetpath)E: \ projects \ mydemo \ joeylibs \ idletest \ DLLs ", andGenerate events after running"Select"Successful generation"Done.

I also use this function to do one thing, that is, when there are dozens of projects under the solution, I will use it in the last project generated (usually the ui or service, the operation is similar to the above, but the command is changed:

@ Echo msgbox "[$ (projectname)] generation completed! "> Msg. vbs @ msg. vbs @ del msg. vbs

Vs generate events

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.