I am writing a extension for visual studio, which will automatically generate some JS file according to ascx code.
public class JSCodeGenTask : Task
This Task is registered as a after-build task, which means it will be executed after every build. The class extends Task, and is registered in csproj.
<Target Name="AfterBuild">
<JSCodeGenTask FileNames="@(something)" outPath="@(somethingelse)" />
</Target>
The problem is, I want to keep track of programmers renaming an ascx file, namely, I want the former name of that ascx file. Is there a way to access this information?
public event RenamedEventHandler Renamed
I know renamed event can be used here, but I don’t know how to register this event to Visual Studio — .csproj. Thanks!
I guess I’ve found the solution
http://msdn.microsoft.com/en-us/library/bb166508%28VS.100%29.aspx
It should be implemented as a Custom Tool instead of MSbuild event. Examples can be found at
http://code.msdn.microsoft.com/SingleFileGenerator#BuildAndRun