devenv post event error


Not sure if this is the right place to post this. If it is wrong please tell me.
Our company purchased a teamcity server a few years ago but never utilized it. I am trying to make use of it but am hitting a problem.

We have several hundred solutions, all of which range between VS2008 and VS2013, all of which TC works with. However contained within many of these solutions are post build events to register the new .dll's. Is there a way that TC can overlook these build events by default, or to fix the underlying problem?

The command which is trying to be run is

"$(DevEnvDir)..\..\..\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "$(TargetPath)" /nologo
"%windir%\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe" "$(TargetPath)" /tlb:"DLL NAME".tlb

However msbuild (TC) is throwing this error every time:

"*Undefined*..\..\..\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "DLL LOCATION" /nologo
[16:00:13]The system cannot find the path specified.
[16:00:13]C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(4291, 5): error MSB3073: The command ""*Undefined*..\..\..\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i "DLL LOCATION" /nologo" exited with code 3.

Removing this from post build isn't an option as we are trying to build over a hundred solutions so is there a way I can tell TC where to look for the devenvdir or just to ignore the .dll's as I can register them through command prompt after.

Thanks in advance
1 comment
Comment actions Permalink

$(DevEnvDir) property is undefined when running msbuild ouside of Visual Studio. It's well known issue -


Please sign in to leave a comment.