I created a Data Package under the PackageRoot of my SF service (called WebSvc
) which contains a License.xml file, like so:
ApplicationTypePackageRoot --> WebSvcPkg --> Data --> License.xml
Now in my C# code, I would like to get the full path to the License.xml file. How to do this?
Seems like you can find the path via the CodePackageActivationContext
of the service:
var dataPackage = this.serviceContext.CodePackageActivationContext.GetDataPackageObject("Data");
var nsbLicensePath = Path.Combine(dataPackage.Path, "License.xml");