MSBuild.ExtensionPack.FileSystem.Share Fails

Jan 24, 2010 at 3:31 PM

Hi,

I'm migrating from the SDC tasks over to the Extension Pack.

It would seem that the "Share" Create task is not working?

If I use the SDC version, all is well.

This is the MS Build output

Task "MSBuild.ExtensionPack.FileSystem.Share" (TaskId:8)
  Creating share: MSBEPS2 on: DESKDAVE (TaskId:8)
  ManagementScope Set: \\DESKDAVE\root\cimv2 (TaskId:8)
D:\Projects\FrontOffice\Build Scripts\Master.proj(239,5): error : Invalid Name
Done executing task "MSBuild.ExtensionPack.FileSystem.Share" -- FAILED. (TaskId
:8)

Any ideas / help?

Thanks,

D

 

Coordinator
Jan 24, 2010 at 4:28 PM

Can you post your sample?

Jan 24, 2010 at 5:02 PM

Here are the 2 samples:

 

The first 1 works, 2<sup>nd</sup> one fails (not because share already exists ;))

 

    <Share.Create

                    ShareName="$(PublishName)"

                    Path="$(PublishFolder)"

                    Description="Version $(FileVersion)"/>

 

    <MSBuild.ExtensionPack.FileSystem.Share

        TaskAction="Create"

        SharePath="$(PublishFolder)"

        ShareName="$(PublishName)"

        Description="A Description of MSBEPS2"/>

 

Thanks,

D

 

Coordinator
Jan 24, 2010 at 5:45 PM

what's in your variables? This works

 


        <MSBuild.ExtensionPack.FileSystem.Share

        TaskAction="Create"

        SharePath="C:\a"

        ShareName="MyAShare"

        Description="A Description of MSBEPS2"/>

Jan 25, 2010 at 1:40 PM

Ok -

Seems you need to run this task with elevated rights on Vista and Windows 7...

Works fine in an elevated cmd prompt.

 

Silly me - I should have known ;)

D.