This project is read-only.


VSDeploy fails on MSBuild.Orchard.Tasks.dll


Latest revision of 1.x (6976). Indeed the dll is not present where the project thinks it should be. Fresh checkout, no changes.

Error 1 The "MSBuild.Orchard.Tasks.XmlDelete" task could not be loaded from the assembly C:\orchard\src\Orchard.Web\..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll. Could not load file or assembly 'file:///C:\orchard\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:\orchard\src\Orchard.Web\Orchard.Web.csproj 222 5 Orchard.Web


nunez wrote May 6, 2013 at 9:58 AM

Correction, the DLL is present, but the task can't seem to load it.

CSADNT wrote May 6, 2013 at 11:03 AM

I have been deploying OK yesterday with last 1.x ?
(but many things to clean in what is deployed....)

sebastienros wrote May 14, 2013 at 8:51 PM

Teamcity issue ?

nightwolf226 wrote May 14, 2013 at 9:40 PM

I had the same error with TeamCity. If you're using TeamCity too, this should help:
  • make sure you choose the right build config (Release)
  • took me a while to figure out why, but it turned out that even with Release config, this dll seems to be missing (although it's not) because of how it's referenced in Orchard.Web.csproj
Around line 215 in Orchard.Web.csproj is the following:
<UsingTask AssemblyFile="$(ProjectDir)\..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.XmlDelete" />
I changed it to:
<UsingTask AssemblyFile="..\Tools\MSBuild.Orchard.Tasks\bin\Release\MSBuild.Orchard.Tasks.dll" TaskName="MSBuild.Orchard.Tasks.XmlDelete" />
This is the only file that causes such problems and I have no idea why. The ProjectDir variable is used all over the place and it seems to break only for this one.

nightwolf226 wrote May 14, 2013 at 9:44 PM

Okay, the second it clicked "submit" I noticed that the original route contains a backslash immediately after $(ProjectDir), that must be the problem (look at the other routes using this variable).

nightwolf226 wrote May 14, 2013 at 10:17 PM

Ignore the above comment, I checked and it doesn't compile with only the backslash removed. Use the code I first mentioned instead

CSADNT wrote Jun 25, 2013 at 9:27 AM

Also got into it today on 2 project after merging from codeplex ?

CSADNT wrote Jun 25, 2013 at 10:06 AM

Deleting all content in obj/release solved the issue

lizard0101 wrote Aug 16, 2013 at 10:06 PM

Hi All,

I've tried to do so, checked other posts also.
I downloaded the source using git extensions, and changed to absolute path inmediately, before first publish/compilation.
Additionaly I had run build for MSBuild.Orchard.Tasks.csproj first separately, so the missing dll was created first and after I built Orchard.Web.
Unfortunately no one of them helped.
The absolute path was fine. I double checked.
Any other suggestions?

Thanks in advance

lizard0101 wrote Aug 20, 2013 at 5:32 PM

Hi All,

as you probably felt sometimes also, developer men needs sometime to escape its mind from the deep in thoghts state, to solve a problem after unsuccsessful trials.
This can be achieved to have a break thinking about other things. A coffe break, or weaking up next day to get an idea how to solve the problem. It happens sometimes in the bath after walking home.

So, after changing the path to absolute, I started Visual Studio with administrative rights. That's it. Public succseeded :).
Bye & good luck

stefanos79 wrote Sep 3, 2013 at 9:10 PM

Any updates on this guys? Fresh download, doing a publish and failing with the same error.
I don't have any funny characters in my path...

stefanos79 wrote Sep 3, 2013 at 9:50 PM

So according to
"Relative paths are relative to the directory of the project file or targets file where the UsingTask element is declared."

So one thing is for sure that the $(ProjectDir) variable has to be removed.

Still trying to figure out why it still won't work

stefanos79 wrote Sep 3, 2013 at 9:53 PM

So removing the variable, turning VS on and off, has resulted in it working for me.

stefanos79 wrote Sep 3, 2013 at 10:46 PM

I forgot to mention that I moved the code to a different directory thinking the path length might have something to do with it as well being MSBuild!

fera wrote Oct 12, 2013 at 3:13 PM

Hi, I'm also having the same error without any weird characters in path. Is there any progress in resolving this issue?

sebastienros wrote Oct 23, 2013 at 7:14 PM

Could you try again with the latest changeset of 1.7.x, now there is a project dependency which will trigger the build on Tasks automatically. I will reopen the bug if you can still repro. Thanks.