<?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>Dev Team Assemble &#187; .Net Framework</title>
	<atom:link href="http://www.calvinirwin.net/category/net-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.calvinirwin.net</link>
	<description>Evil beware!</description>
	<lastBuildDate>Mon, 06 Feb 2012 18:42:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Execute Commands in Windows via .NET Application</title>
		<link>http://www.calvinirwin.net/2011/05/26/execute-commands-in-windows-via-net-application/</link>
		<comments>http://www.calvinirwin.net/2011/05/26/execute-commands-in-windows-via-net-application/#comments</comments>
		<pubDate>Thu, 26 May 2011 15:44:50 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[cmd]]></category>
		<category><![CDATA[command]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=281</guid>
		<description><![CDATA[Heres a neat little snippit that comes in handy for running commands against the operating system.
Sourced directly from here: http://stackoverflow.com/questions/691716/running-cmd-commands-via-net ...but I like having the code here as well.
&#160;
// Kills a process
&#60;span&#62; &#60;/span&#62; private static void ExecuteCommand&#40;string command&#41;
&#123;
try
&#123;
// create the ProcessStartInfo using &#34;cmd&#34; as the program to be run,
// and &#34;/c &#34; as the parameters. [...]]]></description>
			<content:encoded><![CDATA[<p>Heres a neat little snippit that comes in handy for running commands against the operating system.</p>
<p>Sourced directly from here: <a href="http://stackoverflow.com/questions/691716/running-cmd-commands-via-net" target="_blank">http://stackoverflow.com/questions/691716/running-cmd-commands-via-net</a> ...but I like having the code here as well.</p>
<pre class="csharp">&nbsp;
<span style="color: #008080; font-style: italic;">// Kills a process</span>
&lt;span&gt; &lt;/span&gt; <span style="color: #0600FF;">private</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> ExecuteCommand<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> command<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #0600FF;">try</span>
<span style="color: #000000;">&#123;</span>
<span style="color: #008080; font-style: italic;">// create the ProcessStartInfo using &quot;cmd&quot; as the program to be run,</span>
<span style="color: #008080; font-style: italic;">// and &quot;/c &quot; as the parameters. &amp;gt; tell the command to execute the command that follows</span>
<span style="color: #000000;">System</span>.<span style="color: #0000FF;">Diagnostics</span>.<span style="color: #0000FF;">ProcessStartInfo</span> procStartUpInfo =
<a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Diagnostics</span>.<span style="color: #0000FF;">ProcessStartInfo</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;cmd&quot;</span>, <span style="color: #808080;">&quot;/c &quot;</span> + command<span style="color: #000000;">&#41;</span>;
<span style="color: #008080; font-style: italic;">// The following commands are needed to redirect the standard output.</span>
<span style="color: #008080; font-style: italic;">// This means that it will be redirected to the Process.StandardOutput StreamReader.</span>
procStartUpInfo.<span style="color: #0000FF;">RedirectStandardOutput</span> = <span style="color: #0600FF;">true</span>;
procStartUpInfo.<span style="color: #0000FF;">UseShellExecute</span> = <span style="color: #0600FF;">false</span>;
<span style="color: #008080; font-style: italic;">// Do not create a window.</span>
procStartUpInfo.<span style="color: #0000FF;">CreateNoWindow</span> = <span style="color: #0600FF;">true</span>;
<span style="color: #008080; font-style: italic;">// Now we create a process, assign its ProcessStartInfo and start it</span>
<span style="color: #000000;">System</span>.<span style="color: #0000FF;">Diagnostics</span>.<span style="color: #0000FF;">Process</span> proc = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> <span style="color: #000000;">System</span>.<span style="color: #0000FF;">Diagnostics</span>.<span style="color: #0000FF;">Process</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
proc.<span style="color: #0000FF;">StartInfo</span> = procStartUpInfo;
proc.<span style="color: #0000FF;">Start</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #008080; font-style: italic;">// Get the output into a string</span>
<span style="color: #FF0000;">string</span> result = proc.<span style="color: #0000FF;">StandardOutput</span>.<span style="color: #0000FF;">ReadToEnd</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #008080; font-style: italic;">// Display the command output.</span>
Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span>result<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
<span style="color: #0600FF;">catch</span> <span style="color: #000000;">&#40;</span>Exception objException<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span>objException<span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;</pre>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/.net' rel='tag' target='_self'>.net</a>, <a class='technorati-link' href='http://technorati.com/tag/cmd' rel='tag' target='_self'>cmd</a>, <a class='technorati-link' href='http://technorati.com/tag/command' rel='tag' target='_self'>command</a>, <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/Windows' rel='tag' target='_self'>Windows</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2011/05/26/execute-commands-in-windows-via-net-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing and Debugging a windows Service</title>
		<link>http://www.calvinirwin.net/2011/05/04/installing-and-debugging-a-windows-service/</link>
		<comments>http://www.calvinirwin.net/2011/05/04/installing-and-debugging-a-windows-service/#comments</comments>
		<pubDate>Wed, 04 May 2011 13:04:42 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[services]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=275</guid>
		<description><![CDATA[Here is some useful information that I always seem to forget when developing windows services.

To install/uninstall manually, which i find helpful to do from the bin folder of your project use the following commands:

INSTALL: %windir%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe [the name of the executable]
UNINSTALL: %windir%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe -u [the name of the executable]


To Debug a windows service add the following code [...]]]></description>
			<content:encoded><![CDATA[<p>Here is some useful information that I always seem to forget when developing windows services.</p>
<ul>
<li>To install/uninstall manually, which i find helpful to do from the bin folder of your project use the following commands:
<ul>
<li>INSTALL: %windir%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe [the name of the executable]</li>
<li>UNINSTALL: %windir%\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe -u [the name of the executable]</li>
</ul>
</li>
<li>To Debug a windows service add the following code to your Main method<br />
<code><br />
static void Main(string[] args)<br />
{<br />
#if DEBUG<br />
System.Diagnostics.Debugger.Break();<br />
#endif</code></p>
<p><code> </code></p>
<p style="padding-left: 30px;"><code> ServiceBase.Run(new Service());</code></p>
<p style="padding-left: 30px;"><code>}<br />
</code>
</li>
<li>To create an installation package for a service: ....I will come back to that - no time to put it together today <img src='http://www.calvinirwin.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</li>
</ul>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/services' rel='tag' target='_self'>services</a>, <a class='technorati-link' href='http://technorati.com/tag/visual+studio' rel='tag' target='_self'>visual studio</a>, <a class='technorati-link' href='http://technorati.com/tag/Windows' rel='tag' target='_self'>Windows</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2011/05/04/installing-and-debugging-a-windows-service/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XmlSerializer and XmlRootAttribute Performance Issue</title>
		<link>http://www.calvinirwin.net/2011/02/10/xmlserializer-and-xmlrootattribute-performance-issue/</link>
		<comments>http://www.calvinirwin.net/2011/02/10/xmlserializer-and-xmlrootattribute-performance-issue/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 03:28:52 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[c sharp]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[serialization]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[XmlSerializer]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=262</guid>
		<description><![CDATA[I have been working with xml serialization over the last week or so and ran into a strange issue today.  It only came to light when I decided to implement IXmlSerializable and write my own methods for reading and writing the xml.  I posted recently about using he XmlRootAttribute as a fix for [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working with xml serialization over the last week or so and ran into a strange issue today.  It only came to light when I decided to implement IXmlSerializable and write my own methods for reading and writing the xml.  I <a href="http://www.calvinirwin.net/2011/02/10/xmlserialization-deserialize-causes-xmlns-was-not-expected/">posted</a> recently about using he XmlRootAttribute as a fix for the <a href="http://www.calvinirwin.net/2011/02/10/xmlserialization-deserialize-causes-xmlns-was-not-expected/">xmlns='' &gt; was not expected</a> error I was seeing.  This all worked fine and dandy until I really started to utilize that method over and over again in my code.  I found the performance of this to be horrible...so horrible in fact it was taking 2-3 minutes to deserialize a moderately complex 1MB xml file.  After doing some digging (on "The Google") I discovered that microsoft decided to only implement caching on the Xml serializer when you use one of the two "more common" constructors (see <a href="http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx">documentation</a>).  Of course it would seem the one I need would not be one of them.</p>
<p>I was thinking of somehow adding the XmlSerializers for each type/root pair that I was using to the application level cache or something like that but thought that might bring with it its own set of challenges.  I found a <a href="http://stackoverflow.com/questions/1534810/xmlserializer-performance-issue-when-specifying-xmlrootattribute">great article here on stack overflow</a> that shows a possible workaround for the problem using a static class to act as a cache or you.</p>
<p>Please note this code is taken directly from the article above:</p>
<p><code><br />
public static class XmlSerializerCache<br />
{<br />
     private static readonly Dictionary cache =<br />
     new Dictionary();</code></p>
<p><code>     public static XmlSerializer Create(Type type, XmlRootAttribute root)<br />
     {<br />
          var key = String.Format( CultureInfo.InvariantCulture, "{0}:{1}", type, root.ElementName);</p>
<p>          if (!cache.ContainsKey(key))<br />
          {<br />
               cache.Add(key, new XmlSerializer(type, root));<br />
          }<br />
</code><br />
<code>           return cache[key];<br />
     }<br />
}<br />
</code></p>
<p>Here is how you use it to create an XmlSerializer object:</p>
<p><code><br />
var xmlRootAttribute = new XmlRootAttribute("ExampleElement");<br />
var serializer = XmlSerializerCache.Create(target.GetType(), xmlRootAttribute);<br />
</code></p>
<p>After implementing that I was still experiencing the 2-3 minute deserialization one the first call but all subsequent calls to that code with similar xml took only 2 seconds.</p>
<p><strong>NOTE:</strong><br />
<em>Seems microsoft is in the habit of only half implementing caching in their code.  This problem is almost identical to the problems with the CrossListQueryCache object in SharePoint....where they again only implemented caching for two of the four available method signatures.  Here is an <a href="http://connect.microsoft.com/VisualStudio/feedback/details/98384/xmlserializer-memory-leak">interesting article</a> I found in the nether-regions of cyberspace where microsoft state this half implementation is by design...</em></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/.net' rel='tag' target='_self'>.net</a>, <a class='technorati-link' href='http://technorati.com/tag/ASP.NET' rel='tag' target='_self'>ASP.NET</a>, <a class='technorati-link' href='http://technorati.com/tag/c+sharp' rel='tag' target='_self'>c sharp</a>, <a class='technorati-link' href='http://technorati.com/tag/c%23' rel='tag' target='_self'>c#</a>, <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/serialization' rel='tag' target='_self'>serialization</a>, <a class='technorati-link' href='http://technorati.com/tag/xml' rel='tag' target='_self'>xml</a>, <a class='technorati-link' href='http://technorati.com/tag/XmlSerializer' rel='tag' target='_self'>XmlSerializer</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2011/02/10/xmlserializer-and-xmlrootattribute-performance-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XmlSerialization Deserialize causes xmlns=&#8221; was not expected</title>
		<link>http://www.calvinirwin.net/2011/02/10/xmlserialization-deserialize-causes-xmlns-was-not-expected/</link>
		<comments>http://www.calvinirwin.net/2011/02/10/xmlserialization-deserialize-causes-xmlns-was-not-expected/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 02:48:40 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[c sharp]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[XmlSerializer]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=264</guid>
		<description><![CDATA[I had what turns out to be a fairly common error the other day when trying to deserialize an xml file in one of my applications.  Here is the code I was running:

XmlSerializer ser =  new XmlSerializer(typeof(MyObject));
XmlReader xRdr = XmlReader.Create(new StringReader(xmlData));
MyObject tvd = (MyObject)ser.Deserialize(xRdr);

As it turns out this was causing the error: xmlns=''&#62; was [...]]]></description>
			<content:encoded><![CDATA[<p>I had what turns out to be a fairly common error the other day when trying to deserialize an xml file in one of my applications.  Here is the code I was running:</p>
<p><code><br />
XmlSerializer ser =  new XmlSerializer(typeof(MyObject));<br />
XmlReader xRdr = XmlReader.Create(new StringReader(xmlData));<br />
MyObject tvd = (MyObject)ser.Deserialize(xRdr);<br />
</code></p>
<p>As it turns out this was causing the error: <strong>xmlns=''&gt; was not expected </strong> during deserialization.  Alot of the resources online (including the <a href="http://msdn.microsoft.com/en-us/library/aa302290.aspx">msdn article here</a>) were pointing me to the namespaces not being the same on the serializer and document.  I am not sure why it wasn't working for me because I was playing around with the namespaces but couldn't seem to figure out how to get that working.  Maybe because I was only serializing a fragment of a document I'm not sure.  Anyway it turns out that specifying the XmlRootAttribute in the XmlSerializer constructor fixed the problem for me.  This <a href="http://stackoverflow.com/questions/1556874/user-xmlns-was-not-expected-deserializing-twitter-xml">Stack Overflow article</a> really helped  Here is the snippet of code that I am using now:</p>
<p><code><br />
XmlRootAttribute xRoot = new XmlRootAttribute();<br />
xRoot.ElementName = elementName;<br />
xRoot.IsNullable = true;</code></p>
<p><code> </code></p>
<p><code>XmlSerializer ser =  new XmlSerializer(typeof(MyObject), xRoot);<br />
XmlReader xRdr = XmlReader.Create(new StringReader(xmlData));<br />
MyObject tvd = (MyObject)ser.Deserialize(xRdr);<br />
</code></p>
<p>Hope this helps</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/.net' rel='tag' target='_self'>.net</a>, <a class='technorati-link' href='http://technorati.com/tag/ASP.NET' rel='tag' target='_self'>ASP.NET</a>, <a class='technorati-link' href='http://technorati.com/tag/c+sharp' rel='tag' target='_self'>c sharp</a>, <a class='technorati-link' href='http://technorati.com/tag/c%23' rel='tag' target='_self'>c#</a>, <a class='technorati-link' href='http://technorati.com/tag/xml' rel='tag' target='_self'>xml</a>, <a class='technorati-link' href='http://technorati.com/tag/XmlSerializer' rel='tag' target='_self'>XmlSerializer</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2011/02/10/xmlserialization-deserialize-causes-xmlns-was-not-expected/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ERROR: Incompatible Web Part markup detected. Use &#8220;.dwp web part XML instead of *.webpart web part xml</title>
		<link>http://www.calvinirwin.net/2009/10/09/error-incompatible-web-part-markup-detected-use-dwp-web-part-xml-instead-of-webpart-web-part-xml/</link>
		<comments>http://www.calvinirwin.net/2009/10/09/error-incompatible-web-part-markup-detected-use-dwp-web-part-xml-instead-of-webpart-web-part-xml/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 01:18:15 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[web parts]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=212</guid>
		<description><![CDATA[I came across this problem recently. Its a little strange and only happened once I changed my base webpart class to inherit from Microsoft.SharePoint.WebPartPages.WebPart. There seems to be two fixes for this problem that I implemented:

remove the XMlNamespace from class declaration
Use a .dwp file instead of a .webpart file in your feature folder




Technorati Tags: Development, [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this problem recently. Its a little strange and only happened once I changed my base webpart class to inherit from Microsoft.SharePoint.WebPartPages.WebPart. There seems to be two fixes for this problem that I implemented:</p>
<ul>
<li>remove the XMlNamespace from class declaration</li>
<li>Use a .dwp file instead of a .webpart file in your feature folder</li>
</ul>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a>, <a class='technorati-link' href='http://technorati.com/tag/web+parts' rel='tag' target='_self'>web parts</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/10/09/error-incompatible-web-part-markup-detected-use-dwp-web-part-xml-instead-of-webpart-web-part-xml/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lookup Fields and Content Types</title>
		<link>http://www.calvinirwin.net/2009/09/09/lookup-fields-and-content-types/</link>
		<comments>http://www.calvinirwin.net/2009/09/09/lookup-fields-and-content-types/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 04:43:35 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[content types]]></category>
		<category><![CDATA[lookup fields]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=201</guid>
		<description><![CDATA[For the last little bit I have been working on learning how to package up all site infrastructure into a single feature.  All of this is pretty straight forward and I didn't really have any issues.....UNTIL  I tried to get lookup columns working.
Using CAML
I did some reading on the subject and apparently you can do all [...]]]></description>
			<content:encoded><![CDATA[<p>For the last little bit I have been working on learning how to package up all site infrastructure into a single feature.  All of this is pretty straight forward and I didn't really have any issues.....UNTIL  I tried to get lookup columns working.</p>
<h3>Using CAML</h3>
<p>I did some reading on the subject and apparently you can do all of this using CAML alone.  I came across a<a href="http://blogs.msdn.com/joshuag/archive/2008/03/14/add-sharepoint-lookup-column-declaratively-through-caml-xml.aspx"> post from Josh Gaffery</a> supporting this claim, but I simply could not get this working...so i gave up after spinning my wheels on it for longer than I wanted to.  Josh's approach is to use the list URL as opposed to the GUID that links the column to the source list and he has put up an update explaining it further.  Nonetheless....didn't work for me.</p>
<h3>Using Feature Receiver</h3>
<p>I knew that at this point I would have to take the feature reciever approach and modify the fields in place or create them.  I found two sources that both take different approachs to this problem.</p>
<ul>
<li>Chris O'Brien has put together the a project on <a href="http://www.codeplex.com/SP2007LookupFields">CodePlex </a>that will create the lookup columns at activation time.  This actully sounds like a pretty good approach but unfortunately it didn't work for me.  I dont know if there is something wrong with my environment but I encountered a few errors doing this...things like the fields not rendering on the page layouts and getting the "<strong>The local device name is already in use. (Exception from HRESULT: 0x80070055)</strong>" error.</li>
<li>Waldek Mastykarz has a great post on creating the columns via code <a href="http://blog.mastykarz.nl/sharepoint-programmatically-provisioning-lookup-fields/">here</a>.</li>
</ul>
<p>Basically I took a hybrid approach to doing this by mixing the two approaches mentioned above.  I created a custom XML file that I deploy into the layouts directory and then use a feature reciever to read the xml content and create lookup columns based on this.  I also added a deactiving event to remove the fields when the feature is deactivated.  Heres the feature reciever code:</p>
<pre class="csharp"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">override</span> <span style="color: #0600FF;">void</span> FeatureActivated<span style="color: #000000;">&#40;</span>SPFeatureReceiverProperties properties<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            <span style="color: #0600FF;">using</span> <span style="color: #000000;">&#40;</span>SPSite site = properties.<span style="color: #0000FF;">Feature</span>.<span style="color: #0000FF;">Parent</span> <span style="color: #0600FF;">as</span> SPSite<span style="color: #000000;">&#41;</span>
            <span style="color: #000000;">&#123;</span>
                <span style="color: #FF0000;">string</span> contentTypes = <span style="color: #0600FF;">null</span>;
                <span style="color: #FF0000;">string</span> listName = <span style="color: #0600FF;">null</span>;
                <span style="color: #FF0000;">string</span> fieldName = <span style="color: #0600FF;">null</span>;
                <span style="color: #FF0000;">string</span> groupName = <span style="color: #0600FF;">null</span>;
                <span style="color: #FF0000;">string</span> staticName = <span style="color: #0600FF;">null</span>;
                <span style="color: #FF0000;">string</span> lookupFieldName = <span style="color: #808080;">&quot;Title&quot;</span>;
                <span style="color: #FF0000;">bool</span> mult = <span style="color: #0600FF;">false</span>;
                <span style="color: #FF0000;">bool</span> required = <span style="color: #0600FF;">false</span>;
                <span style="color: #FF0000;">string</span> filePath = properties.<span style="color: #0000FF;">Feature</span>.<span style="color: #0000FF;">Properties</span><span style="color: #000000;">&#91;</span>
                   <span style="color: #808080;">&quot;ColumnDefinitionPath&quot;</span><span style="color: #000000;">&#93;</span>.<span style="color: #0000FF;">Value</span>;
&nbsp;
                XmlTextReader xReader = <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> XmlTextReader<span style="color: #000000;">&#40;</span>
                  HttpContext.<span style="color: #0000FF;">Current</span>.<span style="color: #0000FF;">Server</span>.<span style="color: #0000FF;">MapPath</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">@"~\_layouts\&quot;</span> + filePath<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
                <span style="color: #0600FF;">while</span> <span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">Read</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                <span style="color: #000000;">&#123;</span>
                    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">LocalName</span> == <span style="color: #808080;">&quot;Field&quot;</span><span style="color: #000000;">&#41;</span>
                    <span style="color: #000000;">&#123;</span>
                        <span style="color: #008080;">#region Get values from attributes</span>
                        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">MoveToAttribute</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;List&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                        <span style="color: #000000;">&#123;</span>
                            listName = xReader.<span style="color: #0000FF;">Value</span>;
                            xReader.<span style="color: #0000FF;">MoveToElement</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
                        <span style="color: #000000;">&#125;</span>
                        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">MoveToAttribute</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Name&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                        <span style="color: #000000;">&#123;</span>
                            fieldName = xReader.<span style="color: #0000FF;">Value</span>;
                            xReader.<span style="color: #0000FF;">MoveToElement</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
                        <span style="color: #000000;">&#125;</span>
                        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">MoveToAttribute</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;StaticName&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                        <span style="color: #000000;">&#123;</span>
                            staticName = xReader.<span style="color: #0000FF;">Value</span>;
                            xReader.<span style="color: #0000FF;">MoveToElement</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
                        <span style="color: #000000;">&#125;</span>
                        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">MoveToAttribute</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Group&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                        <span style="color: #000000;">&#123;</span>
                            groupName = xReader.<span style="color: #0000FF;">Value</span>;
                            xReader.<span style="color: #0000FF;">MoveToElement</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
                        <span style="color: #000000;">&#125;</span>
                        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">MoveToAttribute</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;LookUpField&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                        <span style="color: #000000;">&#123;</span>
                            lookupFieldName = xReader.<span style="color: #0000FF;">Value</span>;
                            xReader.<span style="color: #0000FF;">MoveToElement</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
                        <span style="color: #000000;">&#125;</span>
                        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">MoveToAttribute</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;ExistInContentTypes&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                        <span style="color: #000000;">&#123;</span>
                            contentTypes = xReader.<span style="color: #0000FF;">Value</span>;
                            xReader.<span style="color: #0000FF;">MoveToElement</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
                        <span style="color: #000000;">&#125;</span>
                        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">MoveToAttribute</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Mult&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                        <span style="color: #000000;">&#123;</span>
                            <span style="color: #FF0000;">bool</span>.<span style="color: #0000FF;">TryParse</span><span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">Value</span>, <span style="color: #0600FF;">out</span> mult<span style="color: #000000;">&#41;</span>;
                            xReader.<span style="color: #0000FF;">MoveToElement</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
                        <span style="color: #000000;">&#125;</span>
                        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">MoveToAttribute</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">&quot;Required&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                        <span style="color: #000000;">&#123;</span>
                            <span style="color: #FF0000;">bool</span>.<span style="color: #0000FF;">TryParse</span><span style="color: #000000;">&#40;</span>xReader.<span style="color: #0000FF;">Value</span>, <span style="color: #0600FF;">out</span> required<span style="color: #000000;">&#41;</span>;
                            xReader.<span style="color: #0000FF;">MoveToElement</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
                        <span style="color: #000000;">&#125;</span>
&nbsp;
                        <span style="color: #008080;">#endregion</span>
&nbsp;
                        SPFieldLookup lookup = CreateLookupField<span style="color: #000000;">&#40;</span>
                          fieldName, groupName, required, mult, site.<span style="color: #0000FF;">RootWeb</span>,
                          site.<span style="color: #0000FF;">RootWeb</span>.<span style="color: #0000FF;">Lists</span><span style="color: #000000;">&#91;</span>listName<span style="color: #000000;">&#93;</span>, lookupFieldName, staticName<span style="color: #000000;">&#41;</span>;
                        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>contentTypes != <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span>
                            <span style="color: #0600FF;">foreach</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> s <span style="color: #0600FF;">in</span> contentTypes.<span style="color: #0000FF;">Split</span><span style="color: #000000;">&#40;</span><span style="color: #808080;">','</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>
                            <span style="color: #000000;">&#123;</span>
                                LinkFieldToContentType<span style="color: #000000;">&#40;</span>s.<span style="color: #0000FF;">Trim</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>, <span style="color: #000000;">&#40;</span>SPField<span style="color: #000000;">&#41;</span>lookup<span style="color: #000000;">&#41;</span>;
                            <span style="color: #000000;">&#125;</span>
                    <span style="color: #000000;">&#125;</span>
                <span style="color: #000000;">&#125;</span>
&nbsp;
                xReader.<span style="color: #0000FF;">Close</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> SPFieldLookup CreateLookupField<span style="color: #000000;">&#40;</span>
          <span style="color: #FF0000;">string</span> fieldName, <span style="color: #FF0000;">string</span> group, <span style="color: #FF0000;">bool</span> required, <span style="color: #FF0000;">bool</span> allowMultipleValues,
          SPWeb w, SPList lookupList, <span style="color: #FF0000;">string</span> lookupField, <span style="color: #FF0000;">string</span> staticName<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            w.<span style="color: #0000FF;">Fields</span>.<span style="color: #0000FF;">AddLookup</span><span style="color: #000000;">&#40;</span>fieldName, lookupList.<span style="color: #0000FF;">ID</span>,
               lookupList.<span style="color: #0000FF;">ParentWeb</span>.<span style="color: #0000FF;">ID</span>, required<span style="color: #000000;">&#41;</span>;
            SPFieldLookup lookup = <span style="color: #000000;">&#40;</span>SPFieldLookup<span style="color: #000000;">&#41;</span>w.<span style="color: #0000FF;">Fields</span><span style="color: #000000;">&#91;</span>fieldName<span style="color: #000000;">&#93;</span>;
            lookup.<span style="color: #0000FF;">AllowMultipleValues</span> = allowMultipleValues;
            lookup.<span style="color: #0000FF;">LookupField</span> = lookupField;
            lookup.<span style="color: #0000FF;">StaticName</span> = staticName;
            lookup.<span style="color: #0000FF;">Group</span> = group;
            lookup.<span style="color: #0000FF;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">true</span><span style="color: #000000;">&#41;</span>;
            <span style="color: #0600FF;">return</span> lookup;
        <span style="color: #000000;">&#125;</span>
&nbsp;
        <span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> LinkFieldToContentType<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> contentType, SPField field<span style="color: #000000;">&#41;</span>
        <span style="color: #000000;">&#123;</span>
            <span style="color: #0600FF;">using</span> <span style="color: #000000;">&#40;</span>SPSite site = SPContext.<span style="color: #0000FF;">Current</span>.<span style="color: #0000FF;">Web</span>.<span style="color: #0000FF;">Site</span> <span style="color: #0600FF;">as</span> SPSite<span style="color: #000000;">&#41;</span>
            <span style="color: #000000;">&#123;</span>
                SPContentType ct = site.<span style="color: #0000FF;">RootWeb</span>.<span style="color: #0000FF;">ContentTypes</span><span style="color: #000000;">&#91;</span>contentType<span style="color: #000000;">&#93;</span>;
                ct.<span style="color: #0000FF;">FieldLinks</span>.<span style="color: #0000FF;">Add</span><span style="color: #000000;">&#40;</span><a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> SPFieldLink<span style="color: #000000;">&#40;</span>field<span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
                ct.<span style="color: #0000FF;">Update</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">true</span><span style="color: #000000;">&#41;</span>; <span style="color: #008080; font-style: italic;">// will update children</span>
            <span style="color: #000000;">&#125;</span>
        <span style="color: #000000;">&#125;</span></pre>
<p>As you can read from the above code the xml file would need to have a node like below for each lookup column:</p>
<pre class="xml">&nbsp;
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;Field</span>
         <span style="color: #000066;">Type</span>=<span style="color: #ff0000;">&quot;Lookup&quot;</span>
         <span style="color: #000066;">List</span>=<span style="color: #ff0000;">&quot;Access Type&quot;</span>
         <span style="color: #000066;">Name</span>=<span style="color: #ff0000;">&quot;AccessTypeColumn&quot;</span>
         <span style="color: #000066;">StaticName</span>=<span style="color: #ff0000;">&quot;Access_x0020_Type&quot;</span>
         <span style="color: #000066;">Group</span>=<span style="color: #ff0000;">&quot;Infrastructure&quot;</span>
         <span style="color: #000066;">ExistInContentTypes</span>=<span style="color: #ff0000;">&quot;THIS IS A COMMA DELIMITED LIST OF CONTENT NAMES&quot;</span>
         <span style="color: #000066;">LookUpField</span>=<span style="color: #ff0000;">&quot;Title&quot;</span>
         <span style="color: #000066;">Mult</span>=<span style="color: #ff0000;">&quot;TRUE&quot;</span>
         <span style="color: #000066;">Required</span>=<span style="color: #ff0000;">&quot;FALSE&quot;</span>
        <span style="font-weight: bold; color: black;">/&gt;</span></span>
&nbsp;</pre>
<h3>The Final Project</h3>
<p>So here are all the pieces of my infrastructure project. Notice the placement of the lookupfields xml file...this is because the layouts directory is setup as a virtual directory for every sharepoint site and we can read files from there without a permissions problem.</p>
<table>
<tr>
<td><em>12/TEMPLATES/FEATURES/myfeature/lists.xml</em></td>
<td>this contains the source lists for the lookup fields</td>
</tr>
<tr>
<td><em>12/TEMPLATES/FEATURES/myfeature/contenttypes.xml</em></td>
<td>this contains the content type definitions MINUS the lookup fields</td>
</tr>
<tr>
<td><em>12/TEMPLATES/FEATURES/myfeature/sitecolumns.xml</em></td>
<td>this contains all the other fields included in the content types</td>
</tr>
<tr>
<td><em>12/TEMPLATES/FEATURES/myfeature/feature.xml</em></td>
<td>the feature def</td>
</tr>
<tr>
<td><em>12/TEMPLATES/LAYOUTS/myfeature/lookupfields.xml</em></td>
<td>this contains all the lookup fields that need to be provisioned</td>
</tr>
</table>
<p>Hopefully this helps anyone who's been having problems getting this going.  And a big thanks to Waldek, Chris and Josh for their posts.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Configuration' rel='tag' target='_self'>Configuration</a>, <a class='technorati-link' href='http://technorati.com/tag/content+types' rel='tag' target='_self'>content types</a>, <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/lookup+fields' rel='tag' target='_self'>lookup fields</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/09/09/lookup-fields-and-content-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GACUtil missing&#8230;Windows 2008/Visual Studio 2008 development machine</title>
		<link>http://www.calvinirwin.net/2009/08/24/gacutil-missing-windows-2008visual-studio-2008-development-machine/</link>
		<comments>http://www.calvinirwin.net/2009/08/24/gacutil-missing-windows-2008visual-studio-2008-development-machine/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 17:26:44 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[gac]]></category>
		<category><![CDATA[gacutil]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=188</guid>
		<description><![CDATA[Great post here with a fix/workaround.  Essentially when you go to look in the windows .net framework directory that program is not there.  In order to run this utility program you will need to use the Visual Studio command prompt that is in the Programs/Visual Studio menu.



Technorati Tags: Configuration, gac, gacutil, visual studio, [...]]]></description>
			<content:encoded><![CDATA[<p>Great post <a href="http://weblogs.asp.net/wenching/archive/2008/05/22/gacutil-missing-in-windows-server-2008-visual-studio-2008-installation.aspx">here</a> with a fix/workaround.  Essentially when you go to look in the windows .net framework directory that program is not there.  In order to run this utility program you will need to use the Visual Studio command prompt that is in the Programs/Visual Studio menu.</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/Configuration' rel='tag' target='_self'>Configuration</a>, <a class='technorati-link' href='http://technorati.com/tag/gac' rel='tag' target='_self'>gac</a>, <a class='technorati-link' href='http://technorati.com/tag/gacutil' rel='tag' target='_self'>gacutil</a>, <a class='technorati-link' href='http://technorati.com/tag/visual+studio' rel='tag' target='_self'>visual studio</a>, <a class='technorati-link' href='http://technorati.com/tag/Windows' rel='tag' target='_self'>Windows</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/08/24/gacutil-missing-windows-2008visual-studio-2008-development-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error: Adding Web Part to a page</title>
		<link>http://www.calvinirwin.net/2009/07/26/error-adding-web-part-to-a-page/</link>
		<comments>http://www.calvinirwin.net/2009/07/26/error-adding-web-part-to-a-page/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 19:45:48 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[controls]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[gac]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[web parts]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=45</guid>
		<description><![CDATA[I got the following error the other day (it has been shortened...):
"the web part you attempted to add no longer exists in the closed web parts gallery."
This was a pretty disturbing error...there was no real apparent cause for this problem...nothing in the logs. After messing about with it for a while I figured out that [...]]]></description>
			<content:encoded><![CDATA[<p>I got the following error the other day (it has been shortened...):</p>
<p>"the web part you attempted to add no longer exists in the closed web parts gallery."</p>
<p>This was a pretty disturbing error...there was no real apparent cause for this problem...nothing in the logs. After messing about with it for a while I figured out that it was a dll version in the GAC that was causing the problem. On my dev box I had an updated version but the version in our prod envs is different.</p>
<p>It would be nice if the server was a little more helpful with its error messages....HTH if you come across it</p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/controls' rel='tag' target='_self'>controls</a>, <a class='technorati-link' href='http://technorati.com/tag/error' rel='tag' target='_self'>error</a>, <a class='technorati-link' href='http://technorati.com/tag/gac' rel='tag' target='_self'>gac</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a>, <a class='technorati-link' href='http://technorati.com/tag/web+parts' rel='tag' target='_self'>web parts</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/07/26/error-adding-web-part-to-a-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DevConnections Wrap Up &#8211; Nov 2008</title>
		<link>http://www.calvinirwin.net/2009/07/26/devconnections-wrap-up-nov-2008/</link>
		<comments>http://www.calvinirwin.net/2009/07/26/devconnections-wrap-up-nov-2008/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 19:39:47 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[SharePoint 2007]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[sql server 2005]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=41</guid>
		<description><![CDATA[From November 2008:
Whew...its been a long week and its only Thursday. This years conference was much the same as last years with the exception of being held in various portions of the Mandalay Bay convention center as opposed to on one floor. This made for lots and lots and lots and lots of walking. But [...]]]></description>
			<content:encoded><![CDATA[<p>From November 2008:</p>
<p>Whew...its been a long week and its only Thursday. This years conference was much the same as last years with the exception of being held in various portions of the Mandalay Bay convention center as opposed to on one floor. This made for lots and lots and lots and lots of walking. But I'm still young (yes i am) so it makes for good excercise to walk off all the food they shovel in your mouth.</p>
<p>Most of the sessions I attended were really good with the exception of a couple. I wouldn't blame the speakers because these problems were mostly due to technical issues like the computers not working, the projectors broken or feedback in the presenters microphone sort of thing. All in all there were some great things presented this week.</p>
<p>Some of the sessions that really stuck out were:</p>
<p><a href="http://www.sqlskills.com/blogs/kimberly/">Kimberly Tripp </a>- Index Internals and Usage<br />
This was a great session that talked about thins like SQL Server Statistics, Query Optimization, Types of indexes, diminishing returns on performance, etc. Of all the session I think this one stood out the most and because it is probably the most relevant for me right now being one of the "SQL Server DBA" for my company (<a href="http://www.christiedigital.com/">Christie Digital</a>). I say it that way because its a committee based DBA <img src='http://www.calvinirwin.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://www.west-wind.com/Weblog/">Rick Strahl </a>- Using WCF for JSON and REST Services with ASP.Net</p>
<p>Great session....last one of the conference for me so it really sticks out but essentially this covers the next gen replacement for ASMX or first gen webservices in the .NET Framework.</p>
<p><a href="http://www.johnpapa.net/">John Papa</a> - Practical Strategies with the Entity Framework</p>
<p>For me this was an introduction to the Entity Framework that was released in VS 2008 SP1. John did a great job of quickly introducing the technology and getting on to the meat and potatoes of what we were there to discuss. There was a good discussion on how to use the IDE to build the data mappings and what happens after you make changes to the backend server, which coinceidently can be any data source...not just SQL as Linq to SQL supports.</p>
<p>Things I would change...(and only because its my blog and I can say whatever I want!!!)</p>
<p>...the time between sessions was ridiculous...one hour or in some cases and hour and a half is just way too long. They could have added an extra session or two to the day. I realize they want you in the expo hall but they could have extended the day to facilitate that or leave it open all day and then some people may skip a couple of sessions here and there to go and see what the vendors are offering. this was my gripe last year and its my gripe this year. Its probably going to be the thing that keeps me from going to this in the future.</p>
<p>...provide video or podcasts of the sessions so we can take in the whole conference...even the sessions we didn't get to go to. I see there point about this being intellectual property and the speakers are consultants and this is their livelyhood but I mean if they are willing to teach this at a conference...and we pay to see it...shouldn't we be entitled to review this information after the fact? Maybe they will supply it on their site (i heard they were recording the sessions this year).</p>
<p>...ease up on the food. Damn, there was too much...I ate too much...I felt stuffed the whole time...I guess this is really my fault! Okay dont change that <img src='http://www.calvinirwin.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/.net' rel='tag' target='_self'>.net</a>, <a class='technorati-link' href='http://technorati.com/tag/ASP.NET' rel='tag' target='_self'>ASP.NET</a>, <a class='technorati-link' href='http://technorati.com/tag/conference' rel='tag' target='_self'>conference</a>, <a class='technorati-link' href='http://technorati.com/tag/Development' rel='tag' target='_self'>Development</a>, <a class='technorati-link' href='http://technorati.com/tag/SharePoint' rel='tag' target='_self'>SharePoint</a>, <a class='technorati-link' href='http://technorati.com/tag/SQL+Server' rel='tag' target='_self'>SQL Server</a>, <a class='technorati-link' href='http://technorati.com/tag/sql+server+2005' rel='tag' target='_self'>sql server 2005</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/07/26/devconnections-wrap-up-nov-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setup your GAC to view it naked</title>
		<link>http://www.calvinirwin.net/2009/07/26/setup-your-gac-to-view-it-naked/</link>
		<comments>http://www.calvinirwin.net/2009/07/26/setup-your-gac-to-view-it-naked/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 19:32:19 +0000</pubDate>
		<dc:creator>Calvin</dc:creator>
				<category><![CDATA[.Net Framework]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[gac]]></category>

		<guid isPermaLink="false">http://www.calvinirwin.net/?p=39</guid>
		<description><![CDATA[Heres a simple way for you to view your GAC in its naked state, go to the following registry location:

HKLM\Software\Microsoft\Fusion, once there create a DWORD value named "DisableCacheViewer" and set it to value 1. 
Easy!




Technorati Tags: .net, Configuration, gac


]]></description>
			<content:encoded><![CDATA[<p><span style="font-family: arial;">Heres a simple way for you to view your GAC in its naked state, go to the following registry location:<br />
</span></p>
<p><span style="font-family: arial;">HKLM\Software\Microsoft\Fusion, once there create a DWORD value named "DisableCacheViewer" and set it to value 1. </span></p>
<p><span style="font-family: arial;">Easy!<br />
</span></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/.net' rel='tag' target='_self'>.net</a>, <a class='technorati-link' href='http://technorati.com/tag/Configuration' rel='tag' target='_self'>Configuration</a>, <a class='technorati-link' href='http://technorati.com/tag/gac' rel='tag' target='_self'>gac</a></p>

<!-- end wp-tags-to-technorati -->
]]></content:encoded>
			<wfw:commentRss>http://www.calvinirwin.net/2009/07/26/setup-your-gac-to-view-it-naked/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

