Browse by Tags

Tagged Content List
  • Blog Post: DateTime.UtcNow is generally preferable to DateTime.Now

    This seems to be commonly known and accepted best practice to use DateTime.UtcNow for non-user facing scenarios such as time interval and timeout measurement. I’ve just done an audit of the Roslyn codebase and replaced most DateTime.Now calls with DateTime.UtcNow. I thought it’d be useful to post my...
  • Blog Post: How to get DTE from Visual Studio process ID?

    DTE is an automation framework that is used to programmatically control Visual Studio, often from another process. It internally uses COM remoting to execute commands from another process on the VS UI thread. A while back I have written about How to start Visual Studio programmatically and get the...
  • Blog Post: ' is in XML, in HTML use '

    I just got hit by a very confusing "by design" behavior and it took me a while to figure out what's going on. Here is the line of code: text = System.Security. SecurityElement . Escape (text); This method replaces invalid XML characters in a string with their valid XML equivalent. ...
  • Blog Post: Unable to cast COM object … to IVsGlobalUndoCapableUndoManager

    Hi all, sorry for the absense – we're all really busy fixing Visual Studio 2010 performance, memory consumption, improving stability and fixing last minute bugs. Good news: if you're seeing this: Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.VisualStudio.Editor.Implementation...
  • Blog Post: Saving images (.bmp, .png, etc) in WPF/Silverlight

    I’ve recently added a new feature to Live Geometry that allows users to save the current drawing as a bitmap or a .png file. Just push the save button and pick the desired image format in the Save dialog: Fortunately, both WPF and Silverlight support saving full visual contents of any visual into a file...
  • Blog Post: Dump Environment Folder Paths

    This is just a quick snippet to dump the value of Environment.GetFolderPath for all special folders on a machine (so I don’t have to write it again next time): public static string DumpEnvironmentPaths() { var paths = Enum .GetValues( typeof ( Environment . SpecialFolder )) .Cast< Environment...
  • Blog Post: Tip: Don’t enter your CodePlex credentials every time

    I just ran across an awesome tip at Scott’s blog that is going to save me a whole lot of time: Save Your Codeplex Repository Credentials I was entering my username and password everytime I connected to a CodePlex TFS server. Now I don’t have to! P.S. To make this work on XP, go to Control Panel –>...
  • Blog Post: Visual Studio disappears when creating a Silverlight 3 Application

    I have Visual Studio 2008 SP1 and Silverlight 3 tools on the laptop I’m writing this post on. Ten minutes ago I was trying to create a new Silverlight 3 application through the New Project Dialog and after creating the project Visual Studio just disappeared on me. Usually when VS disappears instantly...
  • Blog Post: Visual Studio 2010 Beta1 + TFS + HTTPS (TF31001): The ServicePointManager does not support proxies with the https scheme.

    This is just a little note to myself and others who might run into this. I was using Visual Studio 2010 and Team Foundation Client to access a CodePlex project over HTTPS (port 443), and got this error message: --------------------------- Microsoft Visual Studio --------------------------- Microsoft...
  • Blog Post: Remote Desktop: /span across multiple monitors

    I spent some time searching the web about Remote Desktop, fullscreen and multiple monitors, so I decided to write down my findings to avoid having to search for them again. /span for multiple monitors If you pass /span to mstsc.exe, the target session’s desktop will become a huge rectangle that equals...
  • Blog Post: A common globalization bug

    I’ve just found and fixed a globalization bug in our test infrastructure where a feature of our testcase management system (resetting a testcase to re-run on a lab machine) just wouldn’t work on a Russian OS. Fortunately, the call stack was easy to investigate: (sorry it’s in Russian - globalization...
  • Blog Post: Making the XAML editor fast

    If you use WPF/Silverlight and prefer working with XAML only (i.e. no visual designer), you can significantly, I repeat, significantly speed-up the XAML editor. Check out this tip from Fabrice Marguerie : Life changer XAML tip for Visual Studio
  • Blog Post: How to disable optimizations during debugging

    Sooner or later you may run into a situation where you need to evaluate a local variable under debugger and all you get is this: "Cannot obtain value of local or argument 'whatever' as it is not available at this instruction pointer, possibly because it has been optimized away'. Well, it turns out...
  • Blog Post: Kirill's Visual Studio Tips

    I decided to compile a small list of Visual Studio features that I use a lot. Code Editor Code Snippets for ‘prop’, ‘foreach’, ‘if’, ‘class’, ‘interface’, Tab-Tab completion Surround with (snippets) - try, if Ctrl+K,D – FormatDocument Ctrl+Left/Right arrows in code editor – jump between...
  • Blog Post: How to determine the .NET installation directory and CLR version

    I recently discovered the System.Runtime.InteropServices. RuntimeEnvironment class, especially RuntimeEnvironment.GetRuntimeDirectory(). Also, RuntimeEnvironment.GetSystemVersion() gets the version of the CLR that is running the current process.
  • Blog Post: Coding productivity: macros, shortcuts and snippets

    Visual Studio macros are a fantastic productivity booster, which is often under-estimated. It's so easy to record a macro for your repetitive action and then just play it back. Even better, map a macro to a keyboard shortcut. I'll share a couple of examples. InsertCurlies If you open up Visual Studio...
Page 1 of 1 (16 items)