Build Orchard into a package without using build "compile;package" (solved)

Topics: Core
May 28, 2013 at 5:36 PM
Edited May 28, 2013 at 6:13 PM
Hi there,


Publish Orchard.Web to IIS in a complied package.

Problem (solved below)

I am on the 1x branch, and the build "compile;package" command is throwing an error. See this work item:


Is there a way to do the equivalent of build "compile;package" through another means?

What have I tried?

Create a Web Deployment package using Visual Studio

Error 5 The "MSBuild.Orchard.Tasks.XmlDelete" task could not be loaded from the assembly C:\Users\Shaun\Documents\%40GitHub\CertifiedOverheadCrane\orchard1x\src\Orchard.Web\..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll. Could not load file or assembly 'file:///C:\Users\Shaun\Documents\%40GitHub\CertifiedOverheadCrane\orchard1x\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\Shaun\Documents\@GitHub\CertifiedOverheadCrane\orchard1x\src\Orchard.Web\Orchard.Web.csproj 225 5 Orchard.Web

Confirm that the <UsingTask> declaration is correct. Works!!!

  • We opened the Orchard.Web.csproj and found the following declaration which seems to be wrong. We replaced the relative path with an absolute path to fix it.

Replacement Absolute Path Works

<UsingTask AssemblyFile="C:\Users\Shaun\Documents\@GitHub\CertifiedOverheadCrane\orchard1x\src\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll"
               TaskName="MSBuild.Orchard.Tasks.XmlDelete" />

Existing Relative Path Does NOT Work

<!--<UsingTask AssemblyFile="$(ProjectDir)\..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll" 
             TaskName="MSBuild.Orchard.Tasks.XmlDelete" />-->
May 28, 2013 at 11:11 PM
Would you mind filing a bug?
May 28, 2013 at 11:13 PM
Edited May 31, 2013 at 7:38 PM
I wouldn't mind at all. Done. (solved)
May 28, 2013 at 11:15 PM
May 31, 2013 at 7:37 PM
Solved. We needed to take the @ symbol out of our folder name. It messed up MSBuild.
<UsingTask AssemblyFile="C:\Users\Shaun\Documents\@GitHub\CertifiedOverheadCrane\orchard1x\src\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.XmlDelete" />
Note to self: Just because NTFS allows @ symbols in folder names doesn't mean we should use them.