0

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:

enter image description here

The activity's properties:

enter image description here

The parameter list:

enter image description here

The GenericTypeArguments collection is empty:

enter image description here

I have no clue why the InvokeMethod activiy does not accept my setup.

user2516186
  • 433
  • 1
  • 5
  • 16

1 Answers1

0

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.

user2516186
  • 433
  • 1
  • 5
  • 16