Reputation: 7458
I am following the orleans example in this example, instead of running both silo and client in same app domain, they are walking through so that, both can be started independently. I made the changes as suggested. I modified the IGrain1.cs to accept the string as parameter
Task<string> SayHello(string greetings);
Modified the grain1.cs to implement the code as follows
private string text = "Hello World!";
public Task<string> SayHello(string greetings)
{
var oldText = text;
text = greetings;
return Task.FromResult(oldText);
}
When I run the silo, it keep failing to start the silo with this error
"TypeLoadException: Method 'SayHello' in type 'GrainCollection1.Grain1' from assembly 'GrainCollection1...'
both interface and grain definition matches. There is something simple I am missing here?
Upvotes: 3
Views: 1390
Reputation: 86
Take a look at c:\Microsoft Codename Orleans SDK v0.9\SDK\LocalSilo\Applications. CodeGen builds a folder there for each Orleans project. When the local silo starts, the initializer scans this directory for assemblies.
Try deleting the folders in ../Applications and rebuilding your solution. You should see the project folder recreated with your rebuilt grain and interface DLLs.
In DevTestServerConfiguration.xml, change Tracing/DefaultTraceLevel from "Warning" to "Info". When you run InitSilo you'll see what the silo is looking for and the errors it's throwing. That pointed me to the SDK silo folder.
Edit: You may also need to delete the folders in ..\SDK\Binaries. Be sure to rebuild the whole project right after you do the delete.
Upvotes: 4