Suppose I add a custom target to a csproj file. Is there a way to run that target from visual studio? I don\'t want it make it a prebuild or postbuild step, I just want to
If you are running the build inside of Visual Studio there will be a build variable of VisualStudioDir during the build.
To execute only is a VS build session do this: