Проверка исходного кода не позволяет присваивать метки

Я пытаюсь применить LABEL (не комментарий, который работает) к VSSItem непосредственно перед проверкой файла с визуальным исходным кодом.

Я проверил ряд параметров, проверил тип файла и т. Д.

Я могу правильно проверить файл без проблем и добавить комментарий, который является свойством метода checkin. Что я не могу сделать, это добавить ярлык....

vssItem.Label(msg1, msg2)

msg1 и msg2 - это строки, определенные над параметром stmt.

For Each vssItem As IVSSItem In vssFolder.Items(False)
        Console.Write(" {0}", vssItem.Name)

        Dim localPCpath As String = "C:\..\..\Projects\test\newtest"

        Dim localpath As String = Path.Combine(localPCpath, Path.GetFileName(vssItem.Name))

        **vssItem.Label(msg1, msg2)**

        vssItem.Checkin("Test 11 of checkin with label", localpath)

        If DirectCast(vssItem.IsCheckedOut, VSSFileStatus) = VSSFileStatus.VSSFILE_NOTCHECKEDOUT Then
            Console.WriteLine(vssItem.Spec + " is checked in.")
        Else
            Console.WriteLine(vssItem.Spec + " is checked out.")
        End If
Next

Сообщение об ошибке....

System.Runtime.InteropServices.COMException не было обработано

ErrorCode = -2147352566

HelpLink = "ssusexp.hlp # 10170"

Сообщение = "Неверный код доступа (неверный параметр)."

Источник ="SourceSafe"

Трассировки стека:

   at Microsoft.VisualStudio.SourceSafe.Interop.IVSSItem.Label(String Label, String Comment)
   at DBConversionUpdate.testSS.Button2_Click(Object sender, EventArgs e) in C:\..\..\Documents\Visual Studio 2008\Projects\DBConversionUpdate\DBConversionUpdate\testSS.vb:line 209
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(ApplicationContext context)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
   at DBConversionUpdate.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()

InnerException:

Позвольте мне также сказать, что я знаю, что это старое программное обеспечение, и многие считают, что MS Source Safe - это мусор, но я пока застрял в нем.

0 ответов

Другие вопросы по тегам