Search code examples
c#.netazure-service-fabric

Service Fabric Add additional files


I'm trying to add a file to service fabric project. However I get file not found exception when running it locally and when published. What is the proper way to include a file as "content" in service fabric Service?

trying to do this:

var pfx = File.ReadAllBytes("cert.pfx"); // Exception - not found

Solution

  • You can use the 'data package' feature for this. They are deployed as an independently versionable part of the application package.

    More info here and here.