Reputation: 2167
I am trying to add Nuget Package transformations which I want to create from project file.
I tried few things like creating a content folder and adding it to my project as explained in https://docs.nuget.org/create/transforming-configuration-files-using-dottransform-files but was not able to add keys to project config files after package installation.
Workaround it to create a folder structure as explained in the above url. So I created a folders like content for transform files, lib for dlls/assemblies and it is working. But I think that this is more manual process.
Is there a way to create nuget package transformations using project file?
Upvotes: 1
Views: 165
Reputation: 1479
Just add to your root files for transformations like:
On update NuGet (from 2.6 version) will automatically transform your config files. You can even add XSD schema transformations.
Do not forget to mark *.transform files as Content and Do not copy in file properties.
Upvotes: 1