<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.professionalvisualstudio.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Professional Visual Studio</title>
	
	<link>http://www.professionalvisualstudio.com/blog</link>
	<description>Tips, Tricks, and Best Practices for professional .NET developers</description>
	<lastBuildDate>Tue, 23 Jun 2009 00:00:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.professionalvisualstudio.com/ProfessionalVisualStudio" type="application/rss+xml" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>No Deploy = No Debugging for Windows Mobile Application</title>
		<link>http://www.professionalvisualstudio.com/blog/2009/06/23/no-deploy-no-debugging-for-windows-mobile-application/</link>
		<comments>http://www.professionalvisualstudio.com/blog/2009/06/23/no-deploy-no-debugging-for-windows-mobile-application/#comments</comments>
		<pubDate>Tue, 23 Jun 2009 00:00:31 +0000</pubDate>
		<dc:creator>Nick Randolph</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.professionalvisualstudio.com/blog/2009/06/23/no-deploy-no-debugging-for-windows-mobile-application/</guid>
		<description><![CDATA[When you build and run a Windows Mobile (ie .NET Compact Framework) application from with Visual Studio it does a number of things in the background. After building your application it has to deploy it out to the device or emulator that you want to run it on. It then of course has to attach [...]]]></description>
			<content:encoded><![CDATA[<p>When you build and run a Windows Mobile (ie .NET Compact Framework) application from with Visual Studio it does a number of things in the background. After building your application it has to deploy it out to the device or emulator that you want to run it on. It then of course has to attach to the remote process so that you can step through your code in the debugger.</p>
<p>One of the issues with using a single solution for building both Windows Mobile and desktop (or even web applications) is that when you do a build, by default, the Windows Mobile application will not only build, it will try to deploy to the device or emulator.&#160; This can add a few extra seconds to every build so it’s not something you want happening on every build. </p>
<p>Luckily there is a quick way to disable this functionality: Right-click on the solution node in Solution Explorer and select Configuration Manager.&#160; You will see that there is an additional column entitled Deploy and you’ll see that the mobile application has a check in this column. If you uncheck this your mobile application will not be deployed on each build.</p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/06/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/06/image-thumb2.png" width="465" height="195" /></a> </p>
<p>There is one little gotcha here – if you are not careful you will experience a number of side effects:</p>
<ul>
<li>Build and run will <strong>NOT </strong>run the latest version of your mobile application.&#160; It will build it but because you have not told it to deploy your application it will run the last instance of your application to be deployed to the device.</li>
<li>If this is the first time you are running your application there is no previous version of your application on the device, so you will see a prompt similar to the following:</li>
</ul>
<blockquote><p>Unable to start program &#8216;%CSIDL_PROGRAM_FILES%\MobileApp\MobileApp.exe&#8217;. </p>
<p>The system cannot find the file specified. </p>
</blockquote>
<p>There are two ways to address this:</p>
<ol>
<li>You can force a deploy by right-clicking your mobile application project in Solution Explorer and selecting the Deploy option. Now when you run your application it will run the version you have just deployed.</li>
<li>You can create different build configurations – one for doing destop development and debugging, and one for doing mobile development and debugging.&#160; In the former you can uncheck the build and deploy checkboxes for the mobile application.&#160; In the latter you need to check both the build and deploy checkboxes for the mobile applications (note: you don’t need to deploy mobile class libraries so long as they are referenced by the actual mobile application as they will automatically get deployed along with the application).</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.professionalvisualstudio.com/blog/2009/06/23/no-deploy-no-debugging-for-windows-mobile-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wix, Votive and Visual Studio 2010</title>
		<link>http://www.professionalvisualstudio.com/blog/2009/06/19/wix-votive-and-visual-studio-2010/</link>
		<comments>http://www.professionalvisualstudio.com/blog/2009/06/19/wix-votive-and-visual-studio-2010/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 02:22:12 +0000</pubDate>
		<dc:creator>Nick Randolph</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.professionalvisualstudio.com/blog/2009/06/19/wix-votive-and-visual-studio-2010/</guid>
		<description><![CDATA[There has been some confusion as to whether Wix will ship with Visual Studio 2010.&#160; The latest I’ve seen is that it will not ship as part of the product.&#160; However, the good news is that if you go to the Votive website you can already download a weekly build of the Wix Toolset that [...]]]></description>
			<content:encoded><![CDATA[<p>There has been some confusion as to whether Wix will ship with Visual Studio 2010.&#160; The latest I’ve seen is that it <a href="http://robmensching.com/blog/posts/2009/4/1/Visual-Studio-will-not-ship-the-WiX-toolset-contributes-only">will not ship as part of the product</a>.&#160; However, the good news is that if you go to the <a href="http://wix.sourceforge.net/votive.html">Votive website</a> you can already download a <a href="http://wix.sourceforge.net/releases/">weekly build</a> of the Wix Toolset that will register itself with the beta of VS2010.</p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/06/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/06/image-thumb1.png" width="447" height="349" /></a> </p>
<p>Whilst the v3.5 toolset will install and register against Visual studio 2008 as well, you will need to update your wix projects to point to the v3.5 targets:</p>
<blockquote><p>&lt;WixTargetsPath Condition=&quot; &#8216;$(WixTargetsPath)&#8217; == &#8221; &quot;&gt;$(MSBuildExtensionsPath)\Microsoft\WiX\<strong>v3.5</strong>\Wix.targets&lt;/WixTargetsPath&gt; </p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.professionalvisualstudio.com/blog/2009/06/19/wix-votive-and-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 Extension Manager</title>
		<link>http://www.professionalvisualstudio.com/blog/2009/06/15/visual-studio-2010-extension-manager/</link>
		<comments>http://www.professionalvisualstudio.com/blog/2009/06/15/visual-studio-2010-extension-manager/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 02:09:33 +0000</pubDate>
		<dc:creator>Nick Randolph</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.professionalvisualstudio.com/blog/2009/06/15/visual-studio-2010-extension-manager/</guid>
		<description><![CDATA[New to Visual Studio 2010 is the Extension Manager (accessible via the Tools –&#62; Extension Manager menu item).&#160; This allows you to access the Visual Studio Gallery directly from with Visual Studio, where you can search and download extensions to Visual Studio that will help you work more productively.&#160; 
 
The Extension Manager is just [...]]]></description>
			<content:encoded><![CDATA[<p>New to Visual Studio 2010 is the Extension Manager (accessible via the Tools –&gt; Extension Manager menu item).&#160; This allows you to access the <a href="http://visualstudiogallery.com">Visual Studio Gallery</a> directly from with Visual Studio, where you can search and download extensions to Visual Studio that will help you work more productively.&#160; </p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/06/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/06/image-thumb.png" width="507" height="275" /></a> </p>
<p>The Extension Manager is just one of the many ways that Microsoft is opening up Visual Studio 2010 as a platform, not just a best of breed IDE for developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.professionalvisualstudio.com/blog/2009/06/15/visual-studio-2010-extension-manager/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visualising Method Calls with Reference Highlighting in Visual Studio 2010</title>
		<link>http://www.professionalvisualstudio.com/blog/2009/05/23/visualising-method-calls-with-reference-highlighting-in-visual-studio-2010/</link>
		<comments>http://www.professionalvisualstudio.com/blog/2009/05/23/visualising-method-calls-with-reference-highlighting-in-visual-studio-2010/#comments</comments>
		<pubDate>Sat, 23 May 2009 03:51:24 +0000</pubDate>
		<dc:creator>Nick Randolph</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.professionalvisualstudio.com/blog/2009/05/23/visualising-method-calls-with-reference-highlighting-in-visual-studio-2010/</guid>
		<description><![CDATA[One of the smaller features that has made its way into Visual Studio 2010 is Reference Highlighting. The following screenshot illustrates how all calls to the method MethodToBeCalled, as well as the method itself, have been highlighted. This means that you can easily scan up and down a file to see where this method has [...]]]></description>
			<content:encoded><![CDATA[<p>One of the smaller features that has made its way into Visual Studio 2010 is Reference Highlighting. The following screenshot illustrates how all calls to the method <em>MethodToBeCalled</em>, as well as the method itself, have been highlighted. This means that you can easily scan up and down a file to see where this method has been called (quicker than calling Find All References or loading the new Quick Search window)</p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/05/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/05/image-thumb.png" width="459" height="244" /></a> </p>
<p>At this stage this feature doesn’t appear to work across files (ie selecting a method in one file and seeing it highlighted in other open files) or across assemblies (ie selecting a method call in the code of one assembly and seeing a highlight appear in another file from a different assembly).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.professionalvisualstudio.com/blog/2009/05/23/visualising-method-calls-with-reference-highlighting-in-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 and .NET Framework 4 Cheat Sheet and Training Kit</title>
		<link>http://www.professionalvisualstudio.com/blog/2009/05/22/visual-studio-2010-and-net-framework-4-cheat-sheet-and-training-kit/</link>
		<comments>http://www.professionalvisualstudio.com/blog/2009/05/22/visual-studio-2010-and-net-framework-4-cheat-sheet-and-training-kit/#comments</comments>
		<pubDate>Fri, 22 May 2009 00:54:49 +0000</pubDate>
		<dc:creator>Nick Randolph</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.professionalvisualstudio.com/blog/?p=261</guid>
		<description><![CDATA[Dan Fernandez has posted a Cheat Sheet which will help you get started with Beta 1 of Visual Studio 2010 and the .NET Framework 4.  I noticed that one of the links in his list is that of the Visual Studio 2010 and .NET Framework 4 Training Kit &#8211; May Preview.  The previous training kit [...]]]></description>
			<content:encoded><![CDATA[<p>Dan Fernandez has posted a <a href="http://blogs.msdn.com/danielfe/archive/2009/05/20/visual-studio-2010-beta-1-cheat-sheet.aspx"><span style="color: #aa0000;">Cheat Sheet</span></a> which will help you get started with Beta 1 of Visual Studio 2010 and the .NET Framework 4.  I noticed that one of the links in his list is that of the <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=752cb725-969b-4732-a383-ed5740f02e93&amp;displayLang=en"><span style="color: #aa0000;">Visual Studio 2010 and .NET Framework 4 Training Kit &#8211; May Preview</span></a>.  The previous training kit was really useful as it provided a number of worked examples that highlighted new features of the product and framework. Microsoft have committed to update this training kit, saying that they will make it available for each beta/rc and the final rtm product to help developers skill up with the new features.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.professionalvisualstudio.com/blog/2009/05/22/visual-studio-2010-and-net-framework-4-cheat-sheet-and-training-kit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VS2010 and .NET Framework 4.0 Beta 1 announcement roundup</title>
		<link>http://www.professionalvisualstudio.com/blog/2009/05/19/vs2010-and-net-framework-40-beta-1-announcement-roundup/</link>
		<comments>http://www.professionalvisualstudio.com/blog/2009/05/19/vs2010-and-net-framework-40-beta-1-announcement-roundup/#comments</comments>
		<pubDate>Tue, 19 May 2009 04:29:36 +0000</pubDate>
		<dc:creator>Dave Gardner</dc:creator>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[VS2010]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.professionalvisualstudio.com/blog/?p=256</guid>
		<description><![CDATA[For those of you who love the bleeding edge, Beta 1 of Visual Studio 2010 and .NET Framework 4.0 has been released to MSDN subscribers (general availability on Wednesday). Here&#8217;s a few of the more useful posts:

Jason Zander has a great post explaining a lot of the new functionality.
Phil Haack gives the low-down on ASP.NET [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who love the bleeding edge, Beta 1 of Visual Studio 2010 and .NET Framework 4.0 has been released to MSDN subscribers (general availability on Wednesday). Here&#8217;s a few of the more useful posts:</p>
<ul>
<li>Jason Zander has a great post <a href="http://blogs.msdn.com/jasonz/archive/2009/05/18/announcing-vs2010-net-framework-4-0-beta-1.aspx">explaining a lot of the new functionality</a>.</li>
<li>Phil Haack gives the <a href="http://www.haacked.com/archive/2009/05/18/aspnetmvc-vs2010-beta1.aspx">low-down on ASP.NET MVC with this beta</a>.</li>
<li>The documentation has also be <a href="http://msdn.microsoft.com/en-us/library/dd831853(VS.100).aspx">released to MSDN</a>.</li>
<li>On Twitter everyone is <a href="http://search.twitter.com/search?q=%23vs10">discussing this using the #vs10 hashtag</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.professionalvisualstudio.com/blog/2009/05/19/vs2010-and-net-framework-40-beta-1-announcement-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Installing Multiple SKUs on a Single Machine for Better Performance</title>
		<link>http://www.professionalvisualstudio.com/blog/2009/05/04/tip-installing-multiple-skus-on-a-single-machine-for-better-performance/</link>
		<comments>http://www.professionalvisualstudio.com/blog/2009/05/04/tip-installing-multiple-skus-on-a-single-machine-for-better-performance/#comments</comments>
		<pubDate>Mon, 04 May 2009 00:41:33 +0000</pubDate>
		<dc:creator>Nick Randolph</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.professionalvisualstudio.com/blog/2009/05/04/tip-installing-multiple-skus-on-a-single-machine-for-better-performance/</guid>
		<description><![CDATA[Visual Studio has been around for so long and has gone through so many changes in recent years to accommodate different technologies that quite often it gets bogged down in it’s own wait.&#160; In the VS2005 release a little toolbar notification bubble was added to indicate that Visual Studio was still thinking – useless and [...]]]></description>
			<content:encoded><![CDATA[<p>Visual Studio has been around for so long and has gone through so many changes in recent years to accommodate different technologies that quite often it gets bogged down in it’s own wait.&#160; In the VS2005 release a little toolbar notification bubble was added to indicate that Visual Studio was still thinking – useless and almost as annoying as Clippy.&#160; Essentially Visual Studio has become so bloated that it takes up more memory and other resources than most applications developers will build.</p>
<p>Unfortunately if you just want to open a single file or a project just to look something up you need to load up the entire Visual Studio IDE.&#160; Here’s a tip from <a href="http://roodyn.com/WhereIs.aspx">Dr Neil</a> at <a href="http://www.nsquaredsolutions.com">nsquared solutions</a>: Install the express skus (eg <a href="http://www.microsoft.com/express/download/">Visual Basic 2008 Express, Visual C# 2008 Express or Visual Web Developer 2008 Express</a>) and use those to open these files.&#160; These skus can be installed alongside the professional version and are much lighter wait. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.professionalvisualstudio.com/blog/2009/05/04/tip-installing-multiple-skus-on-a-single-machine-for-better-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging Threads in Visual Studio with Breakpoint Conditions and Actions</title>
		<link>http://www.professionalvisualstudio.com/blog/2009/04/30/debugging-threads-in-visual-studio-with-breakpoint-conditions-and-actions/</link>
		<comments>http://www.professionalvisualstudio.com/blog/2009/04/30/debugging-threads-in-visual-studio-with-breakpoint-conditions-and-actions/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 00:02:08 +0000</pubDate>
		<dc:creator>Nick Randolph</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.professionalvisualstudio.com/blog/2009/04/30/debugging-threads-in-visual-studio-with-breakpoint-conditions-and-actions/</guid>
		<description><![CDATA[One of the challenges with debugging applications with multiple threads in Visual Studio is that when you place a breakpoint you tend to interrupt the flow of the application.&#160; This can often mean that tracking down an issue is very time consuming.&#160; Let’s take a very simple example where we have a thread that performs [...]]]></description>
			<content:encoded><![CDATA[<p>One of the challenges with debugging applications with multiple threads in Visual Studio is that when you place a breakpoint you tend to interrupt the flow of the application.&#160; This can often mean that tracking down an issue is very time consuming.&#160; Let’s take a very simple example where we have a thread that performs a task then sleeps for 100 milliseconds.</p>
<blockquote><p>private void ThreadWork()     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; for (int i = 0; i &lt; 100000; i++)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DoWork();      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.Threading.Thread.Sleep(100);      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
</blockquote>
<p>Now say that something is going wrong on this thread, the first thing we can do is to place a normal breakpoint:</p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image-thumb.png" width="408" height="125" /></a> </p>
<p>Here we can see a regular breakpoint that has been hit and notice that you can hover over variables to see what their current values are. But what happens if the error only happens after say 1000 iterations.&#160; We can use a breakpoint hit count to limit when the breakpoint is hit. Right clicking the line with the breakpoint you can set the Hit Count property via the Breakpoint –&gt; Hit Count… menu item.</p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image-thumb1.png" width="398" height="206" /></a> </p>
<p>In this case we want the breakpoint to be hit after 1000 cycles:</p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image-thumb2.png" width="387" height="175" /></a> </p>
<p>Note that setting the Hit Count sets up a rule where by the breakpoint will be hit based on the number of times the line has been executed.&#160; If the loop was instead modified to the following the breakpoint would be hit after 1000 * 100 iterations of the for loop, rather than the 1000 iterations we wanted.</p>
<blockquote><p>for (int i = 0; i &lt; 100000; i++)     <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if (i % 100 == 0)      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; {      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; DoWork();      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; System.Threading.Thread.Sleep(100);      <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</p>
</blockquote>
<p>To get around this we can use a breakpoint Condition.&#160; Again this can be set using the Breakpoint –&gt; Condition menu item from the right-click menu.</p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image3.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image-thumb3.png" width="381" height="185" /></a> </p>
<p>In this case every time the breakpoint line is reached the expression <em>i&gt;=1000</em> will be evaluated and the result used to determine if the breakpoint has been reached.&#160; Note that this expression can be as complex as you would like but it does add an overhead to execution.&#160; If timing is important then you should make this expression as simple as possible.</p>
<p>If you have specified either a Hit Count or a Condition you will see that the marking alongside your code has changed slightly.&#160; Instead of the normal red dot, you should now see a red dot with a white plus sign inside it.</p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image4.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image-thumb4.png" width="371" height="38" /></a> </p>
<p>One thing to be aware of is that Hit Count and Conditions are <strong>not</strong> mutually exclusive which means that you have have both of them set.&#160; As they use the same breakpoint marking it’s not that easy to see if they have both been set.&#160; However if you right-click the breakpoint line you will see that the menu actually indicates which items have been set.</p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image5.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image-thumb5.png" width="388" height="161" /></a> </p>
<p>Unfortunately the process of actually stopping the execution of your application at a breakpoint often has the side effect of hiding or obscuring the issue you are trying to track down.&#160; Luckily there is a way that you can write an output to the output window and continue execution.&#160; From the right-click menu select the Breakpoint –&gt; When Hit… item.</p>
<p><a href="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image6.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.professionalvisualstudio.com/blog/wp-content/uploads/2009/04/image-thumb6.png" width="394" height="332" /></a> </p>
<p>This dialog allows you to either specify an output to be written to the output window or to run a macro.&#160; You can also toggle whether execution continues or breaks when the breakpoint is hit.</p>
<p>In this screen shot the output consists of a number of parts.&#160; Essentially the output is just a string literal that will be printed to the output window.&#160; However, $FUNCTION is a predefined value corresponding to the current function name which will be substituted into the output.&#160; The dialog points out that there are a number of other predefined values that can be used.&#160; Quite often you will want to put your own custom values in there – this is where the { &lt;expression&gt; } syntax is used.&#160; In this case we have chosen just to output the value of the variable i, but we could make this expression more complex so long as it can be converted to a string. Again the more complex this expression is the more it will affect your application.</p>
<p>Now when your breakpoint is encountered by your application it will no longer break, it will simply write a string to the output window.&#160; This can help you track down issues on background threads without affecting your application execution significantly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.professionalvisualstudio.com/blog/2009/04/30/debugging-threads-in-visual-studio-with-breakpoint-conditions-and-actions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2008 SP1 Crashes</title>
		<link>http://www.professionalvisualstudio.com/blog/2009/04/20/visual-studio-2008-sp1-crashes/</link>
		<comments>http://www.professionalvisualstudio.com/blog/2009/04/20/visual-studio-2008-sp1-crashes/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 04:21:13 +0000</pubDate>
		<dc:creator>Nick Randolph</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.professionalvisualstudio.com/blog/2009/04/20/visual-studio-2008-sp1-crashes/</guid>
		<description><![CDATA[Over the last couple of weeks Visual Studio has started to infuriate me.&#160; First it was the WPF designer and just now it was adding new items to the toolbox.&#160; Essentially what was happening was that Visual Studio would just disappear; no errors, no dialogs, no crash report.&#160; 
The WPF designer issue crops up whenever [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last couple of weeks Visual Studio has started to infuriate me.&#160; First it was the WPF designer and just now it was adding new items to the toolbox.&#160; Essentially what was happening was that Visual Studio would just disappear; no errors, no dialogs, no crash report.&#160; </p>
<p>The WPF designer issue crops up whenever I wanted to edit a xaml file.&#160; I’d tried opening it as XAML only but to no avail.&#160; Opening it as just xml works and allows changes but of course you lose all your intellisense (writing XAML is a pita at the best of time and just a miserable experience if you don’t have intellisense).&#160; I half resolved this issue: Karl has a post <a href="http://karlshifflett.wordpress.com/2009/03/13/clr-hotfix-available-for-visual-studio-2008-rapid-crashing/">here</a> that points to a hotfix that works on all platforms except Windows 7 (that would be me). My resolution involved moving to a different machine that wasn’t running Windows 7 when doing WPF work.</p>
<p>Now when I went to add a new item to the toolbox this morning I ran into what appeared to be the same issue.&#160; This <a href="https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=363321">connect issue</a> shows a number of people seeing the same issue.&#160; Most of them have found solace in removing <a href="http://code.msdn.microsoft.com/PowerCommands">PowerCommands</a>, even if they didn’t have it installed in the first place. However, the workaround is actually to run Visual Studio in safe mode (ie devenv /safemode) as discussed <a href="https://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=363321">here</a> and <a href="http://www.tech-archive.net/Archive/VisualStudio/microsoft.public.vsnet.ide/2008-03/msg00083.html">here</a>.&#160; </p>
]]></content:encoded>
			<wfw:commentRss>http://www.professionalvisualstudio.com/blog/2009/04/20/visual-studio-2008-sp1-crashes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ramping up for Visual Studio 2010 and .NET Framework 4</title>
		<link>http://www.professionalvisualstudio.com/blog/2009/03/25/ramping-up-for-visual-studio-2010-and-net-framework-4/</link>
		<comments>http://www.professionalvisualstudio.com/blog/2009/03/25/ramping-up-for-visual-studio-2010-and-net-framework-4/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 07:33:39 +0000</pubDate>
		<dc:creator>Nick Randolph</dc:creator>
				<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.professionalvisualstudio.com/blog/2009/03/25/ramping-up-for-visual-studio-2010-and-net-framework-4/</guid>
		<description><![CDATA[That’s right it’s time to start looking into the future at what’s coming down the line with the next iteration of both Visual Studio 2010 and the .NET Framework 4. Luckily, there is an awesome Channel 9 show called 10-4 that is covering a range of topics.&#160; These are based on the currently available CTP [...]]]></description>
			<content:encoded><![CDATA[<p>That’s right it’s time to start looking into the future at what’s coming down the line with the next iteration of both Visual Studio 2010 and the .NET Framework 4. Luckily, there is an awesome Channel 9 show called 10-4 that is covering a range of topics.&#160; These are based on the currently available CTP and provides a great starting point for getting familiar with what’s in the next release of these products.</p>
<p>So far, here’s a rough list of episodes:</p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-1-Working-with-the-Visual-Studio-2010-CTP-VPC/">10-4 Episode 1: Working with the Visual Studio 2010 CTP VPC</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-2-Welcome-to-Visual-Studio-2010/">10-4 Episode 2: Welcome to Visual Studio 2010</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-3-ASPNET-WebForms-40/">10-4 Episode 3: ASP.NET WebForms 4.0</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-4-No-More-Parallel-Development-Pain/">10-4 Episode 4: No More Parallel Development Pain</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-5-Code-Focused-in-Visual-Studio-2010/">10-4 Episode 5: Code Focused in Visual Studio 2010</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-6-Parallel-Extensions/">10-4 Episode 6: Parallel Extensions</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-7-No-More-Planning-Black-Box/">10-4 Episode 7: No More Planning Black Box</a> </p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-8-ASPNET-AJAX-40/">10-4 Episode 8: Pure Client-Side Development with ASP.NET AJAX 4.0</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-9-Visual-Basic-10/">10-4 Episode 9: Visual Basic 10</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-10-Making-Web-Deployment-Easier/">10-4 Episode 10: Making Web Deployment Easier</a> </p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-11-Bi-Directional-Routing-with-ASPNET-WebForms-40/">10-4 Episode 11: Bi-Directional Routing with ASP.NET WebForms 4.0</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-12-Simplifying-Your-Code-With-C-40/">10-4 Episode 12: Simplifying Your Code With C# 4.0</a></p>
<p>[Updates]</p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-13-No-More-Late-Surprises/">10-4 Episode 13: No More Late Surprises</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-14-Sentient-DSLs/">10-4 Episode 14: Sentient DSLs</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-15-Model-First-Development-with-the-Entity-Framework-40/">10-4 Episode 15: Model-First Development with the Entity Framework 4.0</a></p>
<p><a href="http://channel9.msdn.com/shows/10-4/10-4-Episode-16-Windows-Workflow-4/">10-4 Episode 16: Windows Workflow 4</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.professionalvisualstudio.com/blog/2009/03/25/ramping-up-for-visual-studio-2010-and-net-framework-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
