Visual Studio Swapping buttons on the Toolbar

Sara published a Did you know that i have been looking for for ever how do I customize those toolbars with the functions I deem worthy.

Did you know... you can switch and swap buttons on the toolbars while the Tools - Customize dialog is showing - #139

Thanks for a great tip!

Comments [0]

VS 2008 Sp1

Microsoft's new agile pace is just killing me.  I'm glad that sp1 will be out some time in the foreseeable future but.  I don't want thing about upgrading to vs 10 in another 18 months. 

C# Debugging Improvements for VS 2008 SP1- Part 1

 

Comments [0]

Solutions Can Have Folders

I knew Projects in Visual studio could have sub folders which are great for organizing code files.  But I have come to find out that solution files can as well http://dotnettipoftheday.org/tips/visual-studio-solution-folders.aspx  pretty cool.  Welcome to a new era of organization!

Comments [0]

The debugger does not support debugging managed and native code at the same time on this platform.

You might receive the "The debugger does not support debugging managed and native code at the same time on this platform." error message in Visual studio 2005/2008 if you have a 32bit native/mixed mode dll linked to your x64bit assembly.  If you change the project properties so that Platform target is x86 you should be able to debug both assemblies.

Comments [2]

Visual C++ Performance Improvements now a GDR

The Vc++ team blog announced the release of performance improvements for vc++ as a General Distribution Release.

Comments [0]

Visual Studio 2008 and .NET 3.5 Due out at the end of November?

According to CNN Money Microsoft has committed to an end of November release date.

Full story here.

Comments [0]

Vs 2005 constantly repainting when running under remote desktop

If your running Visual studio 2005 under Terminal services or Remote desktop and you find the editor constantly refreshing ( repainting, flickering ) Disable font smoothing on your remote desk top connection.  If you have your heart set on using font smoothing try courier as your editors font.

Comments [3]

Performance Improvements to VC++ in VS 2008

Since I deal with a large VC++ of native-managed code I am glad to see Somasegar's list of VC++ performance enhancements in Visual studio 2008

· Editor responsiveness – Updating IntelliSense, displaying the QuickInfo tooltip and processing AutoComplete requests won’t degrade editor experience.

· Goto Definition improvements – Significant reduction in the time required to “Goto Definition”.  One customer reported that a 2 minute delay dropped to 10-20 seconds.

· Load solution performance – Load time of large Visual C++ solutions is much better.  Some customers are reporting speed ups of 25%-70%.

· File lookup in projects – Provides improvements to several scenarios such as adding files to projects, changing configurations, etc.

· Changing configuration options – Modifying options, such as adding an include directory or changing the active configuration, are much faster for large solutions.

· Reduced CPU consumption – We now process low-priority background items (such as IntelliSense population) using 20% less CPU time.

I have had to deal with slow IntelliSense and solution load times. All of these issues affect my daily use of VS.  Its great that the VC++ is finally able to address them.  Its even better to hear there will be a patch for VS 2005.

Comments [0]

vs class library to web application

There just doesn't seem to be any love for the Visual Studio 2005 Web Sit Project.  I know I have none.  I' am  sure its fine for an internally developed web sites, but who cares about those.  For an ISV we need dll's.  It's simpler and your customer can't make unauthorized edits to your code.  So if like me your looking for a simple way to update some of your older asp.net projects Peter Bromberg just posted a nifty trick to get your visual studio 2003 class library project to convert to a visual studio 2005 web application project.  I recommend you take a look and save your self a migraine.

Comments [0]

Microsoft Secure Content Downloader

In your quest to down load all the visual studio 2008 goodness you may find this new ctp tool from Microsoft very useful

Microsoft Secure Content Downloader July 2007 Community Technology Preview

Overview

The Microsoft Secure Content Downloader (MSCD) is a peer-assisted download manager capable of securely downloading specific files. MSCD is intended for consumers who are downloading from a home PC, or business users whose computers are not behind a corporate firewall. If you use MSCD from behind a corporate firewall, you may be unable to download content, and may adversely affect other clients' ability to download content.
Main features of the MSCD are:

  • Secure content description
    • Each file available for download has a secure description, ensuring the content you download is exactly what the publisher published.
  • Scalable performance
    • MCSD is a peer-assisted technology. Each client downloads content by exchanging parts of the file they’re interested in with other clients, in addition to downloading parts from the server.
      • No matter how great the internet’s demand for the file, you will always be able to make progress downloading.
      • MSCD lets you download content more quickly than possible without peer assistance.


