<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>Gorancic.com &#187; Macros</title>
	<atom:link href="http://www.gorancic.com/blog/tag/macros/feed" rel="self" type="application/rss+xml" />
	<link>http://www.gorancic.com/blog</link>
	<description>Gorancic.com Blog</description>
	<lastBuildDate>Sun, 09 May 2010 11:25:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Visual Studio: How to build only the StartUp project</title>
		<link>http://www.gorancic.com/blog/net/visual-studio-how-to-build-only-the-startup-project</link>
		<comments>http://www.gorancic.com/blog/net/visual-studio-how-to-build-only-the-startup-project#comments</comments>
		<pubDate>Fri, 10 Oct 2008 02:52:13 +0000</pubDate>
		<dc:creator>Beno Gorancic</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[Macros]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.gorancic.com/blog/?p=44</guid>
		<description><![CDATA[Have you ever found yourself working on a Visual Studio solution consisting of multiple projects and wanting to build only the start-up project using a shortcut key?
Unfortunately for some bizarre reason Visual Studio 2005 and 2008 do not have this feature by default.  However, there is a simple solution to this. Create a macro and [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever found yourself working on a Visual Studio solution consisting of multiple projects and wanting to build only the start-up project using a shortcut key?</p>
<p>Unfortunately for some bizarre reason Visual Studio 2005 and 2008 do not have this feature by default.  However, there is a simple solution to this. Create a macro and assign it a shortcut key.</p>
<p>First create a new macro module though Tools &gt; Macros with the following code</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="vbnet" style="font-family:monospace;"><span style="color: #0600FF;">Imports</span> System
<span style="color: #0600FF;">Imports</span> EnvDTE
<span style="color: #0600FF;">Imports</span> EnvDTE80
<span style="color: #0600FF;">Imports</span> System.<span style="color: #0000FF;">Diagnostics</span>
&nbsp;
<span style="color: #FF8000;">Public</span> Module BuildStartup
    <span style="color: #0600FF;">Sub</span> BuildStartup<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
        DTE.<span style="color: #0000FF;">Solution</span>.<span style="color: #0000FF;">SolutionBuild</span>.<span style="color: #0000FF;">BuildProject</span><span style="color: #000000;">&#40;</span>DTE.<span style="color: #0000FF;">Solution</span>.<span style="color: #0000FF;">SolutionBuild</span>.<span style="color: #0000FF;">ActiveConfiguration</span>.<span style="color: #0000FF;">Name</span>, DTE.<span style="color: #0000FF;">Solution</span>.<span style="color: #0000FF;">SolutionBuild</span>.<span style="color: #0000FF;">StartupProjects</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span>, <span style="color: #0600FF;">False</span><span style="color: #000000;">&#41;</span>
    <span style="color: #0600FF;">End</span> <span style="color: #0600FF;">Sub</span>
<span style="color: #0600FF;">End</span> Module</pre></td></tr></table></div>

<p>Now that you have the macro, you simply assign it a shortcut key through Tools &gt; Options.  Look for &#8220;Keyboard” under “Environment”.  Find your macro in the command list and assign it a shortcut key.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gorancic.com/blog/net/visual-studio-how-to-build-only-the-startup-project/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
