Trouble adding projects to C# solution

I'm following the Cloud Code tutorial and have managed to get the DiceRoll example to work. So far so good.
But when I add a second project to the Visual Studio solution (again, following the tutorial structure of one solution with several child projects), I can only get one to work at a time.
When both projects are included in the build, one works fine, but when calling the other, I get:

No CloudCodeFunction found with the specified name 'RollDice2'

I haven't found a pattern to which one works, when including and removing the projects it seems completely random. Any pointers would be very much appreciated...


We will need a lil more details but, a few pointers.
* The ccm file needs to have the same file as the assembly that acts as an entry point.
* Warning: Renaming the file (.dll) is not enough, the assembly metadata itself has to match the name of the ccm
** Changing the assembly can be done by editing the csproj, tho its highly recommended the project have the same name as the assembly
* The contents of the .ccm should include the second assembly (produced by the project)
* This might mean you need two publishing profiles (depending on your IDE it needs to be different)

Finally, while this will work, why do you need different projects?
While for exploration this might make sense, CloudCode Modules are explicitly designed to allow you to have more than one entry point (CloudCodeFuntion) per project, so for most average cases, having different modules will not add any benefit, you can have a CCM with lots of cloud-code functions in the same project. (Though advance cases may vere well require it).

To help out more, I'd need more information to help out tho, like the solution structure, names of assemblies and .ccm(s).
If you feel comfortable, pm-ing the whole folder would also work.

I hope this helps out!


As per the module structure page, the C# solution can have multiple projects, but only one main project that contains your entry points. This means that if you have attributed Cloud Code functions in other projects that are not your main project, they won’t be accounted for.

Hope this helps.

1 Like