I have custom build template for my TFS 2012 Server build. I added a "InvokeMethod" activity to set an environment variable (editing it with Visual Studio 2012), but I keep getting the error
'Environment' does not have a public static method named 'SetEnvironmentVariable ' matching the parameter types, generic type arguments, and generic type constraints supplied to InvokeMethod 'SetEnvironmentVariable '.
According to MSDN there is a static method (from System.Environment
)
public static void SetEnvironmentVariable(
string variable,
string value
)
The InvokeMethod activity is configured as follows:
The activity's properties:
The parameter list:
The GenericTypeArguments collection is empty:
I have no clue why the InvokeMethod activiy does not accept my setup.
I removed and re-added the InvokeMethod activity, reset all values described above, and now the error disappeared. Seems like VisualStudio got stuck in some invalid state.