Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exceptions in loading assemblies to ConfigureApplicationParts #147

Closed
oleksandrmelnychenko opened this issue Oct 23, 2018 · 10 comments
Closed

Comments

@oleksandrmelnychenko
Copy link

No description provided.

@yevhen
Copy link
Member

yevhen commented Oct 24, 2018

?

@oleksandrmelnychenko
Copy link
Author

ConsoleApp3.zip

@oleksandrmelnychenko
Copy link
Author

oleksandrmelnychenko commented Nov 1, 2018

Please help, it's default implementation, can you tell me, what I'm doing wrong? If I use one assembly, it's working, when I do move Actors code to another assembly, it doesn't.
image

@oleksandrmelnychenko oleksandrmelnychenko changed the title Help with best practice to do HTTP Responses Exceptions in loading assemblies to ConfigureApplicationParts Nov 1, 2018
@aprooks
Copy link
Member

aprooks commented Nov 1, 2018

you should register the new assembly like this:

    sb.ConfigureApplicationParts(fun x ->
           x.AddFromAppDomain().WithCodeGeneration()|> ignore
           x.AddApplicationPart(typeof<GreeterMessage>.Assembly).WithCodeGeneration() |> ignore
           ) |> ignore

You can further split messages and actor implementations to 2 assemblies, so that client would know only about messages while host should have registered both messages and actor implementations. Check client/server examples as well

@oleksandrmelnychenko
Copy link
Author

I have tried to do many variations, but always catch exceptions.
image

@aprooks
Copy link
Member

aprooks commented Nov 1, 2018

Sorry for not checking more thoroughly. I've reproed this error but have not figured out what's wrong so far.

@oleksandrmelnychenko
Copy link
Author

Thanks, hope it will be resolved. I want to setup it in a big project, akka.net will wait.

@aprooks
Copy link
Member

aprooks commented Nov 1, 2018

OK there were 2 issues.

First, add a reference to Orleans specific object like here: https://github.com/aprooks/orleankka-fsharp-intro/blob/master/FByke.Contracts/Library.fs#L23-L29 (can be a separate file as well)

second, remove application part of host, since you don't have any grain classes there. Like this:

    cb.ConfigureApplicationParts(fun x ->
            x.AddApplicationPart(typeof<GreeterMessage>.Assembly).WithCodeGeneration() |> ignore )  |> ignore

the second issue seems to be a bug. I will test again and file a proper report if it is confirmed

@oleksandrmelnychenko
Copy link
Author

Have added, that "type". It's ok with it. Thanks for the quick response !!!

@aprooks
Copy link
Member

aprooks commented Nov 2, 2018

No problem. Feel free to join gitter channel https://gitter.im/OrleansContrib/Orleankka for quick questions.

I'll close this issue and create followups

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants