我有一个本地 Orchard 1.7 cms 站点,我已经自定义了等等。我现在的任务是通过 Visual Studio Ultimate 2012 将我的网站发布到我的主机 (arvixe.com) - 通过发布选项。但发布失败,我收到此错误:
Error 1 The "MSBuild.Orchard.Tasks.XmlDelete" task could not be loaded from the assembly C:\Users\WilliamHolm\Documents\Visual Studio 2012\Projects\whj\src\Orchard.Web\..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll. Could not load file or assembly 'file:///C:\Users\WilliamHolm\Documents\Visual Studio 2012\Projects\whj\src\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll' or one of its dependencies. The system cannot find the file specified. Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. C:\Users\WilliamHolm\Documents\Visual Studio 2012\Projects\whj\src\Orchard.Web\Orchard.Web.csproj 247 5 Orchard.Web
通过查看错误位于 Orchard.Web.csproj 中第 247 行附近的源,它看起来像这样:
</Target>
<Import Project="$(ProjectDir)..\..\lib\msbuild\MSBuild.Community.Tasks.Targets" />
<UsingTask AssemblyFile="$(ProjectDir)..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.XmlDelete" />
<Target Name="ProcessConfigurationFiles" AfterTargets="CopyAllFilesToSingleFolderForMsdeploy">
<PropertyGroup>
<PackageTmp>$(ProjectDir)obj\Release\Package\PackageTmp</PackageTmp>
</PropertyGroup>
<!-- extra processing of the staged config files -->
<XmlUpdate XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/compilation/@debug" Value="false" />
<XmlDelete XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/trust" />
<XmlUpdate XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/machineKey/@validationKey" Value="AutoGenerate" />
<XmlUpdate XmlFileName="$(PackageTmp)\web.config" XPath="/configuration/system.web/machineKey/@decryptionKey" Value="AutoGenerate" />
<XmlUpdate XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender/immediateFlush/@value" Value="false" />
<XmlUpdate XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/logger/priority/@value" Value="ERROR" />
<XmlUpdate XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/root/priority/@value" Value="ERROR" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender[@name='debug-file']" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender[@name='debugger']" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/appender[@name='error-file']/filter" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/logger[@name='Orchard.Localization']" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/logger[@name='Orchard']" />
<XmlDelete XmlFileName="$(PackageTmp)\Config\log4net.config" XPath="/log4net/root/appender-ref[@ref='debug-file']" />
<!-- disable all file monitoring but ExtensionMonitoringCorrdinator to detect new modules/themes -->
<XmlUpdate XmlFileName="$(PackageTmp)\Config\HostComponents.config" XPath="/HostComponents/Components/Component/Properties/Property[@Name='DisableMonitoring']/@Value" Value="true" />
</Target>
我能找到的最接近的是这个线程:
http://orchard.codeplex.com/workitem/19688
我已经尝试过这些建议,但它一直失败。
有人对此有解决方案吗?
提前谢谢。
/将要。