Supply App.config file via NuGet

后端 未结 2 1123
不思量自难忘°
不思量自难忘° 2021-01-16 05:22

I have some information in my nupkg that I would like to include in the consumer\'s application. What is the best way to include a partial app.config directly when consuming

相关标签:
2条回答
  • 2021-01-16 05:49

    You do this using .transform files:

    In NuGet's traditional way of configuration-file transformation, you add a file to your package's content and give it the same name as the file you want to transform, followed by a .transform extension. For example, to transform a web.config file, you create a web.config.transform file. The transformation file contains XML that looks like a web.config or app.config file, but it includes only the sections that need to be merged into the project's configuration file.

    0 讨论(0)
  • 2021-01-16 05:57

    check the post NuGet Package Transformations this illustrated very simple.

    0 讨论(0)
提交回复
热议问题