Thursday, August 28, 2014

DNN - Error 2 The "MSBuild.Community.Tasks.XmlRead" task could not be loaded...


If you are using Christoc's DotNetNuke Module Development Template, you might run into the error when trying to publish - "Error 2 The "MSBuild.Community.Tasks.XmlRead" task could not be loaded..."

Here are the possible solutions -
  1. Try creating a new project or installing the templates again.
  2. Create a \packages\MSBuildTasks.1.4.0.45\tools\ inside my desktopmodules/myproject and place the  MSBuild.Community.Tasks.dll there...
    Rebuild project and the install folder is there with the package created.
  3. From VS 2012 go to Tools > Library Package Manager > Package Manager Console
    After Package Manager Console loads, type the following command -
    PM> Install-Package MSBuildTasks
    You should get the following messages:
    Successfully installed 'MSBuildTasks 1.4.0.45'.
    Successfully added 'MSBuildTasks 1.4.0.45' to ($CustomModule).
    Delete temporary file
    Copying MSBuild Community Tasks files to ($SolutionDir)\Website\DesktopModules
    ($CustomModule)\Build
    Don't forget to commit the Build folder
    Installing MSBuild Community Tasks Targets file import into project ($CustomModule)
    Import will be added for: $(SolutionDir)\Build\MSBuild.Community.Tasks.targets
    Import added!

    You should now be able to rebuild your module in Release mode. 
1>------ Build started: Project: [projectname], Configuration: Release Any CPU ------
1>CSC : warning CS1607: Assembly generation -- The version '00.00.01.*' specified for the 'file version' is not in the normal 'major.minor.build.revision' format
1>  [projectname] -> [projectpath][projectname].dll
2>------ Publish started: Project: [projectname], Configuration: Release Any CPU ------
2>Connecting to C:\Dev\[projectname]Publish...
2>Copying all files to temporary location below for package/publish:
2>obj\Release\Package\PackageTmp.
2>Publishing folder /...
2>Publishing folder App_LocalResources...
2>Publishing folder bin...
2>Site was published successfully [projectpath][projectname]Publish
2>
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 1 succeeded, 0 failed, 0 skipped ==========


No comments:

Post a Comment