This project is read-only.

Task not found error

Apr 9, 2008 at 2:42 AM

This is my first project using the SDC Tasks library. A peer of mine introduced me to them and helped me use the Share.Connect and Share.Disconnect tasks. I tried using the Folder.CleanFolder task and Folder.Copy task, but I keep getting this error:

error MSB4036: The "Microsoft.Sdc.Tasks.Folder.CleanFolder" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "C:\WINNT\Microsoft.NET\Framework\v3.5" directory.

When I take the Folder.CleanFolder out, the files are deployed successfully, but I couldn't get it to use the Folder.Copy task - I believe it's just using MSBUILD's Copy task.

Here is the start of the build script that has been working for the Share.Connect and Share.Disconnect:

<Project DefaultTargets="DesktopBuild" xmlns="" ToolsVersion="3.5">
<UsingTask AssemblyFile="C:\Program Files\MSBuild\SDC\Microsoft.Sdc.Tasks.dll" TaskName="Microsoft.Sdc.Tasks.Folder.Share.Connect" />
<UsingTask AssemblyFile="C:\Program Files\MSBuild\SDC\Microsoft.Sdc.Tasks.dll" TaskName="Microsoft.Sdc.Tasks.Folder.Share.Disconnect" />

I have tried all of the following variations to try implementing the Folder.CleanFolder task (each individually - not at the same time):
<UsingTask AssemblyFile="C:\Program Files\MSBuild\SDC\Microsoft.Sdc.Tasks.dll" TaskName="Microsoft.Sdc.Tasks.Folder.CleanFolder" />
<UsingTask AssemblyFile="C:\Program Files\MSBuild\SDC\Microsoft.Sdc.Tasks.dll" TaskName="Microsoft.Sdc.Tasks.Folder" />
<UsingTask AssemblyFile="C:\Program Files\MSBuild\SDC\Microsoft.Sdc.Tasks.dll" TaskName="Microsoft.Sdc.Tasks" />

I've tried the following variations of the task (each individually - not at the same time)::
<Folder.CleanFolder Path="\\SERVER\MySHare\inetpub\wwwroot\test\" force="true"/>
<CleanFolder Path="\\SERVER\MySHare\inetpub\wwwroot\test\" force="true"/>
<Microsoft.Sdc.Tasks.Folder.CleanFolder Path="\\SERVER\MySHare\inetpub\wwwroot\test\" force="true"/>

Here is the section of code that I've tried to use to implement it:
<Target Name="AfterDropBuild" Condition="'$(BuildBreak)'==''">

<Message Text="Moving Files to IIS box"></Message>

Connections="1" />

<!-- Delete Files before copy -->
<Folder.CleanFolder Path="\\SERVER\MySHare\inetpub\wwwroot\test\" force="true"/>

<!--<MySourceFiles Include="$(DropLocation)\$(BuildNumber)\*\.*"/>-->
<MySourceFiles Include="$(DropLocation)\$(BuildNumber) \Debug\_PublishedWebsites\test\*\.*"/>


Force="true" />


Any help would be greatly appreciated.

Thank you!

Apr 9, 2008 at 8:42 AM
Hi Kent

Please note that the Microsoft.Sdc.Tasks (2.1.3009.0).zip file was patched on Monday:

Update 07 April 2008: Microsoft.Sdc.Tasks (2.1.3009.0).zip has been updated with the Microsoft.Sdc.Common.tasks file from changeset 17418

This update to the tasks file will get your CleanFolder working.

With regards to the Copy, you appear to be using the standard MSBuild task, which I recommend you stick with rather than the SDC Folder Copy.

Hope that helps.