<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Visual Studio on Bits and Pieces</title>
		<link>https://bits.strawjackal.org/tags/visual-studio/</link>
		<description>Recent content in Visual Studio on Bits and Pieces</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Wed, 30 Jan 2013 14:34:55 +0200</lastBuildDate>
		
			<atom:link href="https://bits.strawjackal.org/tags/visual-studio/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Attaching on Startup</title>
				<link>https://bits.strawjackal.org/70/</link>
				<pubDate>Wed, 30 Jan 2013 14:34:55 +0200</pubDate>
				<guid>https://bits.strawjackal.org/70/</guid>
				<description>&lt;p&gt;Here’s a neat trick I stumbled onto that can make life a lot easier – in our development workstations, certainly, and even in a pinch on staging and testing machines:&lt;/p&gt;&#xA;&lt;p&gt;How many times have you wished you could attach to a process immediately when it launchs? If we’re running a simple EXE, we can launch it from the debugger directly, but if we’re trying to debug a Windows Service, a scheduled task or a sub-process that is launched automatically, it isn’t that simple. We can try to press CTRL-ALT-P as quickly as possible, but that will almost always miss the very beginning. We can add a call to &lt;span style=&#34;font-family: Consolas;&#34;&gt;System.Diagnostics.Debugger.Launch()&lt;/span&gt; to our &lt;span style=&#34;font-family: Consolas;&#34;&gt;Application_Startup()&lt;/span&gt; function (or equivalent), but that’s polluting production code with debugging statements, and it isn’t really something we can send over to a staging or QA machine.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Surviving the Enterprise Application</title>
				<link>https://bits.strawjackal.org/62/</link>
				<pubDate>Tue, 01 Jan 2013 23:50:48 +0200</pubDate>
				<guid>https://bits.strawjackal.org/62/</guid>
				<description>&lt;p&gt;Many of us have worked on this sort of application: “The Monster”, “The Big One”, “The Behemoth”, or simply “The Enterprise Application”. You know the kind I mean: it’s a mess of dozens of projects and solutions. It requires setting up three console applications and two databases just so you can debug something (god forbid you could just launch it from within Visual Studio), and after making changes to some code, getting the updates DLLs to the right place can be a headache. The sheer amount of time wasted on getting around the architecture can be daunting, and changing this behavior, especially when the app has years of crud and not enough tests, is not something you want to take on yourself.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Remote Debugging through fire, snow or fog</title>
				<link>https://bits.strawjackal.org/54/</link>
				<pubDate>Thu, 19 Jul 2012 11:30:55 +0200</pubDate>
				<guid>https://bits.strawjackal.org/54/</guid>
				<description>&lt;p&gt;Remote Debugging in Visual Studio is a wonderful feature, especially during the later stages of testing and deployment, and even (if all else fails) when in production, but getting it to work is rarely smooth. Everything is fine if both the computer running VS and the one running the application are in the same domain, but when they aren’t, things start to break, fast. I&lt;/p&gt;  &lt;p&gt;So for those stuck debugging remote applications in different domains, here’s a quick guide to east the pain. &lt;/p&gt;</description>
			</item>
			<item>
				<title>Remote Debugging through fire, snow or fog</title>
				<link>https://bits.strawjackal.org/109/</link>
				<pubDate>Thu, 19 Jul 2012 10:23:10 +0200</pubDate>
				<guid>https://bits.strawjackal.org/109/</guid>
				<description>&lt;p&gt;Remote Debugging in Visual Studio is a wonderful feature, especially during the later stages of testing and deployment, and even (if all else fails) when in production, but getting it to work is rarely smooth. Everything is fine if both the computer running VS and the one running the application are in the same domain, but when they aren’t, things start to break, fast. I&lt;/p&gt;  &lt;p&gt;So for those stuck debugging remote applications in different domains, here’s a quick guide to east the pain. &lt;/p&gt;</description>
			</item>
			<item>
				<title>Upgrading all projects to .NET 3.5</title>
				<link>https://bits.strawjackal.org/118/</link>
				<pubDate>Sun, 25 May 2008 08:56:14 +0200</pubDate>
				<guid>https://bits.strawjackal.org/118/</guid>
				<description>&lt;p&gt;A simple macro to change the Target Framework for a project from .NET 2.0 to .NET 3.5, hacked together in a few minutes. This will fail for C++/CLI projects, and possibly VB.NET projects (haven&#39;t checked). Works fine for regular C# projects, as well as web projects:&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;div&gt;   &lt;pre style=&#34;padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &amp;#39;Courier New&amp;#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none&#34;&gt;&lt;span style=&#34;color: #0000ff&#34;&gt;For&lt;/span&gt; &lt;span style=&#34;color: #0000ff&#34;&gt;Each&lt;/span&gt; proj &lt;span style=&#34;color: #0000ff&#34;&gt;As&lt;/span&gt; Project &lt;span style=&#34;color: #0000ff&#34;&gt;In&lt;/span&gt; DTE.Solution.Projects&#xD;&#xA;   &lt;span style=&#34;color: #0000ff&#34;&gt;Try&lt;/span&gt;&#xD;&#xA;       proj.Properties.Item(&lt;span style=&#34;color: #006080&#34;&gt;&#34;TargetFramework&#34;&lt;/span&gt;).Value = 196613&#xD;&#xA;       Debug.Print(&lt;span style=&#34;color: #006080&#34;&gt;&#34;Upgraded {0} to 3.5&#34;&lt;/span&gt;, proj.Name)&#xD;&#xA;   &lt;span style=&#34;color: #0000ff&#34;&gt;Catch&lt;/span&gt; ex &lt;span style=&#34;color: #0000ff&#34;&gt;As&lt;/span&gt; Exception&#xD;&#xA;       Debug.Print(&lt;span style=&#34;color: #006080&#34;&gt;&#34;Failed to upgrade {0} to 3.5&#34;&lt;/span&gt;, proj.Name)&#xD;&#xA;   &lt;span style=&#34;color: #0000ff&#34;&gt;End&lt;/span&gt; &lt;span style=&#34;color: #0000ff&#34;&gt;Try&lt;/span&gt;&#xD;&#xA;&lt;p&gt;&lt;span style=&#34;color: #0000ff&#34;&gt;Next&lt;/span&gt; proj&lt;/pre&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Another minor C#/C&#43;&#43; difference - adding existing files</title>
				<link>https://bits.strawjackal.org/124/</link>
				<pubDate>Sun, 28 Oct 2007 14:35:24 +0200</pubDate>
				<guid>https://bits.strawjackal.org/124/</guid>
				<description>&lt;p&gt;Another minor detail that bit me for a few minutes today. I&#39;m posting this so I&#39;ll see it and remember, and possibly lodge it in other people&#39;s consciousness.&lt;/p&gt; &lt;p&gt;Using Visual Studio 2005, adding an existing .cs file to a C# project will cause a copy of that file to be created in the project directory. If I want to link to the original file, I need to explicitly choose Add As Link from the dropdown on the Add button. &lt;/p&gt;</description>
			</item>
			<item>
				<title>Sharepoint Extensions for Visual Studio - released!</title>
				<link>https://bits.strawjackal.org/149/</link>
				<pubDate>Wed, 28 Mar 2007 20:04:05 +0200</pubDate>
				<guid>https://bits.strawjackal.org/149/</guid>
				<description>&lt;p&gt;Finally, we have a full, RTM version of the Visual Studio extensions! &lt;br&gt;The download page says March 15th, but I haven&#39;t seen anyone mention it around yet - could it be just me that missed the boat? &lt;br&gt;I got it from Mark Bower&#39;s &lt;a href=&#34;http://blogs.msdn.com/bowerm/archive/2007/03/28/last-piece-in-the-jigsaw.aspx&#34;&gt;blog&lt;/a&gt;, but haven&#39;t seen it mentioned anywhere else.&lt;/p&gt; &lt;p&gt;On one hand, this is great – the last version was from November ’06, and crashed &lt;a href=&#34;http://weblogs.asp.net/avnerk/archive/2007/02/21/sharepoint-extensions-for-visual-studio-2005.aspx&#34;&gt;often&lt;/a&gt;. Deployment seemed to work only for empty web-part projects and the Solution Generator crashed when trying to dump a whole site.  &lt;p&gt;On the other hand, there are still many basic scenarios not covered by the tools – we can’t export a Publishing site into a site definition, or any list with a Lookup field. This is a &lt;i&gt;huge&lt;/i&gt; drawback.  I hope they release a newer version soon, or perhaps a set of MOSS extensions (rather than WSS) that supports these scenarios.  &lt;p&gt;Regardless, congrats to the team for releasing it for us, and keep up the good work.  &lt;p&gt;Get it here:  &lt;p&gt;&lt;a href=&#34;http://www.microsoft.com/downloads/details.aspx?FamilyID=19f21e5e-b715-4f0c-b959-8c6dcbdc1057&amp;DisplayLang=en&#34;&gt;http://www.microsoft.com/downloads/details.aspx?FamilyID=19f21e5e-b715-4f0c-b959-8c6dcbdc1057&amp;DisplayLang=en&lt;/a&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Visual Studio obstructing DebugView</title>
				<link>https://bits.strawjackal.org/179/</link>
				<pubDate>Tue, 20 Jun 2006 07:43:00 +0200</pubDate>
				<guid>https://bits.strawjackal.org/179/</guid>
				<description>&lt;P&gt;I&#39;ve mentioned it before, but &lt;A href=&#34;http://www.sysinternals.com/&#34;&gt;SysInternal&lt;/A&gt;&#39;s &lt;A href=&#34;http://www.sysinternals.com/Utilities/DebugView.html&#34;&gt;DebugView&lt;/A&gt; is a great utility. It allows you to get the Debug.WriteLine() strings from your application even when you&#39;re not attached with a debugger, as long as it was compiled in Debug mode. Very convenient.&lt;/P&gt;&#xD;&#xA;&lt;P&gt;Unfortunately, it&#39;s a bit hard to use when I&#39;m also actually doing work with Visual Studio. It seems that some bits of VS are also logging calls with the &lt;STRONG&gt;OutputDebugString &lt;/STRONG&gt;API call. I can live with the occasional message like this:&lt;/P&gt;&#xD;&#xA;&lt;BLOCKQUOTE dir=ltr style=&#34;MARGIN-RIGHT: 0px&#34;&gt;&#xD;&#xA;&lt;P&gt;&lt;FONT face=Verdana&gt;[3448] DllCanUnloadNow called for VSA7.dll&lt;BR&gt;[3448] DllCanUnloadNow returned S_FALSE&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&#xD;&#xA;&lt;P dir=ltr&gt;&lt;FONT face=Verdana&gt;&lt;FONT face=&#34;Times New Roman&#34;&gt;but getting these:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&#xD;&#xA;&lt;BLOCKQUOTE dir=ltr style=&#34;MARGIN-RIGHT: 0px&#34;&gt;&#xD;&#xA;&lt;P dir=ltr&gt;&lt;FONT face=Verdana&gt;[3448] Left. Enter HWND 90ea6&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&#xD;&#xA;&lt;P dir=ltr&gt;&lt;FONT face=Verdana&gt;&lt;FONT face=&#34;Times New Roman&#34;&gt;whenever I do &lt;STRONG&gt;anything&lt;/STRONG&gt; in Visual Studio is annoying, and quickly hides any pertinent debug messages I want to see.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;/FONT&gt;&#xD;&#xA;&lt;P dir=ltr&gt;Running  Microsoft Visual Studio 2005 Team Edition for Software Developers&lt;BR&gt;Version 8.0.50727.51  (QFE.050727-5100)&lt;BR&gt;Microsoft .NET Framework&lt;BR&gt;Version 2.0.50727&lt;/P&gt;</description>
			</item>
			<item>
				<title>I pity the fool who messes with CTRL-SHIFT-T.</title>
				<link>https://bits.strawjackal.org/223/</link>
				<pubDate>Mon, 22 Aug 2005 16:24:00 +0200</pubDate>
				<guid>https://bits.strawjackal.org/223/</guid>
				<description>&lt;p&gt;The Visual Studio IDE, among its myriad options and combinations and features and so forth, has a trio of rather odd key combinations:&lt;/p&gt; &lt;p&gt;CTRL-T - Interchanges the current letter and the one after it.&lt;br /&gt;CTRL-SHIFT-T - Same thing, only for the current word.&lt;br /&gt;ALT-SHIFT-T - Same thing, only for the current line.&lt;/p&gt; &lt;p&gt;These keybindings have been there at the very least since Visual Studio 4, where I first came across them. &lt;/p&gt;</description>
			</item>
	</channel>
</rss>
