Kah*_*anu 9 asp.net-mvc transform nuget
我正在创建一个需要修改目标应用程序的web.config文件的自定义程序包,但我的配置更改在安装后永远不会出现在目标应用程序中.
这是我的web.config.transform文件:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="AppInstalled" value="false"/>
</appSettings>
</configuration>
appSettings部分中的此键永远不会应用.
这是我的nuspec文件:
<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>$id$</id>
<version>$version$</version>
<authors>$author$</authors>
<owners>$author$</owners>
<licenseUrl>http://mvcapp.codeplex.com/license</licenseUrl>
<projectUrl>http://mvcapp.codeplex.com/</projectUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>$description$</description>
<tags>mvc app</tags>
</metadata>
<files>
<file src="\bin\Release\MvcApp.MVC3.dll" target="lib" />
<file src="NuGet\Content\ajax-loader.gif" target="Content" />
<file src="NuGet\Content\web.config.transform" target="web.config" />
<file src="NuGet\Views\Install\Index.aspx" target="Views\Install\Index.aspx" />
</files>
</package>
这是我从VS 2010命令提示符运行打包项目的命令:
nuget pack mvcapp.csproj
有任何想法吗?
谢谢.
dav*_*owl 21
web.config.transform文件需要进入内容文件夹:
<file src="NuGet\Content\web.config.transform" target="content" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5555 次 |
| 最近记录: |