Reputation: 1616
Is there an automated way to include a config transform file in the nuget package that is created when using the dotnet pack command?
Upvotes: 1
Views: 1607
Reputation: 1616
I was able to do this by adding the xdt transform files in the class library project and then editing the csproj file to have this ItemGroup.
<ItemGroup>
<Content Include="app.config.uninstall.xdt" />
<Content Include="app.config.install.xdt" />
</ItemGroup>
When doing a dotnet pack this automatically adds them to the content folder of the nuget package.
Upvotes: 1