I searched for tags "Moles" and "Visual Studio Express", and found no questions. That probably means I'm the only person trying to use Express with Moles :)
In Express, there are no options such as "Add moles assembly", or "Add mscorlib".
I've managed to get the tutorial for the DateTime Y2Kbug working after manually adding a couple of references that would normally be handled by VS. So, that means that I can mole any of the pre-moled stuff in System or mscorlib, which will be useful.
My problem is that I cannot seem to mole any of my own classes or methods in the SUT. I don't believe that the compiler sees any of the .moles file that contains the assemblies to mole.
I proved (?) this by attempting to exclude DateTime from the Y2kbug tutorial, using:
<MoleGeneration>
<Types>
<Remove FullName="DateTime!" />
</Types>
</MoleGeneration>
But the "bug" was asserted as usual :)
Is it possible to generate non-System moles as I need them by using something I saw in this forum: stackoverflow.com/questions/6272217/microsoft-moles-dynamically-instrument
Call Microsoft.Moles.Framework.Moles.MoleRuntime.SetMole(Delegate _stub, object _receiver, MethodInfo method);
If I use the "SetMole" method, does that mean that I don't need "assembly" files which are not seen anyway? If so, would it be possible to give some examples of the use of "SetMole". (I'm not a techie.)
As suggested by Mike Christian, I used moles.exe OrigValueP.dll. This created OrigValueP.Moles.dll in the MolesAssemblies subfolder.
Add OrigValueP.Moles.dll as a reference to the test project.
View OrigValueP.Moles in the Object Browser. I now see MOrigValue.AllInstances. So that's a huge step forward.
However, I don't see any Moles equivalent of my method:
public string TestString() { return "Original value"; }
[Deleted lines relating to the command, "moles.exe OrigValueP.Moles.dll", because MC suggested I'm "attempting to mole the mole assembly".]
So, I have one question (which I will continue to try to answer myself): Why was there no Moled method for TestString()?