Is there a way to modify Visual Studio 2008 or 2010 project pre-build events from within your code in C#? Does C# have such preprocessor directives that would allow one to configure what gets run before project compilation and buil开发者_运维百科d?
The purpose of this is to scan the project for shader effect files (.fx) and recompile them without editing the pre-build events manually each time I add a new shader effect file. If you know anything that would favor this scenario, you're more than welcomed to contribute.
There is not a way to have the build process execute the code it's building (think about it for a minute...).
However, you can use DynamicExecute from the MSBuild Extension Pack to include C# code in your MSBuild file that will be executed during the build. This works in both VS2008 and VS2010.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论