<?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>Annoyed.ca &#187; Visual Studio</title>
	<atom:link href="http://annoyed.ca/category/technology/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://annoyed.ca</link>
	<description>Life - Technology</description>
	<lastBuildDate>Fri, 30 Mar 2012 21:58:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>The Inner Workings of *.vbproj Files: &lt;ProjectTypeGuids&gt;</title>
		<link>http://annoyed.ca/2008/12/23/the-inner-workings-of-vbproj-files-projecttypeguids/</link>
		<comments>http://annoyed.ca/2008/12/23/the-inner-workings-of-vbproj-files-projecttypeguids/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 02:58:26 +0000</pubDate>
		<dc:creator>Christopher Hyne</dc:creator>
				<category><![CDATA[ASP.Net]]></category>
		<category><![CDATA[ASP.Net MVC]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[S#arp Architecture]]></category>
		<category><![CDATA[VB.Net]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://annoyed.ca/2008/12/26/the-inner-workings-of-vbproj-files-projecttypeguids/</guid>
		<description><![CDATA[During the conversion of the S#arp Architecture template project from C# to VB.Net I inadvertently broke (at least) one thing: the ability to add ASP.Net MVC items directly to the SharpArch.Web project directly from the &#8220;Add New Items&#8230;&#8221; dialog. This &#8230; <a href="http://annoyed.ca/2008/12/23/the-inner-workings-of-vbproj-files-projecttypeguids/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>During the conversion of the S#arp Architecture template project from C# to VB.Net I inadvertently broke (at least) one thing: the ability to add ASP.Net MVC items directly to the SharpArch.Web project directly from the &#8220;Add New Items&#8230;&#8221; dialog. This led to <a href="http://stackoverflow.com/questions/386548/how-to-enable-aspnet-mvc-item-templates-for-sarp-architecture-project" target="_blank">my first question asked on StackOverflow.com</a> (which I ended up answering myself, 38 minutes later).</p>
<p>Turns out Visual Studio project files can have an element called &lt;ProjectTypeGuids&gt; which contains one or more guids identifying what type of project the file describes. ASP.Net MVC projects have a particular guid specified: <strong>{603c0e0b-db56-11dc-be95-000d561079b0}</strong>.</p>
<p>So I added this guid to both my SharpArch.Web project file and my SharpArch.Controllers project file, and now I can add new MVC template items directly from the &#8220;Add New Item&#8230;&#8221; dialog. Cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://annoyed.ca/2008/12/23/the-inner-workings-of-vbproj-files-projecttypeguids/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AnkhSVN is AWESOME!</title>
		<link>http://annoyed.ca/2008/10/25/ankhsvn-is-awesome/</link>
		<comments>http://annoyed.ca/2008/10/25/ankhsvn-is-awesome/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 01:45:23 +0000</pubDate>
		<dc:creator>Christopher Hyne</dc:creator>
				<category><![CDATA[AnkhSVN]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[VS2005]]></category>
		<category><![CDATA[VS2008]]></category>

		<guid isPermaLink="false">http://annoyed.ca/2008/10/25/ankhsvn-is-awesome/</guid>
		<description><![CDATA[What is AnkhSVN? It&#8217;s a Subversion source control provider for Visual Studio. It allows you to use Subversion for version control in Visual Studio rather than something like Visual SourceSafe. It&#8217;s also open-source and free. I can just hear some &#8230; <a href="http://annoyed.ca/2008/10/25/ankhsvn-is-awesome/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>What is <a href="http://ankhsvn.open.collab.net/" target="_blank">AnkhSVN</a>? It&#8217;s a Subversion source control provider for Visual Studio. It allows you to use Subversion for version control in Visual Studio rather than something like Visual SourceSafe. It&#8217;s also open-source and free.</p>
<p>I can just hear some people saying &#8220;I&#8217;ve tried AnkhSVN. It sucks. <a href="http://www.visualsvn.com/" target="_blank">VisualSVN</a> is the closest you can get to working Subversion / Visual Studio integration&#8221;. I can even hear a few people saying &#8220;They both suck. Who needs IDE integration anyway. <a href="http://tortoisesvn.tigris.org/" target="_blank">TortoiseSVN</a> from Windows Explorer is just fine&#8221;.</p>
<p>I have shared both of these views at various points in the last few years. But today I discovered and tried <strong><u><a href="http://blogs.open.collab.net/svn/2008/07/ankhsvn-20-fina.html" target="_blank">AnkhSVN 2.0</a></u></strong>! Huge difference! The new version is a nearly complete rewrite. It&#8217;s no longer an add-in, it&#8217;s own a proper SCC provider.</p>
<p>Do yourself a favour and give it a try before you drop any money on VisualSVN.</p>
]]></content:encoded>
			<wfw:commentRss>http://annoyed.ca/2008/10/25/ankhsvn-is-awesome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The System.Collections.ObjectModel Namespace</title>
		<link>http://annoyed.ca/2008/10/23/the-systemcollectionsobjectmodel-namespace/</link>
		<comments>http://annoyed.ca/2008/10/23/the-systemcollectionsobjectmodel-namespace/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 02:16:13 +0000</pubDate>
		<dc:creator>Christopher Hyne</dc:creator>
				<category><![CDATA[.Net]]></category>
		<category><![CDATA[VS2005]]></category>
		<category><![CDATA[VS2008]]></category>

		<guid isPermaLink="false">http://annoyed.ca/2008/10/23/the-systemcollectionsobjectmodel-namespace/</guid>
		<description><![CDATA[Last night I was reading through some FxCop documentation, specifically through the FxCop Design Warnings (yeah, that&#8217;s what I do in my spare time) and I came across the &#8220;Do not expose generic lists&#8221; warning which states: &#160; System.Collections.ObjectModel? That &#8230; <a href="http://annoyed.ca/2008/10/23/the-systemcollectionsobjectmodel-namespace/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last night I was reading through some FxCop documentation, specifically through the FxCop Design Warnings (yeah, that&#8217;s what I do in my spare time) and I came across the &#8220;Do not expose generic lists&#8221; warning which states:</p>
<p><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="154" alt="image" src="http://annoyed.ca/wp-content/uploads/2008/10/windowslivewriterthesystemcollectioobjectmodelnamespace-12c77image-3.png" width="623" border="0">&nbsp;</p>
<p>System.Collections.ObjectModel? That namespace was new to me, so today I did a little digging.</p>
</p>
<p><span id="more-104"></span>
<p>System.Collections.ObjectModel.Collection(Of T) is pretty straight forward and seems like a good class to inherit for generic collection objects.</p>
<p>System.Collections.ObjectModel.ReadOnlyCollection(Of T) is also interesting as it is a read-only wrapper around any object that implements the IList(Of T) interface.</p>
<p>But the one that excited me the most was System.Collections.ObjectModel.KeyedCollection. Here&#8217;s why.</p>
<p>Say I have a class Stock:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100.43%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; height: 302px; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">Public</span> <span style="color: #0000ff">Class</span> Stock

    <span style="color: #0000ff">Private</span> _tickerSymbol <span style="color: #0000ff">As</span> <span style="color: #0000ff">String</span>

    <span style="color: #0000ff">Public</span> <span style="color: #0000ff">Property</span> Symbol() <span style="color: #0000ff">As</span> <span style="color: #0000ff">String</span>
        <span style="color: #0000ff">Get</span>
            <span style="color: #0000ff">Return</span> _tickerSymbol
        <span style="color: #0000ff">End</span> <span style="color: #0000ff">Get</span>
        <span style="color: #0000ff">Set</span>(<span style="color: #0000ff">ByVal</span> value <span style="color: #0000ff">As</span> <span style="color: #0000ff">String</span>)
            _tickerSymbol = value
        <span style="color: #0000ff">End</span> <span style="color: #0000ff">Set</span>
    <span style="color: #0000ff">End</span> <span style="color: #0000ff">Property</span>

    <span style="color: #0000ff">Public</span> <span style="color: #0000ff">Sub</span> <span style="color: #0000ff">New</span>(<span style="color: #0000ff">ByVal</span> tickerSymbol <span style="color: #0000ff">As</span> <span style="color: #0000ff">String</span>)
        _tickerSymbol = tickerSymbol
    <span style="color: #0000ff">End</span> <span style="color: #0000ff">Sub</span>

<span style="color: #0000ff">End</span> Class</pre>
</div>
<p>Now if I want a Stocks class to represent a collection of Stock objects and I want to be able to access a specific Stock in that collection via its TickerSymbol all I have to write in my Stocks class is this:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<pre style="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, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">Public</span> <span style="color: #0000ff">Class</span> Stocks : <span style="color: #0000ff">Inherits</span> System.Collections.ObjectModel.KeyedCollection(Of <span style="color: #0000ff">String</span>, Stock)

    <span style="color: #0000ff">Protected</span> <span style="color: #0000ff">Overrides</span> <span style="color: #0000ff">Function</span> GetKeyForItem(<span style="color: #0000ff">ByVal</span> item <span style="color: #0000ff">As</span> Stock) <span style="color: #0000ff">As</span> <span style="color: #0000ff">String</span>
        <span style="color: #0000ff">Return</span> item.Symbol
    <span style="color: #0000ff">End</span> <span style="color: #0000ff">Function</span>

<span style="color: #0000ff">End</span> Class</pre>
</div>
<p>Now I can do this in my program code:</p>
<div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4">
<pre style="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, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #0000ff">Dim</span> stocks <span style="color: #0000ff">As</span> <span style="color: #0000ff">New</span> Stocks()

stocks.Add(<span style="color: #0000ff">New</span> Stock(<span style="color: #006080">"GOOG"</span>))
stocks.Add(<span style="color: #0000ff">New</span> Stock(<span style="color: #006080">"YHOO"</span>))

<span style="color: #0000ff">Dim</span> firstStock <span style="color: #0000ff">As</span> Stock = stocks.Item(0)
<span style="color: #0000ff">Dim</span> googleStock <span style="color: #0000ff">As</span> Stock = stocks.Item(<span style="color: #006080">"GOOG"</span>)</pre>
</div>
<p>And that works! Sweet!</p>
]]></content:encoded>
			<wfw:commentRss>http://annoyed.ca/2008/10/23/the-systemcollectionsobjectmodel-namespace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Reference to your Visual Studio Project Directly from the Object Browser</title>
		<link>http://annoyed.ca/2008/10/16/add-reference-to-your-visual-studio-project-directly-from-the-object-browser/</link>
		<comments>http://annoyed.ca/2008/10/16/add-reference-to-your-visual-studio-project-directly-from-the-object-browser/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 01:17:59 +0000</pubDate>
		<dc:creator>Christopher Hyne</dc:creator>
				<category><![CDATA[Quick Links]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[VS2005]]></category>
		<category><![CDATA[VS2008]]></category>

		<guid isPermaLink="false">http://annoyed.ca/2008/10/16/add-reference-to-your-visual-studio-project-directly-from-the-object-browser/</guid>
		<description><![CDATA[Here is a neat tip (#210) from Sara Ford.]]></description>
			<content:encoded><![CDATA[<p>Here is a <a href="http://blogs.msdn.com/saraford/archive/2008/05/07/did-you-know-you-can-add-references-to-your-solution-directly-from-the-object-browser-210.aspx" target="_blank">neat tip (#210) from Sara Ford</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://annoyed.ca/2008/10/16/add-reference-to-your-visual-studio-project-directly-from-the-object-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

