my sneaky Global Assembly Cache
Posted on 2004-10-27
I'm trying to build an assemly, and register it in the Global Assemply Cache. I often change the source and have to recompile, uninstall the assembly from GAC, then re-install the assembly in GAC. No problem, just a couple lines in my batch file:
csc /t:library /out:FutureShirts.dll AssemblyInfo.cs Global.cs Futura.cs
gacutil /u FutureShirts
gacutil /i FutureShirts.dll
It uninstalls and reinstalls fine.. However, when I try to access the new methods that I added to the assembly, I get this error:
Method not found: Int32 FutureShirts.Futura.Multiply(Int32, Int32)
Note that this is different from the error I get when I try to access a method that doesn't actually exist:
CS0117: 'FutureShirts.Futura' does not contain a definition for 'Multiplyd'
After a ridiculous amount of testing and changing the name of the namespace and assmebly, I have figured out that the only methods that will work are the methods that are in the assmembly when I register in the GAC the very first time. After that, any code added will just produce the "Method not found.." error. It's insane. Also, I can put the dll in the bin directory, and just run the assembly from there and it works fine..
So does anyone have any ideas? I'm about ready to apply the sledge hammer..
Thx - Trevor