Lab Excercise 3 Won't compile.

Dec 15, 2008 at 10:16 PM
I am following the instructions for Lab Excercise 3 using Visual Studio 2008 SP1 and Vista Ultimate SP1. I have added CompileTimeScenario.cs and CompileTimeScenario.stub.cs to the project, plus proxy.cs and app.config, and attempted to compile. However, I am getting compiler errors of the following form:

Error 1 'CompileTimeScenario.CompileTimeScenarioTests' does not contain a definition for 'CustomiseAdd' and no extension method 'CustomiseAdd' accepting a first argument of type 'CompileTimeScenario.CompileTimeScenarioTests' could be found (are you missing a using directive or an assembly reference?) C:\Data\Projects\TestProject1\TestProject1\CompileTimeScenario.cs 62 18 TestProject1

I am confused as these methods are in the *.stubs.cs file, which is a partial class using the same namespace and class name as the CompileTimeScenario.cs file, so it looks as though it should compile.

Any idea why I am having compile errors?
Dec 15, 2008 at 11:33 PM
Never mind. Renaming the *.stubs.cs back to *.stubs, deleting the entry in the project, adding *.stubs back to the project, and THEN renaming it to *.stubs.cs solved the problem... I have no idea why.

(I had originally renamed the *.stubs to *.stubs.cs before adding it to the project)
Dec 16, 2008 at 7:16 AM
Glad you got this fixed, I am not sure why the steps you did the frst time should have failed.