Some MSCD clients may be connected to each other via peer connections, forming a ‘cloud’ of clients. Pieces of the file you are downloading are sent through these peer connections between clients, as well as through connections with the file server. As a member of the cloud, your computer both serves as a client and server to other members of the cloud. Data destined for the cloud may be routed through your computer and sent to other cloud members. The other cloud members connected to you will be able to access only pieces of the file you are downloading via MSCD – they have no access to any other data on your computer.
You are only connected to other clients while you are downloading a file via MSCD. When the file has finished downloading – or when you pause or cancel the download, or exit the application – you disconnect from the cloud. Once you disconnect from the cloud, you will no longer have any connections to any other members in the cloud and no data will be routed through your computer.
This version of MSCD is a Community Technology Preview, and will only allow you to obtain current Visual Studio 2008 Beta 2. Since it is a Community Technology Preview, additional information related to MSCD’s performance and network transactions -- including your machine name and IP addresses -- may be logged to help evaluate and improve MSCD performance.

Just incase you have been under a rock here are the links to detailed information about today's release of Visual studio via Scott Gu and Somasegar respective blog posts.

Comments [0]

VC++ and the Evil Intellisense

I have been having odd locking issues when using solutions that have  a c# project that is referenced by a c++/cli project.  This would happen in  VS 2003 and VS2005.  What could cause this horrid behavior?  Intellisense.  It has been locking the C#/VB output file while it updates.  Which means no building of the solution. 

While I am on Intellisense I have found many things in VC require it.  You need Intellisense to go to declarations and definitions, you even need it for the winforms designer to work.  Yet it is so utterly broken a large project will take any system to its knees with every press of the space bar.

Comments [0]

Macros For converting C++ extensions to cli

