Trying to deploy function with dependency injection with multiple projects
Dunnu219 opened this issue · 3 comments
I have the Function project names HealthChecks.Facebook. I have another class library Data.Common. They are all in the root folder. When i try to deploy the function, the image gets created but tin the cloud run i see this error message
"Unhandled exception. System.MissingMethodException: Entry point not found in assembly 'Data.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'."
This is the structure of my projects
And the yaml file
You need to set GOOGLE_BUILDABLE to the project that has the function in - which is HealthcareChecks.Facebook in this case.
See https://github.com/GoogleCloudPlatform/functions-framework-dotnet/blob/main/docs/examples.md#multiprojectfunction-and-multiprojectdependency for details of deploying a function that needs local dependencies.
Thank you so much..i just did not realise that the GOOGLE_BUILDABLE should be the actual project with the Function and not the dependent project. I did not notice it. Just checked your examples again..so dumb of me..the project names MultiProjectFunction and MultiProjectDependency were so similar just missed to use the correct one.
No problem - glad to help :)