I tried adding this code to my project file:
<Target Name="AfterPublish">
<Exec Command="start C:\test.txt" />
</Target>
This doesn't fie up at all. When I do "AfterBuild" though, it works fine. So, what I think it is, that my publish is not set to "Web Deploy". Does anyone know if there is a way to make the "AfterPublish" work without publishing using Web Deploy setting.