我最近创建了一个 Nuget 包,但是在尝试安装它时,它返回了错误:
有多个根元素。第 3 行,位置 2。
问题:这个错误引用的是什么 - nuspec 文件?我的内容文件夹中的 web.config.transform?
这是我的 .nuspec 文件:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>blah</id>
<version>1.0.0</version>
<authors>omitted</authors>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>This package integrates **** functionality into existing Web Forms applications.</description>
<language>es-US</language>
</metadata>
</package>
这是我的 web.config.transform:
<section name="blah" type="omitted.Security.PasswordManagement.omitted.Configuration.PVSecureConnectionStringsSection, omitted.Security.PasswordManagement.PasswordVault" />
<blah blah="blah">
<connectionStrings>
<add name="**NAME**-Local" connectionString="data source=**DB SERVER**;initial catalog=**DATABASE**;user id=**USER ID**;password=**PASSWORD**;" providerName="System.Data.SqlClient" />
<add name="**NAME**-Development" connectionString="data source=**DB SERVER**;initial catalog=**DATABASE**;user id=**USER ID**;" />
<add name="**NAME**-Test" connectionString="data source=**DB SERVER**;initial catalog=**DATABASE**;user id=**USER ID**;" />
<add name="**NAME**-Production" connectionString="data source=**DB SERVER**;initial catalog=**DATABASE**;user id=**USER ID**;" />
</connectionStrings>
</blah>