MSDN > 論壇首頁 > MSBuild > VSS Get Error
發問發問
 

問題VSS Get Error

  • 2006年12月7日 下午 02:11SujithGokul 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    am trying to get latest version of my project using following

    <UsingTask AssemblyFile="Microsoft.Sdc.Tasks.dll" TaskName="Microsoft.Sdc.Tasks.SourceSafe.Get" />

    <Target Name="Latest">

    <SourceSafe.Get

    UserName="abc"

    Password="abc"

    Database="\\vss\Code"

    Project="$\Source\Project"

    WorkingDirectory="c:\temp">

    </SourceSafe.Get>

    </Target>

    It gets all the files from the VSS but at the end I get following error message.

     


    Target Latest:
        Connecting to VSS.
        Getting latest version.
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : A task error has occured.
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : Message                         = Value cannot be null.
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : Parameter name: url
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : Project                         = $\Source\Project
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : Database                        =
    \\Vss\Code
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : Username                        = abc
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : Password                        = abc
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : Label                           = <String.Empty>
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : GetParameter                    = <String.Empty>
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : WorkingDirectory                = c:\temp
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : VersionNumber                   = <String.Empty>
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : VersionNumberConfigFileLocation = <String.Empty>
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : VersionNumberConfigVSSLocation  = <String.Empty>
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error : OnlyIncrementRevision           = False
    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error :

    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error :    at System.Xml.XmlTextReaderImpl..ctor(String url, XmlNameTa
    ble nt)

    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error :    at System.Xml.XmlDocument.Load(String filename)

    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error :    at Microsoft.Sdc.Tasks.SourceSafe.Get.LoadVersionNumber()

    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error :    at Microsoft.Sdc.Tasks.SourceSafe.Get.InternalExecute()

    D:\Visual Studio 2005\Projects\WindowsApplication2\WindowsApplication2\test.
    xml(6,5): error :    at Microsoft.Sdc.Tasks.TaskBase.Execute()

    Done building target "Latest" in project "test.xml" -- FAILED.

    Done building project "test.xml" -- FAILED.

     

     

    Any help will be great,

    Thanks in advance!!

所有回覆

  • 2006年12月7日 下午 09:59Simon Dahlbacka 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    At least if you have flipped the readonly bit of some file yourself, then the task will spew errors (not sure if that is the case here..)
  • 2008年2月14日 下午 09:18matt_peterson 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     

     

    Has anyone ever found the cause of this error? It is happening to me when trying to pull files from source safe. It retrieves them fine, but the build 'fails' because of this error.

     

    Thanks,

    -Matt

  • 2008年2月14日 下午 10:51matt_peterson 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
     matt_peterson wrote:

     

    Has anyone ever found the cause of this error? It is happening to me when trying to pull files from source safe. It retrieves them fine, but the build 'fails' because of this error.

     

    Thanks,

    -Matt

     

     

    Nevermind, I spent a couple hours trying to figure this out, only to find the problem a hour after posting...

     

    based on the help file for this task, the format is as such:

     

    <SourceSafe.Get
      Database="database"
      Username="username"
      Password="password"
      GetParameter="getParameter"
      Label="label"
      OnlyIncremementRevision="onlyIncrementRevision"
      Project="project"
      VersionNumber="versionNumber"
      VersionNumberConfigFileLocation="versionNumberConfigFileLocation"
      VersionNumberConfigVSSLocation="versionNumberConfigVSSLocation"
      WorkingDirectory="workingDirectory" >
    </SourceSafe.Get>

     

    there were a couple extra values that I wasn't filling out. Adding the VersionNumberConfigFileLocation and properly formatted XML version file was the key to getting it working.

     

    Hope this helps other members new to MSbuild/tasks...