Public Module ConversionModule

    Public Sub UpdateToCLI()

        SeachAndReplaceDocumentPointers("System::")

        SeachAndReplaceDocumentPointers("nsoftware::IPWorksSSL::IPWorksSSLException")
        SeachAndReplaceDocumentPointers("nsoftware::IPWorksSSL::HttpsStatusEventArgs")
        SeachAndReplaceDocumentPointers("nsoftware::IPWorksSSL::HttpsStatusEventArgs")
        SeachAndReplaceDocumentPointers("C1::Win::C1FlexGrid::")
        SeachAndReplaceDocumentPointers("C1::")

        FindReplace("__gc ", "ref ")
        FindReplace("__property", "property")
        FindReplace("__try_cast", "safe_cast")
        FindReplace(" S""", " """)
        FindReplace("(S""", "(""")
        'FindReplace("    S"",""")

        NewToGCnew("System") 
        NewToGCnew("nsoftware")
        NewToGCnew("C1FlexGrid")
        NewToGCnew("C1::")


        ReplaceTypeOf()
        ReplaceItemOf()
        FindReplace("->ItemOf", "->default")
        FindReplace("->Item", "->default")


    End Sub

    Sub SeachAndReplaceDocumentPointers(ByVal ManagedNameSpaceToken As String)

        SeachAndReplacePointers(ManagedNameSpaceToken + "*\*", "^")
        SeachAndReplacePointers(ManagedNameSpaceToken + "\*", "^")
        SeachAndReplacePointers(ManagedNameSpaceToken + "*^ &", "%")
        SeachAndReplacePointers(ManagedNameSpaceToken + "*^&", "%")
        SeachAndReplacePointers(ManagedNameSpaceToken + "*^ \*", "%")
        SeachAndReplacePointers(ManagedNameSpaceToken + "*^\*", "%")
    End Sub
    Sub SeachAndReplacePointers(ByVal What As String, ByVal ReplaceWith As String)
        Do
            DTE.Windows.Item(DTE.ActiveDocument.Name).Activate()
            DTE.Find.FindWhat = What
            DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
            DTE.Find.MatchCase = False
            DTE.Find.MatchWholeWord = False
            DTE.Find.Backwards = False
            DTE.Find.MatchInHiddenText = False
            DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
            DTE.Find.Action = vsFindAction.vsFindActionFind
            If (DTE.Find.Execute() = vsFindResult.vsFindResultNotFound) Then
                Exit Do
            Else
                DTE.ActiveDocument.Selection.CharRight()
                DTE.ActiveDocument.Selection.DeleteLeft()
                DTE.ActiveDocument.Selection.Text = ReplaceWith
            End If
        Loop

    End Sub
    Sub FindReplace(ByVal What As String, ByVal ReplaceWith As String)
        DTE.Find.Action = vsFindAction.vsFindActionReplaceAll
        DTE.Find.FindWhat = What
        DTE.Find.ReplaceWith = ReplaceWith
        DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
        DTE.Find.MatchCase = False
        DTE.Find.MatchWholeWord = False
        DTE.Find.MatchInHiddenText = False
        DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
        DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResultsNone
        DTE.Find.Action = vsFindAction.vsFindActionReplaceAll
        DTE.Find.Execute()
    End Sub
    Sub NewToGCnew(ByVal Type As String)

        Do
            DTE.Find.FindWhat = " new " + Type + "*"
            DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
            DTE.Find.MatchCase = False
            DTE.Find.MatchWholeWord = False
            DTE.Find.Backwards = False
            DTE.Find.MatchInHiddenText = False
            DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
            DTE.Find.Action = vsFindAction.vsFindActionFind
            If (Not (DTE.Find.Execute() = vsFindResult.vsFindResultNotFound)) Then
                DTE.Find.Action = vsFindAction.vsFindActionReplace
                DTE.Find.ReplaceWith = " gcnew "
                DTE.Find.FindWhat = " new "
                DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
                DTE.Find.MatchCase = False
                DTE.Find.MatchWholeWord = False
                DTE.Find.Backwards = False
                DTE.Find.MatchInHiddenText = False
                DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
                DTE.Find.Execute()
            Else
                Exit Do
            End If
        Loop
    End Sub
    Sub ReplaceTypeOf()
        Do
            DTE.Find.FindWhat = "__typeof(*)"
            DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
            DTE.Find.MatchCase = False
            DTE.Find.MatchWholeWord = False
            DTE.Find.Backwards = False
            DTE.Find.MatchInHiddenText = False
            DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
            DTE.Find.Action = vsFindAction.vsFindActionFind
            If (Not (DTE.Find.Execute() = vsFindResult.vsFindResultNotFound)) Then
                DTE.ActiveDocument.Selection.CharLeft()
                DTE.ActiveDocument.Selection.CharRight(True, 9)
                DTE.ActiveDocument.Selection.Delete()

                DTE.Find.FindWhat = ")"
                DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
                DTE.Find.MatchCase = False
                DTE.Find.MatchWholeWord = False
                DTE.Find.Backwards = False
                DTE.Find.MatchInHiddenText = False
                DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
                DTE.Find.Action = vsFindAction.vsFindActionFind
                If (Not (DTE.Find.Execute() = vsFindResult.vsFindResultNotFound)) Then
                    DTE.ActiveDocument.Selection.Text = "::typeid"
                End If
            Else
                Exit Do
            End If
        Loop
    End Sub
    Sub ReplaceItemOf()
        Do
            DTE.Find.FindWhat = "get_ItemOf"
            DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
            DTE.Find.MatchCase = False
            DTE.Find.MatchWholeWord = False
            DTE.Find.Backwards = False
            DTE.Find.MatchInHiddenText = False
            DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
            DTE.Find.Action = vsFindAction.vsFindActionFind
            If (Not (DTE.Find.Execute() = vsFindResult.vsFindResultNotFound)) Then
                DTE.ActiveDocument.Selection.Delete()
                DTE.ActiveDocument.Selection.Text = "default["

                DTE.Find.FindWhat = ")"
                DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
                DTE.Find.MatchCase = False
                DTE.Find.MatchWholeWord = False
                DTE.Find.Backwards = False
                DTE.Find.MatchInHiddenText = False
                DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
                DTE.Find.Action = vsFindAction.vsFindActionFind
                If (Not (DTE.Find.Execute() = vsFindResult.vsFindResultNotFound)) Then
                    DTE.ActiveDocument.Selection.Text = "]"
                End If
            Else
                Exit Do
            End If
        Loop

    End Sub
    Sub WrapCStringWithSystemString()

        DTE.ActiveDocument.Selection.Text = " gcnew System::String( " + DTE.ActiveDocument.Selection.Text + " )"
    End Sub
    Sub WrapSystemStringWithCString()

        DTE.ActiveDocument.Selection.Text = " CString( " + DTE.ActiveDocument.Selection.Text + " )"
    End Sub
    Sub WrapValueArray()
        DTE.ActiveDocument.Selection.Text = "array< " + DTE.ActiveDocument.Selection.Text + " > ^"
    End Sub
    Sub WrapHandle()
        DTE.ActiveDocument.Selection.Text = "(HWND)" + DTE.ActiveDocument.Selection.Text + ".ToPointer()"
    End Sub
    Sub ConvertToNull()
        DTE.Find.Action = vsFindAction.vsFindActionFind
        DTE.Find.FindWhat = "NULL"

        DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
        DTE.Find.MatchCase = False
        DTE.Find.MatchWholeWord = False
        DTE.Find.MatchInHiddenText = False
        DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
        DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResultsNone
        DTE.Find.Action = vsFindAction.vsFindActionFind
        DTE.Find.Execute()
        DTE.ActiveDocument.Selection.Text = "nullptr"
    End Sub
    Sub updateDefaultI()
        DTE.Find.Action = vsFindAction.vsFindActionFind
        DTE.Find.FindWhat = "default(i)"

        DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
        DTE.Find.MatchCase = False
        DTE.Find.MatchWholeWord = False
        DTE.Find.MatchInHiddenText = False
        DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
        DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResultsNone
        DTE.Find.Action = vsFindAction.vsFindActionFind
        DTE.Find.Execute()
        DTE.ActiveDocument.Selection.Text = "default[i]"
    End Sub
    Sub UpdateToGCNew()

        DTE.Find.Action = vsFindAction.vsFindActionFind

        DTE.Find.FindWhat = " new "
        DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
        DTE.Find.MatchCase = False
        DTE.Find.MatchWholeWord = False
        DTE.Find.Backwards = False
        DTE.Find.MatchInHiddenText = False
        DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
        DTE.Find.Execute()
        DTE.ActiveDocument.Selection.Text = " gcnew "

    End Sub
    Sub UpdateHat()

        DTE.Find.Action = vsFindAction.vsFindActionFind

        DTE.Find.FindWhat = "\*"
        DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
        DTE.Find.MatchCase = False
        DTE.Find.MatchWholeWord = False
        DTE.Find.Backwards = False
        DTE.Find.MatchInHiddenText = False
        DTE.Find.PatternSyntax = vsFindPatternSyntax.vsFindPatternSyntaxWildcards
        DTE.Find.Execute()
        DTE.ActiveDocument.Selection.Text = "^"

    End Sub
    Sub UpdateHatAndGcNew()
        UpdateHat()
        UpdateToGCNew()
    End Sub
