【发布时间】:2018-12-07 12:38:48
【问题描述】:
我有.NetStandard 图书馆。我将在.NetFramework 和.NetCoreApp 应用程序中使用它。
它使用System.Configuration.ConfigurationManager 包来处理配置文件。我需要在库安装期间转换这些配置文件。
我找到了两种方法:
-
nuget 包中的
tools文件夹,其中包含install.ps1文件 -
content文件夹,其中包含app.config.install.xdt文件
它们都不起作用 - nuget 不运行 install.ps1,nuget 不转换 App.config。
有来自csproj的代码:
<ItemGroup>
<Content Include="Content\app.config.install.xdt">
<PackagePath>content</PackagePath>
</Content>
</ItemGroup>
Nuget 包包含这个文件...所以我不知道为什么它不起作用。
这个问题和.NetStandard有关吗?我做错了什么?
【问题讨论】:
标签: nuget nuget-package .net-standard xdt-transform