This project is read-only.

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

Topics: Core
May 28, 2013 at 6:36 PM
Edited May 28, 2013 at 7: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 29, 2013 at 12:11 AM
Would you mind filing a bug?
May 29, 2013 at 12:13 AM
Edited May 31, 2013 at 8:38 PM
I wouldn't mind at all. Done. (solved)
May 29, 2013 at 12:15 AM
May 31, 2013 at 8: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.