End Module
Comments [0]

Visual Studio Macro Documentation

Automation and Extensibility Reference

Functionality Differences Between Visual Studio Macros and Visual Studio

How to: Run Macros

Macros Samples

 I'll follow up with the macros I used to convert my project from managed extensions to C++/CLI

Comments [0]

What's New in Visual C++ Codename "Orcas"

 Found this in the new MSDN help.  Pretty nice feature this rebuild after an assembly change has driven us nuts for years. 

Managed Incremental Build Support
The compiler supports managed incremental builds

When you specify this option, the compiler will not recompile code when a referenced assembly changes. Instead it will perform an incremental build. Files are recompiled only if the changes affect the dependent code. For more information, see General Property Page (Project).

What's New in Visual C++ Codename "Orcas"

 

I have notice the online MSDN is much better now.  Slow but I do like the article version specific note along with links to newer and older versions.

image
Comments [0]

Packaged ASP.NET Programs

Scott posted a nice article Tip/Trick: Creating Packaged ASP.NET Setup Programs with VS 2005  for deploying your Visual Studio 2005 project.  While Scott's article is focused on deploying to a customer I have found those scenarios to be beyond what VS offers and requires Install shield.  I do this this post is a handy trick for moving your project from dev to QA to staging maybe even production.

Comments [0]

AJAX Control Toolkit Release

There was a new drop of the AJAX Control Toolkit 10606 release.

for more details about what was included see Delay's notes.  If you would like pics with that visit Shawn's notes.  And just to play with the new coolness.

Comments [0]

Debugging SQL Server 2005 Stored Procedures in Visual Studio

 4GuysFromRolla is offering a nice walk through of getting up and debugging with SQL 2005  using the Visual Studio IDE.

Debugging SQL Server 2005 Stored Procedures in Visual Studio

Comments [0]

Orcas Entity/ORM support

I was having some trouble figuring out how to use the new ado.net entity framework in the last March Orcas CTP, but leave it to Scott to have all the answers.  Scott has posted a nice video covering

  • new asp.net WYSIWYG HTML designer.
  • create classes's from the ORM designer.
  • Intellisense for LINQ.

full detailed blog post.  And you can find the video here.

Comments [0]

Beta 1 Of Orcas Released Into The Wild

Incase you missed it yesterday Soma announced the release of Orcas Beta 1, it can be downloaded here.

Comments [0]

LINQ == Warm Fuzzy Feeling

I was taking a look at Scott Guthrie's Developing Data-Driven Web Applications using LINQ.  This is going to make life a little less dreary.

I like the second to the  last line results.Skip(startRow).Take(10);

Comments [0]