Imbunatatiri Visual Studio

Doua lucruri ma enervau tare la Visual Studio

  1. Atasarea la procesul IIS – cind vroiam sa fac debug . Prea multe click-uri.
  2. Compilarea – cind un proiect da eroare, VS compileaza fericit mai departe- chiar daca celelalte proiecte deping de el.

In Visual Studio 2010 aveam aceste doua macro-uri – le copiam rapid si gata

Private Sub BuildEvents_OnBuildProjConfigDone(ByVal Project As String, ByVal ProjectConfig As String, ByVal Platform As String, ByVal SolutionConfig As String, ByVal Success As Boolean) Handles BuildEvents.OnBuildProjConfigDone

If Not Success Then

DTE.ExecuteCommand(“Build.Cancel”)

DTE.ToolWindows.OutputWindow.ActivePane.OutputString(“build failed for project ” & Project & vbCrLf)

Media.SystemSounds.Exclamation.Play()

End If

End Sub

 

———————————–

Public Sub AttachPRogram()

Try

Dim dbg2 As EnvDTE80.Debugger2 = DTE.Debugger

Dim trans As EnvDTE80.Transport = dbg2.Transports.Item(“Default”)

Dim compName As String = System.Net.Dns.GetHostName()

Dim procAll = dbg2.GetProcesses(trans, compName)

For Each proc2 As Process2 In procAll

If (proc2.Name.ToLower().Contains(“w3wp”)) Then

proc2.Attach()

End If

Next proc2

Catch ex As System.Exception

MsgBox(ex.Message)

End Try

End Sub

———————–

In VS2012 nu au mai ingaduit macro-uri( da , stiu …) . Asa incit m-am pus pe treaba si am facut aceste 2 package-uri ( sursele le gasiti pe github sub https://github.com/ignatandrei)

http://visualstudiogallery.msdn.microsoft.com/a20bb171-0cab-453e-a64b-15197250f81f

http://visualstudiogallery.msdn.microsoft.com/928617dc-d747-4577-bd19-8514d7efa8a7

5 thoughts on “Imbunatatiri Visual Studio

    1. Buna Tudor. Nu.
      Eu nu faca modificari si apoi F5 – dureaza mai mult atasarea.
      Stilul meu
      :1
      Fac modificarile in cod. Compilez. Dau Refresh la browser. Verific.
      De obicei(90%), ce scriu e OK. Commit to TFS. Go to 1
      Daca nu e OK, ma gindesc de ce.
      Daca am reusit , GoTo 1.
      Daca nu, CTRL+SHIFT+F1 😉

      1. Mda, depinde de stilul de lucru.. Cand 90% din timp cineva lucreaza pe cod scris timp de 4-5 ani, de 10 – 15 developeri, cu sute de clase, prefer ca IDE-ul sa se opreasca pe linia unde a fost aruncata o exceptie cand crapa, decat sa sap prin stack traces ca sa-mi dau seama ulterior de unde vine problema..

        1. Corect. Din fericire, nu am probleme asa de mari.
          Pe de alta parte, prefer sa gindesc la inceput si sa modific si doar in disperare de cauza sa fac debug

Leave a Reply

Your email address will not be published. Required fields are marked *