Resolution 1
Check the code supplied to ensure that no variables are being declared that match the names of any variables declared in the Published Data tab of the Run .Net Script object. For each Published Data item added to the Run .Net Script object, a "Variable name" property is provided which at runtime is converted into a declared variable.
If a declaration exists in the code that also exists in a Published Data definition, remove the variable declaration from the code.
Example:
Published Data Item:
Name: My Example Output
Type: String
Collection: Unchecked
Variable name: myOutput
Code:
Dim myInput As String = "Testing"
Dim myOutput As String = myInput
The above code will return the error because myOutput variable is being declared twice - once in the code and once in the runtime class definition that will be wrapped around the code to produce the runtime assembly.
Resolution 2
Inspect the code to see if there are any variables being set before they are instantiated. The best way to do this would be to bring the code into Visual Studio and setup all the appropriate references and test out the code execution there.
If an object is referenced before it is declared, correct the code.