Closed johano99 closed 6 years ago
I don't think that's possible right now. What's your use case for it?
Two apps wanting to share data & logic
Addition to what @Mackiovello said: The only dependency an app has in the warehouse is to witch Starcounter version its build against.
Ok, I have built an app, OAuth2, for doing authentications towards Google, Facebook and Microsoft, and I put all common "oauth:ish-logic" into its own separate module, OAuth2.Core.dll.
Now I am building another app, CalendarSync, that needs to reference the same data model and functions defined in this OAuth2.Core.dll to make its calls into Google Calendar API / Microsoft Graph API.
Question is, how do I deploy this dependent assembly? Is it ok to deploy it together with all apps that references it? How would versioning then handled?
@johano99
I'm sorry I can't answer your question, but this is a real important one you bring up and I think we need to support it. If not "natively" (with support from warehousing), we need to at least provide a nice "how to".
My spontaneous thinking is packaging up the dependency in package, e.g. a NuGet package. And have both app depend on that. I'm not an expert on our packaging for warehouses, but I guess it would mean the same library would end up in both packages. And then comes your questions:
Is it ok to deploy it together with all apps that references it?
It is.
How would versioning then handled?
In the shared host, we compare versions. I think we match minor.major
and do some redirect if they match (but build / patch etc dont), and refuse to load the last started app if not.
@andwah
I guess we only support apps in warehouses, not packaging of libraries / components, right?
Yes, warehouse stores apps that are already built. It doesn't care about the way you manage your dll dependencies. If I understand your case correctly, using Nuget should solve your problems
I guess we only support apps in warehouses, not packaging of libraries / components, right?
True. only apps packages is supported.
I hope this answered your question @johano99.
Closing
Yes, thank you!
When deploying apps to the warehouse, is there a way to mark any dependent assemblies to go into the Starcounters "Public Assemblies" (or similar) instead of ending up in the apps private folder?