solution (by Microsoft):
It is best practice to use the $(SDK40ToolsPath) property to get the .NET SDK binaries path rather than manually building the path with the $(FrameworkSDKDir) property. Using “$(SDK40ToolsPath)sgen.exe” should work in Visual Studio 2013 and earlier versions.
$(FrameworkSDKDir) value in VS macros (post build event) references invalid path