2
Vote

Missing DLL when packaging module

description

The "MSBuild.Community.Tasks.XmlRead" task could not be loaded from the assembly C:\ddn\dnndev.me\DesktopModules\DNNModule2\packages\MSBuildTasks.1.4.0.56\tools\MSBuild.Community.Tasks.dll. Could not load file or assembly 'file:///C:\ddn\dnndev.me\DesktopModules\DNNModule2\packages\MSBuildTasks.1.4.0.56\tools\MSBuild.Community.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. DNNModule2

I am using Visual Studio 2012 professional and have tried many thing.. if you can help i would be grateful...

comments

christoc wrote May 8, 2013 at 10:29 PM

Do you have NUGET installed? Without that the MSBUILD package won't install properly

Matichek wrote May 8, 2013 at 11:01 PM

Yes, I did install "as admin" and "unlocked" mode - NuGet.Tools.vsix and MsBuild.Community.Tasks.v.4.0.42.msi ...

I also get an error when I created a new project ->DNN template- > that IIS error ... so I have to change http://dnndev.me... to http://www.dnndev.me in Module.csproj file.. ... in order to get rid of that IIS error ...

christoc wrote May 9, 2013 at 3:51 AM

Did you create the website in IIS to use DNNDEV.ME as a header, or did you put only www.dnndev.me ?

Matichek wrote May 9, 2013 at 9:08 AM

Thank you Christoc for answering,

Yes, I did use www.dnndev.me ... I tried also (on a new install) www.dnndev (with settings - <IISUrl>http://www.dnndev/desktopmodules/DNNExplained</IISUrl>
      <OverrideIISAppRootUrl>True</OverrideIISAppRootUrl>
      <IISAppRootUrl>http://www.dnndev/</IISAppRootUrl> ) - but I get the same error - with missing DLL... 
I also have a question regarding your Documentation.html in the module template - What did you mean with - "BEFORE checking the module into your source control environment check the following." - Source control environment is created with you Select - new project - DNN template ?

Matichek wrote May 9, 2013 at 1:27 PM

Hi,

I kinda solved it - "the Missing MSBuild.Community.Tasks.dll"
  1. I copied MsBuild.Community.Tasks.dll and MsBuild.Community.Tasks.xml into BuildScripts Folder in project folder...
  2. Than I changed line that has <MSBuildCommunityTasksLib> - into my own local path to dll ... something like this... "<MSBuildCommunityTasksLib>$(SolutionDir)\BuildScripts\MSBuild.Community.Tasks.dll</MSBuildCommunityTasksLib>" ...
I know this is kinda desperate but it works ! - Build script now creates Install folder - with 2 zip files (with source and install zip).... Btw, I doing this example - http://www.dotnetnuke.com/Resources/Video-Library/Viewer/Video/437/View/Details/DotNetNuke-Explained-Basic-Module-Development.aspx

Hope this helps anyone ...

tntiwari11 wrote May 16, 2013 at 5:40 PM

The "MSBuild.Community.Tasks.XmlRead" task could not be loaded from the assembly C:\ddn\dnndev.me\DesktopModules\DNNModule2\packages\MSBuildTasks.1.4.0.56\tools\MSBuild.Community.Tasks.dll. Could not load file or assembly 'file:///C:\ddn\dnndev.me\DesktopModules\DNNModule2\packages\MSBuildTasks.1.4.0.56\tools\MSBuild.Community.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. DNNModule2

I have same issue with Visual Studio 2012 ultimate when I am creating DNN Module in release mode its displaying above error, also I ahve Installed NuGet updated version still facing problem, please if you can help i would be grateful.

NFXBeats wrote Jun 6, 2013 at 7:12 AM

@maticheck : thank you! that worked for me as well. Before I followed your steps, I verified that the path to the DLL did in fact exist. It was very frustrating.

johnsmith234 wrote Jun 7, 2013 at 11:46 AM

@maticheck

and MsBuild.Community.Tasks.v.4.0.42.msi - that was not necessary. Template uses lib from nuget
Also as far as I know it's possible to install NuGet through Visual Studio itself

Have you tried right-clicking project -> manage NuGet packeges and see why packages (MSBuild community) weren't downloaded into $(solutionDir)/packages?

crpietschmann wrote Mar 17 at 6:29 PM

This is still definitely an issue. I am getting this issue with the currently most recent release of these templates when installed via the Visual Studio Gallery.

Also tried @Matichek's suggested solution to no avail.

Any help would be appreciated? Although, this may be an issue with the MSBuild.Community.Tasks project itself?

crpietschmann wrote Mar 17 at 6:30 PM

Additionally, I manually added the nugget MSBuild.Community.Tasks v1.4.0.61 package manually since it wasn't pulled in automatically by the template. And, FYI I'm using Visual Studio 2013.

crpietschmann wrote Mar 17 at 6:47 PM

After getting everything installed, I restarted my machine, opened the project and RELEASE now builds and created the proper install packages for my module. WOW! PIA!