1

I am having a great amount of difficulty adding content from a nuget package, into an Azure Functions application within Visual STudio.

When I create a non-azure functions library and/or console application and add the package, the new folder and files are there.

I am trying to do the following:

  1. Add content to a NuGet package targeting net461 framework.
  2. Have the NuGet package create a folder "Folder1" and add many JSON files into that folder. (Folder1/File1.json)

The issue I am having, is that it would seem that inside of the Azure Functions Project Type for Visual Studio, this does not work correctly.

I have added the custom "contentFiles" XML node inside of the nuspec file, and still no luck.

  <contentFiles>
      <files include="Folder1\File1.json" buildAction="Content" copyToOutput="true" />
    </contentFiles>

The thing is, this works correctly for every other project under net461, except for the Azure Functions project-type.

Help would be greatly appreciated.

Joy Wang
  • 39,905
  • 3
  • 30
  • 54
Jacob Gaiski
  • 516
  • 3
  • 10

0 Answers0