<?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.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-9567658</atom:id><lastBuildDate>Sat, 14 Nov 2009 15:37:42 +0000</lastBuildDate><title>Luis Rocha's Blog</title><description /><link>http://www.luisrocha.net/</link><managingEditor>noreply@blogger.com (Luis Rocha)</managingEditor><generator>Blogger</generator><openSearch:totalResults>72</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/LuisRocha" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-3827968713370130092</guid><pubDate>Mon, 12 Oct 2009 21:35:00 +0000</pubDate><atom:updated>2009-10-12T15:44:22.111-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><title>Creating a SharePoint List Parent / Child Relationship – Out of the Box</title><description>I just came across this article about creating SharePoint lists with parent/child relationship using out-of-the-box functionality:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.endusersharepoint.com/2009/10/02/creating-a-sharepoint-list-parent-child-relationship-out-of-the-box/"&gt;http://www.endusersharepoint.com/2009/10/02/creating-a-sharepoint-list-parent-child-relationship-out-of-the-box/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-3827968713370130092?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/mvcUnfgFLN8/creating-sharepoint-list-parent-child.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/10/creating-sharepoint-list-parent-child.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-8494990445254784416</guid><pubDate>Mon, 29 Jun 2009 00:15:00 +0000</pubDate><atom:updated>2009-06-28T21:05:41.794-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Testing</category><category domain="http://www.blogger.com/atom/ns#">Dynamics CRM</category><title>Unit Testing CRM Plug-ins</title><description>&lt;span style="font-weight: bold;"&gt;What is a CRM plug-in?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A &lt;a href="http://msdn.microsoft.com/en-us/library/cc151086.aspx"&gt;plug-in&lt;/a&gt; is custom business logic that you can integrate with Microsoft Dynamics CRM 4.0 to modify or augment the standard behavior of the platform. This custom business logic can be executed based on a message pipeline execution model called &lt;a href="http://msdn.microsoft.com/en-us/library/cc151078.aspx"&gt;Event Execution Pipeline&lt;/a&gt;. A plug-in can be executed before or after a MS CRM platform event. For example, you can create a plug-in to validate the attributes of an account entity before the create and update operations.&lt;br /&gt;&lt;br /&gt;To create plug-ins, you need to create a normal .NET class library and reference the MS CRM SDK libraries. Then add a class that implements the &lt;a href="http://msdn.microsoft.com/en-us/library/bb959599.aspx"&gt;Microsoft.Crm.Sdk.IPlugin&lt;/a&gt; interface.&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;interface&lt;/span&gt; IPlugin&lt;br /&gt;{&lt;br /&gt;&lt;span class="kwrd"&gt;void&lt;/span&gt; Execute(IPluginExecutionContext context);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Plug-in Unit Testing&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In order to write unit tests for your plug-in, you need to create at least a mock of the &lt;a href="http://msdn.microsoft.com/en-us/library/bb959587.aspx"&gt;IPluginExecutionContext&lt;/a&gt;. Depending on your plug-in implementation, you will also need to mock &lt;a href="http://msdn.microsoft.com/en-us/library/cc156387.aspx"&gt;ICrmService&lt;/a&gt; or &lt;a href="http://msdn.microsoft.com/en-us/library/cc156392.aspx"&gt;IMetadataService&lt;/a&gt; if you are calling &lt;a href="http://msdn.microsoft.com/en-us/library/bb959583.aspx"&gt;IPluginExecutionContext.CreateCrmService&lt;/a&gt; or &lt;a href="http://technet.microsoft.com/en-us/library/bb959584.aspx"&gt;IPluginExecutionContext.CreateMetadataService&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;There is the &lt;a href="http://code.msdn.microsoft.com/MSCRMPluginDebugger"&gt;MS CRM Plug-in Debugger&lt;/a&gt;, which consists of a small EXE container that implements a mock of the IPluginExecutionContext interface. You could use this container to unit test your plug-ins. However, IMHO, I do not see any advantage in using it versus a unit test and a mock framework. I posted a comment on the &lt;a href="http://blogs.msdn.com/crm/archive/2008/05/12/testing-crm-plug-ins.aspx"&gt;CRM Team Blog: Testing CRM Plug-in&lt;/a&gt; asking about that, but didn't get a response yet.&lt;br /&gt;&lt;br /&gt;To unit test a CRM plug in, you can use your favorite unit test framework (NUnit, MbUnit, Visual Studio Tests) and your favorite mock framework (Rhino Mocks, NMock, Typemocks). In this article, I will be using &lt;a href="http://www.nunit.org/index.php"&gt;NUnit&lt;/a&gt; and &lt;a href="http://ayende.com/projects/rhino-mocks.aspx"&gt;RhinoMocks&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;The Plug-in Code&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In the following example, adapted from the "&lt;a href="http://www.microsoft.com/mspress/companion/9780735625945/"&gt;Programming Microsoft Dynamics CRM 4.0&lt;/a&gt;" book, the plug-in validates the account number attribute before saving the account entity.&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; AccountNumberValidator : IPlugin&lt;br /&gt;{&lt;br /&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Execute(IPluginExecutionContext context)&lt;br /&gt; {&lt;br /&gt;     var target = (DynamicEntity) context.InputParameters[ParameterName.Target];&lt;br /&gt;&lt;br /&gt;     &lt;span class="kwrd"&gt;if&lt;/span&gt; (target.Properties.Contains(&lt;span class="str"&gt;"accountnumber"&lt;/span&gt;))&lt;br /&gt;     {&lt;br /&gt;         var accountNumber = target[&lt;span class="str"&gt;"accountnumber"&lt;/span&gt;].ToString();&lt;br /&gt;         var regex = &lt;span class="kwrd"&gt;new&lt;/span&gt; Regex(&lt;span class="str"&gt;"[A-Z]{2}-[0-9]{6}"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;         &lt;span class="kwrd"&gt;if&lt;/span&gt; (!regex.IsMatch(accountNumber))&lt;br /&gt;         {&lt;br /&gt;             &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; InvalidPluginExecutionException(&lt;span class="str"&gt;"Invalid account number."&lt;/span&gt;);&lt;br /&gt;         }&lt;br /&gt;     }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The code above checks to see if the account number attribute is in the right format. If not, it throws an &lt;a href="http://msdn.microsoft.com/en-us/library/bb959578.aspx"&gt;InvalidPluginExecutionException&lt;/a&gt;. Since we will register this plug-in as a pre-event of creating and updating the account entity, this exception will be handled by the CRM platform, and the create/update operation is aborted.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Writing the Plug-in Unit Test&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The following code is a simple test using NUnit to verify that an InvalidPluginExecutionException is thrown when the account entity has invalid account number:&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;[Test]&lt;br /&gt;[ExpectedException(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(InvalidPluginExecutionException))]&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ShouldHandleInvalidAccountNumber([Values(&lt;span class="str"&gt;""&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"AB123456"&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"A123456"&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"ABC123456"&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"AB-12345"&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"AB123456"&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"AB-123"&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"AB-1234"&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"aa-012345"&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"aa-000000"&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"Za-999999"&lt;/span&gt;,&lt;br /&gt;                                                   &lt;span class="str"&gt;"wW-936187"&lt;/span&gt;)]&lt;br /&gt;                                              &lt;span class="kwrd"&gt;string&lt;/span&gt; number)&lt;br /&gt;{&lt;br /&gt;  &lt;span class="rem"&gt;// Create necessary mocks for the plug-in.&lt;/span&gt;&lt;br /&gt;  var mocks = &lt;span class="kwrd"&gt;new&lt;/span&gt; MockRepository();&lt;br /&gt;  var context = mocks.DynamicMock&amp;lt;IPluginExecutionContext&amp;gt;();&lt;br /&gt;&lt;br /&gt;  &lt;span class="rem"&gt;// Creates a property bag for the plugin execution context mock.&lt;/span&gt;&lt;br /&gt;  var target = &lt;span class="kwrd"&gt;new&lt;/span&gt; DynamicEntity();&lt;br /&gt;  target.Properties[&lt;span class="str"&gt;"accountnumber"&lt;/span&gt;] = number;&lt;br /&gt;  var inputParameters = &lt;span class="kwrd"&gt;new&lt;/span&gt; PropertyBag();&lt;br /&gt;  inputParameters.Properties[ParameterName.Target] = target;&lt;br /&gt;&lt;br /&gt;  &lt;span class="rem"&gt;// Set expectations of mocks.&lt;/span&gt;&lt;br /&gt;  Expect.Call(context.InputParameters).Return(inputParameters).Repeat.Any();&lt;br /&gt;  mocks.ReplayAll();&lt;br /&gt;&lt;br /&gt;  &lt;span class="rem"&gt;// Test the plug-in using the context mock.&lt;/span&gt;&lt;br /&gt;  IPlugin plugin = &lt;span class="kwrd"&gt;new&lt;/span&gt; AccountNumberValidator();&lt;br /&gt;  plugin.Execute(context);&lt;br /&gt;&lt;br /&gt;  &lt;span class="rem"&gt;// Verify all the mocks.&lt;/span&gt;&lt;br /&gt;  mocks.VerifyAll();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, we will go through all the details of this unit test:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The ExpectedException attribute defines the type of exception that this test expects to be raised. In our case, it is an InvalidPluginExecutionException.&lt;/li&gt;&lt;li&gt;This is a parameterized test that uses the &lt;a href="http://www.nunit.org/index.php?p=values&amp;amp;r=2.5"&gt;Values attribute&lt;/a&gt; to define a set of invalid account numbers. This test will run once for each value that we define. The Values attribute is specific to NUnit, but other frameworks have similar mechanisms: MbUnit uses RowTest for example.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;We create a mock of the IPluginExecutionContext interface by using the MockRepository.DynamicMock&lt;t&gt; method. We are using a DynamicMock because we are only interested in a small piece of the functionality (InputParameters property of the context object). If we want a complete control of the mock object behavior, then we would use a StrickMock. For more information about the types of mocks that you can create with Rhino Mocks, see &lt;a href="http://ayende.com/Wiki/Rhino+Mocks+Introduction.ashx"&gt;here&lt;/a&gt;.&lt;/t&gt;&lt;/li&gt;&lt;li&gt;The InputParameters property of the plug-in context, is a property bag that will contain the account number attribute. So, we create this property bag, and add the account number defined by the Values attribute parameter.&lt;/li&gt;&lt;li&gt;Now, we set the expectations of the mock object. This step is called the Record state. When the InputParameters property is called, we expect it to return the property bag we created on the previous step. Note that we are using Repeat.Any() that means this property can be called more than once. In our test, we just want to make sure that InputParameters is called, no matter how many times.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The Record state is finish by calling &lt;span style="font-weight: bold;"&gt;ReplayAll()&lt;/span&gt;. This will move to the Replay state.&lt;/li&gt;&lt;li&gt;Now, we are ready to instantiate our plug-in object and call its &lt;span style="font-weight: bold;"&gt;Execute&lt;/span&gt; method using the plug-in context mock object.&lt;/li&gt;&lt;li&gt;Finally, we call &lt;span style="font-weight: bold;"&gt;VerifyAll()&lt;/span&gt; method, to verify that the mock expectations were satisfied. In our case, it will make sure that InputParameters property was called during the Replay state.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;This test will assert that the plug-in Execute method will throw an InvalidPluginExecutionException with the account number values supplied.&lt;br /&gt;&lt;br /&gt;We also should write a test to assert that no InvalidPluginExecutionException is thrown when using valid account numbers. I will not include this test here, but you can see it on the solution source code files.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Mocking the ICrmService Interface&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In our previous test, we only need to mock the plug-in context interface. However, in more complex plug-ins, you might need to mock other interfaces such as the ICrmService. The &lt;a href="http://msdn.microsoft.com/en-us/library/bb959583.aspx"&gt;CreateCrmService&lt;/a&gt; method of the IPluginExecutionContext creates an ICrmService object. If you use the CreateCrmService method on your plug-in, you will need to create a mock of ICrmService.&lt;br /&gt;&lt;br /&gt;Our validate account number plug-in has been changed to also detect duplicate account numbers. If an account number already exists, then the validation will fail by throwing an InvalidPluginExecutionException. To verify that the account number exists, we query CRM using the ICrmService.Fetch method with a FetchXML query. The following code demonstrate these changes:&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; AccountNumberValidator : IPlugin&lt;br /&gt;{&lt;br /&gt;    &lt;span class="rem"&gt;/// &amp;lt;summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/// &lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/// &amp;lt;/summary&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="rem"&gt;/// &amp;lt;param name="context"&amp;gt;&amp;lt;/param&amp;gt;&lt;/span&gt;&lt;br /&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; Execute(IPluginExecutionContext context)&lt;br /&gt;    {&lt;br /&gt;        var target = (DynamicEntity) context.InputParameters[ParameterName.Target];&lt;br /&gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;if&lt;/span&gt; (target.Properties.Contains(&lt;span class="str"&gt;"accountnumber"&lt;/span&gt;))&lt;br /&gt;        {&lt;br /&gt;            var accountNumber = target[&lt;span class="str"&gt;"accountnumber"&lt;/span&gt;].ToString();&lt;br /&gt;&lt;br /&gt;            &lt;span class="rem"&gt;// Validates the account number format.&lt;/span&gt;&lt;br /&gt;            var regex = &lt;span class="kwrd"&gt;new&lt;/span&gt; Regex(&lt;span class="str"&gt;"[A-Z]{2}-[0-9]{6}"&lt;/span&gt;);&lt;br /&gt;            &lt;span class="kwrd"&gt;if&lt;/span&gt; (!regex.IsMatch(accountNumber))&lt;br /&gt;            {&lt;br /&gt;                &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; InvalidPluginExecutionException(&lt;span class="str"&gt;"Invalid account number."&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            &lt;span class="rem"&gt;// Validates the account number is unique.&lt;/span&gt;&lt;br /&gt;            &lt;span class="kwrd"&gt;using&lt;/span&gt; (var service = context.CreateCrmService(&lt;span class="kwrd"&gt;true&lt;/span&gt;))&lt;br /&gt;            {&lt;br /&gt;                var query =&lt;br /&gt;                    &lt;span class="kwrd"&gt;string&lt;/span&gt;.Format(&lt;br /&gt;                        &lt;span class="str"&gt;@"&amp;lt;fetch mapping='logical'&amp;gt;&lt;br /&gt;                            &amp;lt;entity name='account'&amp;gt;&lt;br /&gt;                                &amp;lt;attribute name='accountnumber' /&amp;gt;&lt;br /&gt;                                &amp;lt;filter&amp;gt;&lt;br /&gt;                                    &amp;lt;condition attribute='accountnumber'&lt;br /&gt;                                        operator='eq' value='{0}' /&amp;gt;&lt;br /&gt;                                &amp;lt;/filter&amp;gt;&lt;br /&gt;                            &amp;lt;/entity&amp;gt;&lt;br /&gt;                        &amp;lt;/fetch&amp;gt;"&lt;/span&gt;,&lt;br /&gt;                        accountNumber);&lt;br /&gt;&lt;br /&gt;                var results = service.Fetch(query);&lt;br /&gt;                var xdocument = XDocument.Parse(results);&lt;br /&gt;                var existingNumbers = from item &lt;span class="kwrd"&gt;in&lt;/span&gt; xdocument.Descendants(&lt;span class="str"&gt;"accountnumber"&lt;/span&gt;)&lt;br /&gt;                                      select item.Value;&lt;br /&gt;&lt;br /&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (existingNumbers.Count() &amp;gt; 0)&lt;br /&gt;                    &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; InvalidPluginExecutionException(&lt;span class="str"&gt;"Account number already exist."&lt;/span&gt;);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now, we will create a unit test to verify that our plug-in detects duplicate account numbers.&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt; [Test]&lt;br /&gt; [ExpectedException(&lt;span class="kwrd"&gt;typeof&lt;/span&gt;(InvalidPluginExecutionException))]&lt;br /&gt; &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; ShoulRejectDuplicateAccountNumber()&lt;br /&gt; {&lt;br /&gt;     &lt;span class="rem"&gt;// Create necessary mocks for the plug-in.&lt;/span&gt;&lt;br /&gt;     var mocks = &lt;span class="kwrd"&gt;new&lt;/span&gt; MockRepository();&lt;br /&gt;     var context = mocks.DynamicMock&amp;lt;IPluginExecutionContext&amp;gt;();&lt;br /&gt;     var service = mocks.DynamicMock&amp;lt;ICrmService&amp;gt;();&lt;br /&gt;&lt;br /&gt;     &lt;span class="rem"&gt;// Creates a property bag for the plugin execution context mock.&lt;/span&gt;&lt;br /&gt;     var target = &lt;span class="kwrd"&gt;new&lt;/span&gt; DynamicEntity();&lt;br /&gt;     target.Properties[&lt;span class="str"&gt;"accountnumber"&lt;/span&gt;] = &lt;span class="str"&gt;"AB-123456"&lt;/span&gt;;&lt;br /&gt;     var inputParameters = &lt;span class="kwrd"&gt;new&lt;/span&gt; PropertyBag();&lt;br /&gt;     inputParameters.Properties[ParameterName.Target] = target;&lt;br /&gt;&lt;br /&gt;     &lt;span class="rem"&gt;// Set expectations of mocks.&lt;/span&gt;&lt;br /&gt;     Expect.Call(context.InputParameters).Return(inputParameters).Repeat.Any();&lt;br /&gt;     Expect.Call(context.CreateCrmService(&lt;span class="kwrd"&gt;true&lt;/span&gt;)).Return(service);&lt;br /&gt;     Expect.Call(service.Fetch(&lt;span class="kwrd"&gt;null&lt;/span&gt;)).IgnoreArguments()&lt;br /&gt;         .Return(&lt;span class="str"&gt;@"&amp;lt;resultset&amp;gt;&lt;br /&gt;                     &amp;lt;result&amp;gt;&lt;br /&gt;                         &amp;lt;accountnumber&amp;gt;AB-123456&amp;lt;/accountnumber&amp;gt;&lt;br /&gt;                     &amp;lt;/result&amp;gt;&lt;br /&gt;                 &amp;lt;/resultset&amp;gt;"&lt;/span&gt;);&lt;br /&gt;     mocks.ReplayAll();&lt;br /&gt;&lt;br /&gt;     &lt;span class="rem"&gt;// Test the plug-in using the context mock.&lt;/span&gt;&lt;br /&gt;     IPlugin plugin = &lt;span class="kwrd"&gt;new&lt;/span&gt; AccountNumberValidator();&lt;br /&gt;     plugin.Execute(context);&lt;br /&gt;&lt;br /&gt;     &lt;span class="rem"&gt;// Verify all the mocks.&lt;/span&gt;&lt;br /&gt;     mocks.VerifyAll();&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the test above, we are using Rhino Mocks to create a mock for the ICrmService. This object will be returned by the CreateCrmService method of the plug-in execution context. We are also recording that when ICrmService.Fetch method is called, it will return a XML file containing a duplicated account number. This will simulate the CRM behavior of detecting that an account number already exists, and we can assert that our plug-in will fail the validation by throwing an exception.&lt;br /&gt;&lt;br /&gt;I hope this post helps you to unit test your CRM plug-ins. Although I demonstrated it using NUnit and Rhino Mocks, you can use any unit testing framework (NUnit, MbUnit, Visual Studio Tests, etc.) and any mock framework (Rhino Mocks, NMock, Typemocks, etc.).&lt;br /&gt;&lt;br /&gt;&lt;iframe marginheight="0" marginwidth="0" style="border: 1px solid rgb(221, 229, 233); margin: 3px; padding: 0pt; width: 240px; height: 66px; background-color: rgb(255, 255, 255);" src="http://cid-0db70edb4fcea49f.skydrive.live.com/embedrowdetail.aspx/Demos/Crm4Plugin.zip" frameborder="0" scrolling="no"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-8494990445254784416?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/8sMuh-tHTMo/unit-testing-crm-plug-ins.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/06/unit-testing-crm-plug-ins.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-5135040009893139227</guid><pubDate>Tue, 16 Jun 2009 00:17:00 +0000</pubDate><atom:updated>2009-06-15T20:09:32.820-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Dynamics CRM</category><title>Using Embedded Files for FetchXML Queries</title><description>&lt;a href="http://technet.microsoft.com/en-us/library/bb928434.aspx"&gt;FetchXML&lt;/a&gt; is a proprietary language that it is used in Microsoft Dynamics CRM. All examples that I've seen so far, always show the FetchXML query hard coded into the C# file. Instead of keeping the queries mixed with the source code, a bad practice IMHO, I prefer placing queries in separate XML files. These files can be embedded resources of the assembly. By placing them on a separate file, it isolates them from the code, making easier to locate, share and test them.&lt;br /&gt;&lt;br /&gt;In order to embed your query in the assembly, you will need to add an XML file with the query into your project. Make sure to change its build action to &lt;span style="font-weight: bold;"&gt;Embedded Resource&lt;/span&gt;. Then, use the following code to read the embedded XML file.&lt;br /&gt;&lt;br /&gt;The code below assumes that the file was placed in the subfolder &lt;span style="font-weight: bold;"&gt;Queries&lt;/span&gt; of the project. It refers to the embedded file by using the assembly name and the related path to the file. Notice that it uses "." instead of "\" to refer to the embedded file.&lt;br /&gt;&lt;pre class="csharpcode"&gt;&lt;br /&gt;&lt;span class="rem"&gt;// Read the embedded fetch xml query file.&lt;/span&gt;&lt;br /&gt;var assembly = Assembly.GetExecutingAssembly();&lt;br /&gt;var stream = assembly.GetManifestResourceStream(&lt;span class="str"&gt;"MyAssembly.Queries.MyQuery.xml"&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;if&lt;/span&gt; (stream == &lt;span class="kwrd"&gt;null&lt;/span&gt;)&lt;br /&gt;{&lt;br /&gt;  &lt;span class="kwrd"&gt;throw&lt;/span&gt; &lt;span class="kwrd"&gt;new&lt;/span&gt; FileLoadException(&lt;span class="str"&gt;"Cannot load fetchXML embedded file"&lt;/span&gt;);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// Gets the Fetch XML query string.&lt;/span&gt;&lt;br /&gt;var reader = &lt;span class="kwrd"&gt;new&lt;/span&gt; StreamReader(stream);&lt;br /&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; query = reader.ReadToEnd();&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// Removing leading spaces to reduce the size of the xml request.&lt;/span&gt;&lt;br /&gt;query = Regex.Replace(fetchXml, &lt;span class="str"&gt;@"\s+"&lt;/span&gt;, &lt;span class="str"&gt;@" "&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span class="rem"&gt;// Fetches the results.&lt;/span&gt;&lt;br /&gt;&lt;span class="kwrd"&gt;string&lt;/span&gt; results = crmService.Fetch(query);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The code above uses a static query. If you need to use a dynamic query, then the XML can  contain the string format of the query, and you can use String.Format to pass the parameters needed to build your dynamic query.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-5135040009893139227?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/2dD6jAzRYyM/using-embedded-files-for-fetchxml.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/06/using-embedded-files-for-fetchxml.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-956339050592044044</guid><pubDate>Thu, 21 May 2009 03:14:00 +0000</pubDate><atom:updated>2009-05-20T21:46:41.001-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">.NET 4</category><category domain="http://www.blogger.com/atom/ns#">.NET</category><category domain="http://www.blogger.com/atom/ns#">Visual Studio 2010</category><title>Visual Studio 2010 and .NET 4 Beta 1</title><description>Visual Studio 2010 and .NET 4 Beta 1 is available today for the general public. Note that the new .NET version is 4 and not 4.0. You can download the beta from &lt;a href="http://blogs.msdn.com/onoj/archive/2009/05/19/visual-studio-2010-beta-1-download-options.aspx"&gt;here&lt;/a&gt;.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Also, check out &lt;a href="http://blogs.msdn.com/jasonz/archive/2009/05/18/announcing-vs2010-net-framework-4-0-beta-1.aspx"&gt;Jason Zander's post&lt;/a&gt; where he highlights the new functionalities, and Brad Adams post with &lt;a href="http://blogs.msdn.com/brada/archive/2008/10/29/net-framework-4-poster.aspx"&gt;.NET 4 poster&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I am currently preparing a virtual machine with &lt;a href="http://www.microsoft.com/Windows/Windows-7/download.aspx"&gt;Windows 7 RC 1&lt;/a&gt; and VS 2010 for trying out the new features.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-956339050592044044?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/9_dIVz0PW2s/visual-studio-2010-and-net-4-beta-1.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/05/visual-studio-2010-and-net-4-beta-1.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-516978284205881500</guid><pubDate>Sat, 25 Apr 2009 18:45:00 +0000</pubDate><atom:updated>2009-04-26T13:00:54.718-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Ubuntu</category><title>NVidia driver not working after upgrading to Ubuntu 9.04</title><description>Ubuntu 9.04 has been released this week and I upgraded my machines to the latest version (download it &lt;a href="http://www.ubuntu.com/getubuntu/download"&gt;here&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;If you are using dual boot (GRUB) , NVidia drivers, and answered yes to keep your existing version of menu.lst, then you might have the same problem as me.&lt;br /&gt;&lt;br /&gt;After I upgraded to Ubuntu 9.04, I get the following error message when restarting the machine:&lt;br /&gt;&lt;pre&gt;Ubuntu is running in low-graphics mode&lt;br /&gt;&lt;br /&gt;The following error was encountered.  You may need&lt;br /&gt;to update your configuration to solve this.&lt;br /&gt;&lt;br /&gt;(EE) NVIDIA(0):  Failed to load the NVIDIA kernel module!&lt;br /&gt;(EE) NVIDIA(0):  *** Aborting ***&lt;br /&gt;(EE) Screen(s) found, but none have a usable configuration.&lt;br /&gt;&lt;/pre&gt;Although I have &lt;span style="font-weight: bold;"&gt;restricted drivers enabled&lt;/span&gt;, I tried to activate the NVidia driver on System/Administration/Hardware Drivers and nothing happens.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;img src="http://lh3.ggpht.com/_oKo6zFhdD98/SfNooEA7y4I/AAAAAAAAAPg/GMXeQ7IQOCc/s800/nvidia.png" /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;If I open a terminal window and run the following commands below, and then try to reactivate again, you will be able to see some error message displayed on the terminal window:&lt;br /&gt;&lt;pre&gt;sudo killall jockey-backend&lt;br /&gt;sudo /usr/share/jockey/jockey-backend --debug -l /tmp/jockey.log&lt;br /&gt;&lt;/pre&gt;In my case, I got the following error message:&lt;br /&gt;&lt;pre&gt;FATAL: Module nvidia not found.&lt;br /&gt;&lt;/pre&gt;The NVidia module cannot be found because I am running an old version of the Kernel (remember that I said to keep my existing menu.lst version!!) and the NVidia driver is compiled to the latest version.&lt;br /&gt;&lt;br /&gt;To check the kernel version I am running I just use the command "uname -r", and it returns 2.6.27-11-generic, but Ubuntu 9.07 comes with 2.6.28-11. So, I need to manually update my menu.lst file to be able to boot to the latest kernel version.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Warning: Only update your menu.lst file if you have done this before. This is not recommended for users that are not experienced with changing menu.lst file. If you are not an experienced Linux user, it is better to not proceed with these changes.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First, run the following commands to see that you have vmlinuz-2.6.28-11-generic:&lt;br /&gt;&lt;pre&gt;ls /boot/*2.6.28*&lt;br /&gt;&lt;/pre&gt;You should be able to see vmlinuz-2.6.28-11-generic and initrd.img-2.6.28-11-generic. Then, backup and edit your menu.lst file:&lt;br /&gt;&lt;pre&gt;sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak&lt;br /&gt;sudo gedit /boot/grub/menu.lst&lt;br /&gt;&lt;/pre&gt;The safest way is to &lt;span style="font-weight: bold;"&gt;duplicate your first boot menu entry, &lt;/span&gt;then change &lt;span style="font-weight: bold;"&gt;only this new entry &lt;/span&gt;to use the latest kernel version. In my case, I changed it from &lt;span style="font-weight: bold;"&gt;2.6.27-11&lt;/span&gt; to &lt;span style="font-weight: bold;"&gt;2.6.28-11&lt;/span&gt;. I also changed the &lt;span&gt;title to 9.04&lt;/span&gt;. This way you still have your previous entries in case you have any problems rebooting and need to restore your previous menu.lst from the backup copy (menu.lst.bak).&lt;br /&gt;&lt;br /&gt;Next time you reboot your machine, you can select the first boot entry and then you will see the following:&lt;br /&gt;&lt;pre&gt;* Running DKMS auto installation service for kernel&lt;br /&gt;* nvidia (173.14.16)...&lt;br /&gt;&lt;/pre&gt;And then your Ubuntu will be loaded with the proper video resolution!!&lt;br /&gt;&lt;br /&gt;If you have any problems rebooting your machine with the new entry, you can reboot it using an existing entry (or Ubuntu CD) and revert the changes you made by restoring the backup copy: menu.lst.bak (manually created) or menu.lst~ (created by gedit).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-516978284205881500?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/justWnxf4gY/nvidia-driver-not-working-after.html</link><author>noreply@blogger.com (Luis Rocha)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_oKo6zFhdD98/SfNooEA7y4I/AAAAAAAAAPg/GMXeQ7IQOCc/s72-c/nvidia.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/04/nvidia-driver-not-working-after.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-906514237186564220</guid><pubDate>Tue, 21 Apr 2009 02:39:00 +0000</pubDate><atom:updated>2009-04-20T20:56:23.182-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Training</category><title>LIDNUG LinkedIn .NET Users Group</title><description>Linked .NET Users Group (&lt;a href="http://www.lidnug.org/"&gt;LIDNUG&lt;/a&gt;) is an official INETA .NET User Group with online presentations through &lt;a href="http://office.microsoft.com/en-us/livemeeting/default.aspx"&gt;Live Meeting&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;T&lt;span&gt;hese are some upcoming events in the next few weeks:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;Brian Harry talks about VSTS 2010, April 30, 12:30 PM PST - &lt;/span&gt;&lt;a href="http://www.linkedin.com/e/plh/http%3A%2F%2Fevents.linkedin.com%2FLIDNUG-Brian-Harry-Visual-Studio-Team%2Fpub%2F54208/5Dup/" target="_blank"&gt;http://events.linkedin.com/&lt;wbr&gt;LIDNUG-Brian-Harry-Visual-&lt;wbr&gt;Studio-Team/pub/54208&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Stephen Toub talks about the .NET Parallel Extensions, May 7, 12:00 PM PST - &lt;/span&gt;&lt;a href="http://www.linkedin.com/e/plh/http%3A%2F%2Fevents.linkedin.com%2FLINDUG-Stephen-Toub-NET-Parallel%2Fpub%2F60569/bLFA/" target="_blank"&gt;http://events.linkedin.com/&lt;wbr&gt;LINDUG-Stephen-Toub-NET-&lt;wbr&gt;Parallel/pub/60569&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;Scott Guthrie talks shop with developers, May 11, 11:30 AM PST - &lt;/span&gt;&lt;a href="http://www.linkedin.com/e/plh/http%3A%2F%2Fevents.linkedin.com%2FLIDNUG-ScottGu-talks-shop-developers%2Fpub%2F60571/z7bg/" target="_blank"&gt;http://events.linkedin.com/&lt;wbr&gt;LIDNUG-ScottGu-talks-shop-&lt;wbr&gt;developers/pub/60571&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;                                                                          &lt;span&gt; You can also have their complete schedule from the following calendar links:&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span&gt;HTML: &lt;/span&gt;&lt;a href="http://www.linkedin.com/e/plh/http%3A%2F%2Fisaacabraham.calendar.live.com%2Fcalendar%2FLinked%2BIn%2B.NET%2BUser%2BGroup%2BEvents%2Findex.html/Hwhg/" target="_blank"&gt;http://isaacabraham.calendar.&lt;wbr&gt;live.com/calendar/Linked+In+.&lt;wbr&gt;NET+User+Group+Events/index.&lt;wbr&gt;html&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;RSS: &lt;/span&gt;&lt;a href="http://www.linkedin.com/e/plh/http%3A%2F%2Fisaacabraham.calendar.live.com%2Fcalendar%2FLinked%2BIn%2B.NET%2BUser%2BGroup%2BEvents%2Fcalendar.xml/_Gxw/" target="_blank"&gt;http://isaacabraham.calendar.&lt;wbr&gt;live.com/calendar/Linked+In+.&lt;wbr&gt;NET+User+Group+Events/&lt;wbr&gt;calendar.xml&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span&gt;ICS: webcal:/ /&lt;a href="http://isaacabraham.calendar.live.com/calendar/Linked+In+.NET+User+Group+Events/calendar.ics" target="_blank"&gt;isaacabraham.calendar.live.&lt;wbr&gt;com/calendar/Linked+In+.NET+&lt;wbr&gt;User+Group+Events/calendar.ics&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;I am looking forward to attend their presentations. Enjoy!!&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-906514237186564220?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/C_cPZpuGFm8/lidnug-linkedin-net-users-group.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">3</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/04/lidnug-linkedin-net-users-group.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-6923266989329984419</guid><pubDate>Sun, 05 Apr 2009 02:22:00 +0000</pubDate><atom:updated>2009-04-04T20:55:56.730-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">VMware</category><title>Error 1327 Invalid Drive when installing VMware Server</title><description>When I try to install WMware Server in Windows 7 (also happened on Vista and XP), I get the message &lt;span style="font-weight: bold;"&gt;Error 1327 Invalid Drive S:\&lt;/span&gt; and the installation aborts.&lt;br /&gt;&lt;br /&gt;For some reason, the VMware installer does not like when you change the default location of your shell folders. I have my Windows shell folders (My Documents, My Music, My Video, My Pictures) mapped to a network drive S:.&lt;br /&gt;&lt;br /&gt;The workaround is to temporary change your shell folders back to the default location. An easy way to do it, it is by changing the User Shell Folders registry key. Be careful when editing your Windows registry, so use the following steps at your own risk.&lt;br /&gt;&lt;br /&gt;1. Run regedit.exe&lt;br /&gt;&lt;br /&gt;2. Locate the following key:  HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders&lt;br /&gt;&lt;br /&gt;3. Click on File, Export and save this key to your desktop.&lt;br /&gt;&lt;br /&gt;4. Change all entries that uses your mapped drive (S: in my case) to the default one (%USERPROFILE%).&lt;br /&gt;&lt;br /&gt;5. Now, Install VMware Server.&lt;br /&gt;&lt;br /&gt;6. After installation completes, restore your User Shell Folders registry info by double clicking on the file saved on step #3.&lt;br /&gt;&lt;br /&gt;That is, you were able to install VMware server and also keep your shell folders at you custom location. I hope VMware folks fix this issue on their installer. Other people were also having this same issue when installing VMware tools.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-6923266989329984419?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/HwjnPaRDcbs/error-1327-invalid-drive-when.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/04/error-1327-invalid-drive-when.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-8946948765625607191</guid><pubDate>Sun, 29 Mar 2009 03:34:00 +0000</pubDate><atom:updated>2009-03-28T22:00:32.385-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">VMware</category><category domain="http://www.blogger.com/atom/ns#">Ubuntu</category><title>VMware is slow or hangs on Ubuntu when running virtual machines from NTFS partitions</title><description>I have an external hard drive (&lt;a href="http://www.wdc.com/en/products/Products.asp?DriveID=525"&gt;WD My Passport&lt;/a&gt;, highly recommended!) where I keep all my virtual machines and use it with my desktop (Windows 7) and laptop (Ubuntu 8.10). When I use Ubuntu as host, WMware hangs when starting virtual machines stored on my external HD (NTFS partition). If I copy these VMs to the host ext3 partition, then VMware works fine.&lt;br /&gt;&lt;br /&gt;In order to run virtual machines stored on a NTFS partition by using VMware on a Linux host, you will need to add the following entry to your configuration file (.vmx file):&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;mainMem.useNamedFile="FALSE"&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;This entry will disable paging files and VMware will work fine, often with a much better performance. For more details, see &lt;a href="http://www.ntfs-3g.org/support.html#vmware"&gt;here&lt;/a&gt;. After I added this entry to my .vmx files, I was able to successfully run all my virtual machines from the NTFS partition.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-8946948765625607191?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/wRbY54ASKAo/vmware-is-slow-or-hangs-on-ubuntu-when.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/03/vmware-is-slow-or-hangs-on-ubuntu-when.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-7513178432684997099</guid><pubDate>Sun, 22 Mar 2009 02:55:00 +0000</pubDate><atom:updated>2009-03-21T21:50:27.129-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Windows</category><title>Fixing Windows 7 Beta 64bit Blue Screen of Death (BSoD) tdx.sys</title><description>I have been using Windows 7 Beta (Build 7000) on my laptop since it became available. I have been very pleased with this new version and looking forward for its RTM. Today, I decided to install Windows Beta 64bit on my desktop machine as well. Everything was fine, until I started getting the following &lt;a href="http://en.wikipedia.org/wiki/Blue_Screen_of_Death"&gt;Blue Screen of Death (BSoD)&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://lh4.ggpht.com/_oKo6zFhdD98/ScWsmXo1yVI/AAAAAAAAAPQ/DUgxUCBzTfQ/s800/bsod.png.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;After some research, I found that the problem is related to my antivirus (&lt;a href="http://free.avg.com/"&gt;AVG Fee&lt;/a&gt;) and a network shared drive (&lt;a href="http://www.dlink.com/products/?pid=509"&gt;DNS323&lt;/a&gt; - Linux based using Samba).&lt;br /&gt;&lt;br /&gt;After multiples BSoD, Windows 7 finally suggested a solution to my problem:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://support.microsoft.com/kb/967891"&gt;&lt;img src="http://lh3.ggpht.com/_oKo6zFhdD98/ScWsmj4zcjI/AAAAAAAAAPY/XamDtZT8QeY/s800/bsod_solution.png.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The problem occurs because of an incorrect behavior in a system component that occurs when Server Message Block (SMB) connections go over Transport Driver Interface (TDI). My network shared drive uses Samba, which is a reimplementation of SMB. The hotfix can be found at:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://support.microsoft.com/kb/967891"&gt;http://support.microsoft.com/kb/967891&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;This hotfix has not undergone full testing. That is why it is not available under Windows Update. So, it is intended only for systems or computers that are experiencing the exact problem that is described here. You need to register to receive it by email. After installing this hotfix, my problem was solved, and I can finally enjoy Windows 7 Beta on my desktop machine!!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-7513178432684997099?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/xddO7sm_sf4/fixing-windows-7-beta-64bit-blue-screen.html</link><author>noreply@blogger.com (Luis Rocha)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_oKo6zFhdD98/ScWsmXo1yVI/AAAAAAAAAPQ/DUgxUCBzTfQ/s72-c/bsod.png.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/03/fixing-windows-7-beta-64bit-blue-screen.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-7673984391357352717</guid><pubDate>Mon, 09 Mar 2009 01:20:00 +0000</pubDate><atom:updated>2009-03-08T19:45:14.607-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SharePoint</category><category domain="http://www.blogger.com/atom/ns#">WSS</category><title>Memory Management of Windows SharePoint Services (WSS) Objects: Best Practices and SPDisposeCheck Tool</title><description>The Windows SharePoint Services (WSS) 3.0 object model, provides a set of classes to work with WSS data. These objects can be used to read and write data to the WSS store. The WSS object model contains many objects that implement the &lt;a href="http://msdn.microsoft.com/en-us/library/system.idisposable.aspx"&gt;IDisposable&lt;/a&gt; interface, which primary use is to release unmanaged resources. The Dispose method of IDisposable is intended to be called by consumers of the object, directly or with the &lt;a href="http://msdn.microsoft.com/en-us/library/yh598w02.aspx"&gt;using statement&lt;/a&gt;, in order to release unmanaged resources.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Best Practices for Disposing WSS objects&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Two common WSS objects that implement IDisposable are &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.aspx"&gt;SPSite&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.aspx"&gt;SPWeb&lt;/a&gt;. SPSite represents a site collection, and SPWeb represents a single site. A common mistake is to use these objects without disposing unmanaged resources:&lt;br /&gt;&lt;br /&gt;&lt;pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl05CSharp" space="preserve"&gt;&lt;span style="color:green;"&gt;// BAD: SPSite and SPWeb will be leaked.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;SPSite &lt;/span&gt;site = &lt;span style="color:blue;"&gt;new&lt;/span&gt; SPSite(&lt;span style="color:maroon;"&gt;&lt;span style="color:maroon;"&gt;"http://server"&lt;/span&gt;&lt;/span&gt;);&lt;br /&gt;&lt;span style="color:blue;"&gt;&lt;/span&gt;SPWeb web = site.OpenWeb();&lt;br /&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; title = web.Title;&lt;br /&gt;&lt;span style="color:blue;"&gt;string&lt;/span&gt; url = web.Url;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;A better way to write the code above is:&lt;br /&gt;&lt;pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl05CSharp" space="preserve"&gt;&lt;span style="color:green;"&gt;// GOOD: No leaks.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt;(SPSite site = &lt;span style="color:blue;"&gt;new&lt;/span&gt; SPSite(&lt;span style="color:maroon;"&gt;&lt;span style="color:maroon;"&gt;"http://server"&lt;/span&gt;&lt;/span&gt;))&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:blue;"&gt;    using&lt;/span&gt;(SPWeb web = site.OpenWeb())&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;{&lt;br /&gt;     &lt;span style="color:blue;"&gt;string&lt;/span&gt; title = web.Title;&lt;br /&gt;     &lt;span style="color:blue;"&gt;string&lt;/span&gt; url = web.Url;&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt; The code above was very simple, but you got the idea. Things start getting more complicated when you start combining calls into the same line. This makes harder to catch leaks, since you do not see the implicit referenced object. For example:&lt;br /&gt;&lt;pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl10CSharp" space="preserve"&gt;&lt;span style="color:blue;"&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;// BAD&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;&lt;/span&gt;SPWeb web = &lt;span style="color:blue;"&gt;new&lt;/span&gt; SPSite(&lt;span style="color:maroon;"&gt;&lt;span style="color:maroon;"&gt;"http://server"&lt;/span&gt;&lt;/span&gt;).OpenWeb();&lt;br /&gt;&lt;/pre&gt;The line above, might make you thing that there is only one leak, and you will attempt to fix with the following:&lt;br /&gt;&lt;pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl10CSharp" space="preserve"&gt;&lt;span style="color:blue;"&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;// BAD&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; (SPWeb web = &lt;span style="color:blue;"&gt;new&lt;/span&gt; SPSite(&lt;span style="color:maroon;"&gt;&lt;span style="color:maroon;"&gt;"http://server"&lt;/span&gt;&lt;/span&gt;).OpenWeb())&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:green;"&gt;&lt;/span&gt;    ...&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;The code above will dispose the SPWeb object that is returned by the OpenWeb method, but it will not dispose the SPSite that is created by the new operator. The solution is the same as the first problem:&lt;br /&gt;&lt;pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl05CSharp" space="preserve"&gt;&lt;span style="color:green;"&gt;// GOOD: No leaks.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:green;"&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt;(SPSite site = &lt;span style="color:blue;"&gt;new&lt;/span&gt; SPSite(&lt;span style="color:maroon;"&gt;&lt;span style="color:maroon;"&gt;"http://server"&lt;/span&gt;&lt;/span&gt;))&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt;(SPWeb web = site.OpenWeb())&lt;br /&gt;{&lt;br /&gt; ...&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Working with SharePoint collections also need some attention. When using &lt;a href="http://msdn.microsoft.com/en-us/library/ms978633.aspx"&gt;SPWebCollection&lt;/a&gt; objects, you will need to dispose any SPWeb object that is accessed using the [] indexer or with a &lt;span style="font-style: italic;"&gt;foreach&lt;/span&gt; statement. The same applies for &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsitecollection.aspx"&gt;SPSiteCollection&lt;/a&gt;. The following code shows how to avoid leaks when using the SPSiteWeb object:&lt;br /&gt;&lt;br /&gt;&lt;pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl51CSharp" space="preserve"&gt;&lt;span style="color:green;"&gt;// GOOD: No leaks.&lt;/span&gt;&lt;br /&gt;&lt;span style="color:blue;"&gt;using&lt;/span&gt; (SPSite site = &lt;span style="color:blue;"&gt;new&lt;/span&gt; SPSite(&lt;span style="color:maroon;"&gt;&lt;span style="color:maroon;"&gt;"http://server"&lt;/span&gt;&lt;/span&gt;))&lt;br /&gt;{&lt;br /&gt;&lt;span style="color:blue;"&gt;    using&lt;/span&gt; (SPWeb web = siteCollection.OpenWeb())&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;{&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;foreach&lt;/span&gt; (SPWeb innerWeb &lt;span style="color:blue;"&gt;in&lt;/span&gt; site.AllWebs)&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;{&lt;br /&gt;       &lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;try&lt;/span&gt;&lt;br /&gt;       &lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;{&lt;br /&gt;           &lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;// ...&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;finally&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;{&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="color:green;"&gt;// Must dispose the collection item.&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt;(innerWeb != &lt;span style="color:blue;"&gt;null&lt;/span&gt;)&lt;br /&gt;               &lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;innerWeb.Dispose();&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;}&lt;br /&gt;&lt;span&gt;&lt;span style="color:blue;"&gt;    &lt;/span&gt;&lt;/span&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;A similar approach would be used if you were accessing collection items using the [] indexer. You would need to dispose each object returned by [].&lt;br /&gt;&lt;br /&gt;The examples above just show you a few common cases of how to dispose WSS objects, just for you to get the idea. The following article provides detailed explanation of how to detect and proper dispose your SharePoint objects:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa973248.aspx"&gt;Best Practices: Using Disposable Windows SharePoint Services Objects&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;You can also look at Roger Lamb's article which complements the article above with lots of examples:&lt;ul&gt;&lt;li&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx"&gt;SharePoint 2007 and WSS 3.0 Dispose Patterns by Example&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;SPDisposeCheck Tool&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://code.msdn.microsoft.com/SPDisposeCheck"&gt;SPDisposeCheck &lt;/a&gt;tool analyzes your assembly and detect if you are disposing WSS objects properly. This tool &lt;span id="ctl00_ctl00_Content_TabContentPanel_Content_wikiSourceLabel"&gt;takes the path to a managed .DLL or .EXE, or the path to a directory containing many managed assemblies. It will recursively search for and analyze each managed module attempting to detect coding patterns based on best practice article above. &lt;/span&gt;The tool does not detect all possible unmanaged resources leaks, so you still have to learn the &lt;a href="http://msdn.microsoft.com/en-us/library/aa973248.aspx"&gt;best practices&lt;/a&gt; and review your code.&lt;br /&gt;&lt;br /&gt;You can install SPDisposeCheck from &lt;a href="http://download.microsoft.com/download/B/4/D/B4D279A0-E159-40BF-A5E8-F49ABDBE95C7/SPDisposeCheck.msi"&gt;here&lt;/a&gt;. It is a console application, and you should add &lt;span style="font-style: italic;"&gt;C:\Program Files\Microsoft\SharePoint Dispose Check&lt;/span&gt; to your path.&lt;br /&gt;&lt;br /&gt;The usage is:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;SPDisposeCheck -debug –xml&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The output is a list of potential problems. If you have the PDB symbol file available, then the output will include additional source code information about the error. The &lt;span style="font-weight: bold;"&gt;-debug&lt;/span&gt; option adds additional information to the output. The &lt;span style="font-weight: bold;"&gt;-xml &lt;/span&gt;option outputs the errors to an XML file instead of text, however, &lt;span id="ctl00_ctl00_Content_TabContentPanel_Content_wikiSourceLabel"&gt;the SPDisposeCheck site says that this option is unreliable, and they do not recommend to use this command on this release.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I run this tool with a WebPart that I recently created, and I got the following result:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;ID: SPDisposeCheckID_160&lt;br /&gt;Module: CustomCalendar.dll&lt;br /&gt;Method: CalendarGenerator.SharePointCalendarRepository.#ctor(System.String)&lt;br /&gt;Statement: manager := web.{Microsoft.SharePoint.SPWeb}GetLimitedWebPartManager(pageUrl, 1)&lt;br /&gt;Source: D:\Code\CustomCalendar\CustomCalendar\SharePointCalendarRepository.cs&lt;br /&gt;Line: 40&lt;br /&gt;Notes: Dispose/Close was not called on SPLimitedWebPartManager.Web&lt;br /&gt;More Information: http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_160&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;&lt;br /&gt;Total Found: 1&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Well, although I am embarrassed that it found a bug in my code, I am very glad that this tool works! In my code, I am calling &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.getlimitedwebpartmanager.aspx"&gt;GetLimitedWebPartManager&lt;/a&gt; which returns a &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.splimitedwebpartmanager.aspx"&gt;SPLimitedWebPartManager&lt;/a&gt;. This returned reference also needs to be disposed.&lt;br /&gt;&lt;br /&gt;The following table contains the possible errors, links to the detailed description, and a summary of the solution.&lt;br /&gt;&lt;br /&gt;&lt;table border="1" cellpadding="8" cellspacing="1" width="100%"&gt;&lt;col style="width: 165pt;" width="220"&gt;  &lt;col style="width: 436pt;" width="581"&gt;  &lt;tbody&gt;&lt;tr style="height: 15pt;" height="20"&gt;&lt;td style="height: 15pt; width: 165pt; font-weight: bold;" height="20" width="220"&gt;Error Code&lt;/td&gt;&lt;td style="width: 436pt; font-weight: bold;" width="581"&gt;Summary Solution&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;&lt;td style="height: 15pt; width: 165pt;" height="20" width="220"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_110"&gt;SPDisposeCheckID_110&lt;/a&gt;&lt;/td&gt;   &lt;td style="width: 436pt;" width="581"&gt;If you create a SharePoint object with a   new operator, ensure that the creating application disposes of it.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt; &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_120"&gt;SPDisposeCheckID_120&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;You must dispose the SPWeb objects that are created by SharePoint methods   that return other SPWeb objects (such as &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.openweb.aspx"&gt;OpenWeb&lt;/a&gt;).&lt;span style=""&gt; &lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_130"&gt;SPDisposeCheckID_130&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;You must dispose the SPSite object that is returned each time you access   &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.allwebs.aspx"&gt;SPSite.AllWebs&lt;/a&gt; [] index operator.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_140"&gt;SPDisposeCheckID_140&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;It is NOT necessary to dispose the SPWeb object returned by   &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spsite.rootweb.aspx"&gt;SPWeb.RootWeb&lt;/a&gt;. The dispose cleanup is handled automatically by the SharePoint   framework.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_150"&gt;SPDisposeCheckID_150&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;You must dispose the SPWeb object the is returned by calling &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spwebcollection.add.aspx"&gt;SPSite.AllWebs.Add&lt;/a&gt; method.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_160"&gt;SPDisposeCheckID_160&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;You must dispose the SPWeb object the is returned by the   &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.splimitedwebpartmanager.web.aspx"&gt;SPLimitedWebPartManager.Web&lt;/a&gt; property.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_170"&gt;SPDisposeCheckID_170&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;It is NOT necessary to dispose the SPWeb object returned by &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.parentweb.aspx"&gt;  SPWeb.ParentWeb&lt;/a&gt;. The dispose cleanup is handled automatically by the   SharePoint framework.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_180"&gt;SPDisposeCheckID_180&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;You must dispose all SPSite objects in the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.webs.aspx"&gt;SPWeb.Webs&lt;/a&gt; property   (SPWebCollection type).&lt;span style=""&gt; &lt;/span&gt;&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_190"&gt;SPDisposeCheckID_190&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;You must dispose the SPSite object that is created and returned by the   &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.webs.aspx"&gt;SPWeb.Webs&lt;/a&gt;.Add method.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_200"&gt;SPDisposeCheckID_200&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;You must dispose the SPSite object that is created and returned by the   &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spwebcollection.add.aspx"&gt;SPWebCollection.Add&lt;/a&gt; method.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_210"&gt;SPDisposeCheckID_210&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;It is NOT necessary to dispose SPContext object returned from calling   &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spcontrol.getcontextsite.aspx"&gt;SPControl.GetContextSite&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.spcontrol.getcontextweb.aspx"&gt;SPControl.GetContextWeb&lt;/a&gt; Methods, since they are   managed by the SharePoint framework.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_220"&gt;SPDisposeCheckID_220&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;It is NOT necessary to dispose &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spcontext.aspx"&gt;SPContext&lt;/a&gt; objects on your code, since they   are managed by the SharePoint framework.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_230"&gt;SPDisposeCheckID_230&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;You must dispose the SPSite object that is returned each time you access   &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsitecollection.aspx"&gt;SPSiteCollection&lt;/a&gt; [] index operator.&lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 15pt;" height="20"&gt;   &lt;td style="height: 15pt;" height="20"&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx#SPDisposeCheckID_240"&gt;SPDisposeCheckID_240&lt;/a&gt;&lt;/td&gt;   &lt;td&gt;You must dispose the any SPSite object returned from the &lt;a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spsitecollection.add.aspx"&gt;  SPSiteCollection.Add&lt;/a&gt; method.&lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;The tool also allows you to ignore a reported issue. If you have investigated a reported issue and are satisfied that it does not represent a problem, then you can add the following attribute to the calling method:&lt;br /&gt;&lt;pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl51CSharp" space="preserve"&gt;&lt;span style="font-size:100%;"&gt;[&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="color:blue;"&gt;SPDisposeCheckIgnore&lt;/span&gt;(&lt;/span&gt;&lt;span style=";font-size:100%;color:blue;"  &gt;SPDisposeCheckID.SPDisposeCheckID_100&lt;/span&gt;&lt;span style="font-size:100%;"&gt;, &lt;/span&gt;&lt;span style=";font-size:100%;color:maroon;"  &gt;&lt;span style="color:maroon;"&gt;"Ignoring this error"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;)]&lt;/span&gt;&lt;/pre&gt;To add this attribute to your method, you will need to grab the source code of the attribute class from the file:&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;C:\Program Files\Microsoft\SharePoint Dispose Check\SPDisposeExamplesSource.zip&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;One of things to consider, is to run SPDisposeCheck Tool as a post-build event of your assembly. If it reports any issue, then the build fails. Developers can then detect leak problems at build time and troubleshoot them as soon as possible.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Conclusion&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The improper memory management of WSS objects can lead to a poor system performance, system crash, or users experiencing unexpected errors (timeouts, page not available), especially under heavy loads. To avoid these problems, developers need to follow &lt;a href="http://msdn.microsoft.com/en-us/library/aa973248.aspx"&gt;best practices for disposing WSS objects&lt;/a&gt;, and also use tools, such as &lt;a href="http://code.msdn.microsoft.com/SPDisposeCheck"&gt;SPDisposeCheck&lt;/a&gt;, to check if their assemblies are properly disposing WSS objects.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;References&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa973248.aspx"&gt;Best Practices: Using Disposable Windows SharePoint Services Objects&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://code.msdn.microsoft.com/SPDisposeCheck"&gt;SPDisposeCheck Tool&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.msdn.com/pandrew/archive/2009/01/29/spdisposecheck-v1-3-1-is-released.aspx"&gt;SPDisposeCheck Announcement&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://blogs.msdn.com/rogerla/archive/2008/02/12/sharepoint-2007-and-wss-3-0-dispose-patterns-by-example.aspx"&gt;SharePoint 2007 and WSS 3.0 Dispose Patterns by Example&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-7673984391357352717?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/zSGqVmladH0/memory-management-of-windows-sharepoint.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/03/memory-management-of-windows-sharepoint.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-3589869215214682392</guid><pubDate>Tue, 17 Feb 2009 06:07:00 +0000</pubDate><atom:updated>2009-02-16T23:34:28.234-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">WinForms</category><category domain="http://www.blogger.com/atom/ns#">WebForms</category><category domain="http://www.blogger.com/atom/ns#">Silverlight</category><title>Free DevExpress controls and IDE productive Tools</title><description>&lt;a href="http://devexpress.com/"&gt;DevExpress&lt;/a&gt; is a software development company producing .NET components, controls and IDE productivity tools. They also offer some of their commercial products for free!! The list below contains some of their FREE products that I am aware of. Just register to get your free license:&lt;br /&gt;&lt;br /&gt;.NET Controls:&lt;br /&gt;&lt;ul class="list"&gt;&lt;li&gt;&lt;a href="http://www.devexpress.com/Products/Free/WebRegistration60/Index.xml"&gt;Over 60 free ASP.NET and Windows Forms controls&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://devexpress.com/Products/NET/Controls/Silverlight/Register/"&gt;Free Silverlight Controls&lt;/a&gt;: includes free Silverlight Grid (AgDataGrid) and Menu (AgMenu) controls with full source code.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;IDE Productivity Tools:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/"&gt;CodeRush Xpress for Visual Studio&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://devexpress.com/Products/Visual_Studio_Add-in/VBRefactor/"&gt;Refactor! for Visual Basic&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://devexpress.com/Products/Visual_Studio_Add-in/RefactorASP/"&gt;Refactor! for ASP.NET&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://devexpress.com/Products/Visual_Studio_Add-in/RefactorCPP/"&gt;Refactor! for C++&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-3589869215214682392?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/ivdUvU9oRX8/free-devexpress-controls-and-ide.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/02/free-devexpress-controls-and-ide.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-4738728533914533272</guid><pubDate>Tue, 17 Feb 2009 00:44:00 +0000</pubDate><atom:updated>2009-02-16T17:50:21.334-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Testing</category><category domain="http://www.blogger.com/atom/ns#">TDD</category><title>Comparing Mock frameworks for .NET</title><description>&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.codevanced.net/page/About.aspx"&gt;Andrew Kazyrevich&lt;/a&gt; posted a series of articles comparing the most popular Mock frameworks for .NET development: &lt;a href="http://sourceforge.net/projects/nmock2/"&gt;NMock2&lt;/a&gt;, &lt;a href="http://ayende.com/projects/rhino-mocks.aspx"&gt;Rhino Mocks&lt;/a&gt;, &lt;a href="http://code.google.com/p/moq/"&gt;Moq&lt;/a&gt;, and &lt;a href="http://typemock.com/"&gt;Typemock Isolator&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The complete series of articles can be found at:&lt;br /&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.codevanced.net/post/Mocking.aspx"&gt;Touching a hot iron (Part 1)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.codevanced.net/post/Touching-a-hot-iron-NMock2.aspx"&gt;Touching a hot iron: NMock2 (Part 2)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.codevanced.net/post/Touching-a-hot-iron-Rhino-Mocks.aspx"&gt;Touching a hot iron: Rhino Mocks (Part 3)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.codevanced.net/post/Touching-a-hot-iron-Moq.aspx"&gt;Touching a hot iron: Moq (Part 4)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.codevanced.net/post/Touching-a-hot-iron-Typemock-Isolator.aspx"&gt;Touching a hot iron: Typemock Isolator (Part 5)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a href="http://www.codevanced.net/post/Touching-a-hot-iron-finishing-off.aspx"&gt;Touching a hot iron: finishing off (Part 6)&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;span style="font-size:100%;"&gt;He also created an open source project that "&lt;/span&gt;&lt;span style=";font-family:georgia,palatino;font-size:100%;"  &gt;&lt;span style="font-family:georgia,palatino;"&gt;&lt;i&gt;provides a unified set of tests written against Moq, NMock2, Rhino Mocks and Typemock Isolator, so that you can easily compare the frameworks and make an informed decision when picking one up&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;".&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/mocking-frameworks-compare/"&gt;http://code.google.com/p/mocking-frameworks-compare/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-4738728533914533272?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/9so2lUwBhuw/comparing-mocks-frameworks-for-net.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/02/comparing-mocks-frameworks-for-net.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-8302388020437754636</guid><pubDate>Wed, 11 Feb 2009 05:48:00 +0000</pubDate><atom:updated>2009-02-11T00:06:26.470-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Certification</category><title>Microsoft Certification for Developers</title><description>Today I was talking to my buddies from work, Ryan and Michael, about Microsoft certification. We discussed about the MCPD and the SharePoint certifications and I decided to post some information here.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;MCPD Enterprise Application Developer 3.5&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;The &lt;a title="MCPD Enterprise Application Developer 3.5" href="http://www.microsoft.com/learning/mcp/mcpd/vstudio/2008/default.mspx#EEC" id="t1wm"&gt;MCPD Enterprise Application Developer 3.5&lt;/a&gt; certification is the current top developer certification and it requires you to pass in 6 exams. The following table contains all the exams and links to the official training books. Some of books have not been published yet, but they are expected sometime during the first quarter of 2009.&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a title="70-536" href="http://www.microsoft.com/learning/en/us/exams/70-536.mspx" id="j-8b"&gt;70-536&lt;/a&gt; &lt;span&gt;TS: Microsoft .NET Framework 2.0 - Application Development Foundation&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a title="Official Training Book" href="http://www.amazon.ca/MCTS-Self-Paced-Training-Exam-70-536/dp/0735626197/ref=pd_bbs_sr_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1234323559&amp;amp;sr=8-1" id="efk7"&gt;Official Training Book&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; (CAD48.50)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;br /&gt;&lt;a title="70-562" href="http://www.microsoft.com/learning/en/us/exams/70-562.mspx" id="f353"&gt;70-562&lt;/a&gt; &lt;span&gt;TS: Microsoft .NET Framework 3.5, ASP.NET Application Development&lt;/span&gt;&lt;/b&gt;&lt;/span&gt; &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a title="Official Training Book" href="http://www.amazon.ca/MCTS-Self-Paced-Training-Exam-70-562/dp/073562562X/ref=wl_it_dp?ie=UTF8&amp;amp;coliid=I1GS77SNVHNPWW&amp;amp;colid=3H9PJNQ7RU00E" id="uof1"&gt;Official Training Book&lt;/a&gt; (&lt;/span&gt;&lt;span style="font-size:100%;"&gt;CAD48.50). &lt;/span&gt;&lt;span style="font-size:100%;"&gt;Not published, expected on &lt;span&gt;April 15 2009.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;span style="font-size:100%;"&gt;&lt;b&gt;&lt;br /&gt;&lt;a title="70-505" href="http://www.microsoft.com/learning/en/us/exams/70-505.aspx" id="ip6-"&gt;70-505&lt;/a&gt; &lt;span&gt;TS: Microsoft .NET Framework 3.5, Windows Forms Application Development&lt;/span&gt;&lt;/b&gt;&lt;/span&gt; &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a title="Official Training Book" href="http://www.amazon.ca/MCTS-Self-Paced-Training-Exam-70-505/dp/0735626375/ref=pd_sim_b?ie=UTF8&amp;amp;qid=1234323559&amp;amp;sr=8-1" id="g49d"&gt;Official Training Book&lt;/a&gt;&lt;span&gt; (&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;CAD52.91). &lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span&gt;Not published, expected on Feb 25 2009.  Since there is not so much difference between the .NET 3.5 and .NET 2.0 versions, you could use this &lt;a title="book" href="http://www.amazon.ca/MCTS-Self-Paced-Training-Exam-70-526/dp/0735623333/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1234333674&amp;amp;sr=1-1" id="ghvd"&gt;book&lt;/a&gt; (I used this book for the beta exam).&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;b&gt;&lt;a title="70-561" href="http://www.microsoft.com/learning/en/us/exams/70-561.mspx" id="omi6"&gt;70-561&lt;/a&gt; &lt;span&gt;TS: Microsoft .NET Framework 3.5, ADO.NET Application Development&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a title="Official Training Book" href="http://www.amazon.ca/MCTS-Self-Paced-Training-Exam-70-561/dp/0735625638/ref=pd_sim_b?ie=UTF8&amp;amp;qid=1234323559&amp;amp;sr=8-1" id="imbv"&gt;Official Training Book&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span&gt; (&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;CAD52.91). N&lt;/span&gt;&lt;span style="font-size:100%;"&gt;ot published, expected on Mar 25 2009.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;b&gt;&lt;a title="70-503" href="http://www.microsoft.com/learning/en/us/exams/70-503.mspx" id="knaa"&gt;70-503&lt;/a&gt; &lt;span&gt;TS: Microsoft .NET Framework 3.5 – Windows Communication Foundation Application Development&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;&lt;a title="Official Training Book" href="http://www.amazon.ca/MCTS-Self-Paced-Training-Exam-70-503/dp/0735625654/ref=pd_bxgy_b_img_b?ie=UTF8&amp;amp;qid=1234323559&amp;amp;sr=8-1" id="ak1k"&gt;Official Training Book&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; (&lt;/span&gt;&lt;span style="font-size:100%;"&gt;CAD48.50)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;b&gt;&lt;a title="70-565" href="http://www.microsoft.com/learning/en/us/exams/70-565.aspx" id="v2c1"&gt;70-565&lt;/a&gt; &lt;span&gt;Pro: Designing and Developing Enterprise Applications Using the Microsoft .NET Framework 3.5&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;  &lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;No current Official Training Book. However, there is the .NET 2.0 version &lt;a title="here" href="http://www.amazon.ca/MCPD-Self-Paced-Training-Exam-70-549/dp/0735623384/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1234325139&amp;amp;sr=1-1" id="w9:t"&gt;here&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; (&lt;/span&gt;&lt;span style="font-size:100%;"&gt;CAD48.50).&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;The exams don't have to be completed in a specific order, but I recommend starting with the &lt;a title="70-536" href="http://www.microsoft.com/learning/en/us/exams/70-536.aspx" id="k7nh"&gt;70-536&lt;/a&gt;  exam first for two reasons:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The &lt;a title="70-536" href="http://www.microsoft.com/learning/en/us/exams/70-536.aspx" id="k7nh"&gt;70-536&lt;/a&gt; exam contains the foundations of .NET framework (types, collections, threading, app domains, configuration, serialization, encryption, code access security, reflection, interoperability, globalization, and drawing). This will provide a very good foundation before jumping into the specific types of applications. &lt;/li&gt;&lt;li&gt;The &lt;a title="70-536" href="http://www.microsoft.com/learning/en/us/exams/70-536.aspx" id="k7nh"&gt;70-536&lt;/a&gt; exam is a prerequisite for all the developer MCTS certifications. To acquire your first .NET MCTS certification, you need to pass in two exams : the 70-536 and the desired &lt;a title="MCTS exam" href="http://www.microsoft.com/learning/mcp/mcts/vstudio/2008/default.mspx" id="mis."&gt;MCTS exam&lt;/a&gt;  (WCF, Windows Form, ASP.NET, ADO.NET, WF, WPF). By taking &lt;a title="70-536" href="http://www.microsoft.com/learning/en/us/exams/70-536.aspx" id="k7nh"&gt;70-536&lt;/a&gt; first, you will acquire a new MCTS certification for every subsequent &lt;a title="MCTS exam" href="http://www.microsoft.com/learning/mcp/mcts/vstudio/2008/default.mspx" id="mis."&gt;MCTS exam&lt;/a&gt;  you pass.&lt;/li&gt;&lt;/ul&gt;Another recommendation is to take the &lt;a title="70-565" href="http://www.microsoft.com/learning/en/us/exams/70-565.aspx" id="bd2l"&gt;70-565&lt;/a&gt; exam at last. This is the professional exam that will cover designing .NET enterprise applications and choosing the proper technologies. It is better to finish all the specific applications first before taking this one, for obvious reasons.&lt;br /&gt;For the other exams, you should choose first a exam that you are most familiar with. This will make your life easier, and you will progressively advance to other exams of unknown areas.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Some Tips when preparing for the exams above:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;One of the most important things is to practice all the material. You should try all the code samples you find in the study guide, make modifications, improve the code, apply real scenarios and examples from your day job, etc. Also, try using different methods overloads, different constructors, etc. Sometimes the training book shows how to use some set of classes, and then on the exam you see them used with different methods and constructors and do not know if it is right or wrong. So, go beyond the examples of the book.&lt;/li&gt;&lt;li&gt;Check it out the material in the MSDN online. If the book is showing you how to use the a certain class, check it out the documentation at MSDN to see this class methods, properties and the usage examples on MSDN.&lt;/li&gt;&lt;li&gt;Although the books are great resources, read all the topics of the preparation guides to make sure you know all of them. Supplement book information with MSDN library information.&lt;br /&gt;  &lt;/li&gt;&lt;li&gt;Make sure to get the book correction from Microsoft Support. When I was studying with the .NET 2.0 training books, I found lots of minor mistakes in the books. To get the book correction, just go to the &lt;a title="Microsoft Help and Support" href="http://support.microsoft.com/default.aspx" id="gv4j"&gt;Microsoft Help and Support&lt;/a&gt;  and search for the book ISBN. For more information, see &lt;a title="here" href="http://www.microsoft.com/mspress/support/search.aspx" id="nful"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Usually these books come with practice tests from &lt;a title="MeasureUp" href="http://www.measureup.com/" id="jfmo"&gt;MeasureUp&lt;/a&gt;. It is recommended to practice these tests to get used to the format of the exam, type of questions, etc.&lt;/li&gt;&lt;li&gt;Take advantage of the &lt;a title="Microsoft Second Shot" href="http://www.microsoft.com/Learning/Mcp/Offers/Secondshot/Default.Mspx" id="hwuf"&gt;Microsoft Second Shot&lt;/a&gt;. You get an exam voucher to be used when registering to your exam. If you fail the exam, you can register for a free retake exam using this voucher. It is a good investment just in case something bad happen during your first attempt.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Additional Resources:&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a title="Prometric" href="http://www.prometric.com/Microsoft/default.htm" id="jab9"&gt;Prometric&lt;/a&gt;: this is the exam provider where you can schedule a Microsoft certification exam. You will be able to choose the test site where you can take your exam. The .NET 3.5 exams usually cost USD 125. Do not forget to use a exam voucher from &lt;a title="Microsoft Second Shot" href="http://www.microsoft.com/Learning/Mcp/Offers/Secondshot/Default.Mspx" id="hwuf"&gt;Microsoft Second Shot&lt;/a&gt; when registering, just in case you need to retake the exam.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="Gerry O'Brien's Blog" href="http://blogs.msdn.com/gerryo/default.aspx" id="xrj0"&gt;Gerry O'Brien's Blog&lt;/a&gt;: This is the official blog about Microsoft certifications for developer and SQL Server. You will find information about upcoming exams, new certifications, beta exams, etc. Also, pay attention to announcements for Visual Studio 2010 exams, that should bring a new MCPD .NET 4.0. Gerry and his team are still planning the new certifications, but as you can see from his comments, there will be upgrade exams from MCPD 3.5 to 4.0 (2 upgrade exams, I think), see his comments on this &lt;a title="post" href="http://blogs.msdn.com/gerryo/archive/2009/01/12/quick-update-for-the-new-year.aspx" id="au1p"&gt;post&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a title="Beta Exams Annoucements" href="http://blogs.technet.com/betaexams/default.aspx" id="ng08"&gt;Beta Exams Announcements&lt;/a&gt;: This blog contains announcements about beta exams. What is a beta exam? Well, it works like a beta software. Before opening a new exam for the general public, Microsoft first releases it as beta exam (71-### instead of 70-###) to evaluate the exam, get feedback and error reports from test takers. You can register for these beta exams for &lt;span style="font-weight: bold;"&gt;free&lt;/span&gt; (normal cost is 125 USD), and if you pass on the beta exam, the exam credit will be added to your transcript and you will not need to take the exam in its released form. I took 4 beta exams of .NET 3.5 and passed on them without paying anything!! When taking beta exams, make sure to leave some feedback because they are expecting our input to improve the exam experience.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;SharePoint Certification&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I started working with SharePoint (WSS 3.0 and MOSS 2007) recently and I am planning to get certified on it as well.  For developers, there are two SharePoint MCTS:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a style="font-weight: bold;" href="http://www.microsoft.com/learning/en/us/exams/70-541.mspx"&gt;70-541&lt;/a&gt;&lt;span style="font-weight: bold;"&gt; TS: Microsoft Windows SharePoint Services 3.0 – Application Development&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;No official training book, but there is the Microsoft Press &lt;a href="http://www.amazon.ca/Microsoft-Windows-SharePoint-Services-Version/dp/0735623201/ref=sr_11_1?ie=UTF8&amp;amp;qid=1234334931&amp;amp;sr=11-1"&gt;book&lt;/a&gt; (CAD34.64).&lt;/li&gt;&lt;li&gt;There are no practice tests from MeasureUp for this exam.&lt;/li&gt;&lt;/ul&gt;&lt;a style="font-weight: bold;" href="http://www.microsoft.com/learning/en/us/exams/70-542.mspx"&gt;70-542&lt;/a&gt;&lt;span style="font-weight: bold;"&gt; TS: Microsoft Office SharePoint Server 2007 – Application Development&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;No official training book, but there is the Microsoft Press &lt;a href="http://www.amazon.ca/Inside-Microsoft-Office-SharePoint-Server/dp/0735623686/ref=sr_11_1?ie=UTF8&amp;amp;qid=1234335097&amp;amp;sr=11-1"&gt;book&lt;/a&gt; (CAD31.49).&lt;/li&gt;&lt;li&gt;You might consider buying the &lt;a href="http://www.measureup.com/catalog/product.aspx?vid=5&amp;amp;cid=All%20MS%20Practice%20Tests&amp;amp;tid=94&amp;amp;pid=2195"&gt;practice tests&lt;/a&gt; from MeasureUp.&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-8302388020437754636?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/_F_Jv2au0Po/microsoft-certification-for-developers.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/02/microsoft-certification-for-developers.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-2241474497183358830</guid><pubDate>Tue, 27 Jan 2009 04:30:00 +0000</pubDate><atom:updated>2009-01-26T22:05:50.539-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Certification</category><title>MCPD Certification and Next</title><description>&lt;a href="http://picasaweb.google.ca/lh/photo/tWGpKaCs90Ymd9UUy09ztw?authkey=sTu_kxOYYt8&amp;amp;feat=embedwebsite"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://lh6.ggpht.com/_oKo6zFhdD98/SX5qpjE1DtI/AAAAAAAAANo/8ODmvP4nskQ/s800/MCPD%28rgb%29_506.png" /&gt;&lt;/a&gt;I finally got my &lt;a href="http://www.microsoft.com/learning/mcp/mcpd/entapp/default.mspx"&gt;MCPD&lt;/a&gt; certification by upgrading my MCSD certification!! My last exam was &lt;a href="http://www.microsoft.com/learning/en/us/exams/70-551.mspx"&gt;70-551&lt;/a&gt; which took about 3 1/2 hours to complete. This upgrade exam includes content from three regular exams: &lt;a href="http://www.microsoft.com/learning/en/us/exams/70-536.mspx"&gt;70-536&lt;/a&gt; (.NET Foundation), &lt;a href="http://www.microsoft.com/learning/en/us/exams/70-526.mspx"&gt;70-526&lt;/a&gt; (Windows Apps) and &lt;a href="http://www.microsoft.com/learning/en/us/exams/70-528.mspx"&gt;70-528&lt;/a&gt; (Web Apps). So, the scope of the upgrade exam is too big, and it was probably one of the hardest I ever had to prepare (3 books).&lt;br /&gt;&lt;br /&gt;In the 70-551 exam, the Windows Application part had many questions about ClickOnce technology, and I regret not spending more time when studying it. The Web Applications part also had a topic which I should have spent more time studying, the Web Part controls. But, at the end, I was able to pass on it. Note that in upgrade exams like this, you need to achieve at least 700 points in each part, and the final exam score is the minimum score on each part, not the average. So, it means if you do very well in two parts, but get only 690 on the third part, you will fail the whole upgrade exam, and you will have to take all the three parts again when retaking the exam.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://picasaweb.google.ca/lh/photo/DqeT6G0GrHApzf8e-5iwXA?authkey=sTu_kxOYYt8&amp;amp;feat=embedwebsite"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: right; cursor: pointer;" src="http://lh6.ggpht.com/_oKo6zFhdD98/SXpgeYbuaxI/AAAAAAAAANY/EIeHh8kCQGo/s400/CertificationBooks.JPG" /&gt;&lt;/a&gt;I started my certification path back in 2005, but only completed two exams towards &lt;a href="http://www.microsoft.com/learning/mcp/mcad/default.mspx"&gt;MCAD&lt;/a&gt;. After passing on these two exams, Microsoft announced the new certifications for Visual Studio 2005. At the same time, I got a new job in California and did not have enough time to dedicate to .NET certifications. Only last year I decided to continue my certification path. I thought about starting from the scratch, but decided to follow the upgrade path. The results can be seen on the picture with the pile of books I had to study. The XBox 360 just happen to be on my desk, it is not related with .NET certification. It actually represents a threat to my whole certification path!!&lt;br /&gt;&lt;br /&gt;Some developers think that certifications are useless. I agree that certification is not everything, it shows that you pass on the exam, and there are many other things to consider such as your work experience. On the other hand, I see these certifications as an structured way to learn. The goal is not to pass, but it is to study and learn the content of the exam. They expose you to a wide view of the .NET framework, rather than a specific view. You will get the detailed knowledge by working on a project on a daily basis, but this wide view is important to expose you to different areas that you might not touch when working on your projects. So, I am still continuing my certification path and I highly recommend my fellow developers to work on it.&lt;br /&gt;&lt;br /&gt;Well, what is next now? I got the MCPD EAD (Enterprise Application Developer) for the VS 2005 (.NET 2.0), and now I want to upgrade it to MCPD EAD .NET 3.5. There are two upgrade exams: 70-568 and 70-569. These exams are not available yet, and they should be available soon. At the same time, I participated on the Beta exams of the .NET 3.5 certifications. Note that beta exams are free, but they expect you to know the area and provide feedback about it (see beta exams announcement &lt;a href="http://blogs.technet.com/betaexams/default.aspx"&gt;here&lt;/a&gt;). I took 3 beta exams of the new .NET 3.5 track (&lt;a href="http://www.microsoft.com/learning/en/us/exams/70-561.mspx"&gt;70-561&lt;/a&gt;, &lt;a href="http://www.microsoft.com/learning/en/us/exams/70-505.mspx"&gt;70-505&lt;/a&gt;, and 70-565), and received so far the result of only one (which I passed!!). The other ones, I do not know the results yet. Beta exam results are only sent after 8 weeks (or more!!) after the end of the beta period. If I end up passing on the other ones, then I will just to two regular exams (&lt;a href="http://www.microsoft.com/learning/en/us/exams/70-503.mspx"&gt;70-503&lt;/a&gt; and &lt;a href="http://www.microsoft.com/learning/en/us/exams/70-562.mspx"&gt;70-562&lt;/a&gt;), instead of two upgrade exams. The following diagram shows some upgrade paths to MCPD EAD .NET 3.5:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://picasaweb.google.ca/lh/photo/p5Q0bq8XtFzNGPQe6oEJog?authkey=sTu_kxOYYt8&amp;amp;feat=embedwebsite"&gt;&lt;img src="http://lh5.ggpht.com/_oKo6zFhdD98/SMHGlWLulGI/AAAAAAAAAIw/fK7NFJs5iLk/s800/CertificationMap.png" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-2241474497183358830?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/qdLAuElMvjY/mcpd-certification-and-next.html</link><author>noreply@blogger.com (Luis Rocha)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_oKo6zFhdD98/SX5qpjE1DtI/AAAAAAAAANo/8ODmvP4nskQ/s72-c/MCPD%28rgb%29_506.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/01/mcpd-certification-and-next.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-8858993572883699291</guid><pubDate>Fri, 23 Jan 2009 01:12:00 +0000</pubDate><atom:updated>2009-01-22T18:28:49.353-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">T4 Text Templates</category><title>Multiple output files from a T4 template</title><description>When using T4 templates for code generation, I always needed to generate multiple files from the same template. Unfortunately, Visual Studio does not support this, and I was using a solution based on this &lt;a href="http://social.msdn.microsoft.com/forums/en-US/vsx/thread/bda0f83f-9e29-432d-8844-5cfe61497804/"&gt;MSDN forum&lt;/a&gt; discussion.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://damieng.com/"&gt;Damien Guard&lt;/a&gt; just posted a nice solution for this problem. See his post at:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://damieng.com/blog/2009/01/22/multiple-outputs-from-t4-made-easy"&gt;Multiple outputs from T4 made easy&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;I am looking forward to update my current t4 templates to use this new solution.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-8858993572883699291?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/tel-VQ_9qVs/multiple-output-files-from-t4-template.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/01/multiple-output-files-from-t4-template.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-7182833982392241132</guid><pubDate>Wed, 14 Jan 2009 06:01:00 +0000</pubDate><atom:updated>2009-01-13T23:36:23.287-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Repository Factory</category><category domain="http://www.blogger.com/atom/ns#">Code Generation</category><category domain="http://www.blogger.com/atom/ns#">GAT/GAX</category><title>Guidance Automation Toolkit (GAT) Documentation</title><description>One of the hardest things to work on the Repository Factory is the lack of documentation about creating software factories using &lt;a href="http://msdn.microsoft.com/en-us/vsts2008/aa718950.aspx"&gt;Guidance Automation Toolkit (GAT)&lt;/a&gt;. One of the Repository Factory users asked about the documentation available (see &lt;a href="http://www.codeplex.com/RepositoryFactory/Thread/View.aspx?ThreadId=30594&amp;amp;ANCHOR#Post146905"&gt;here&lt;/a&gt;). At the time we inherited this code from the p&amp;amp;p team, there was no documentation about it and we had to learn from the code. Since &lt;a href="http://www.codeplex.com/RepositoryFactory"&gt;Repository Factory&lt;/a&gt; is just a GAT software factory like &lt;a href="http://www.codeplex.com/websf"&gt;WCSF&lt;/a&gt;, &lt;a href="http://www.codeplex.com/servicefactory"&gt;WSSF&lt;/a&gt;, and &lt;a href="http://www.codeplex.com/smartclient"&gt;SCSF&lt;/a&gt;, it should be easy to find information about GAT, right? Yeah right!?!?&lt;br /&gt;&lt;br /&gt;The &lt;a href="http://msdn.microsoft.com/en-us/vsts2008/aa718950.aspx"&gt;GAT web site&lt;/a&gt; &lt;a href="http://www.guidanceautomation.net/" target="_blank"&gt;&lt;/a&gt; does not have too much documentation, besides the general overview. The community web site &lt;a href="http://www.guidanceautomation.net/" target="_blank"&gt;GuidanceAutomation.net&lt;/a&gt; does not work anymore, returning &lt;span style="font-weight: bold;"&gt;Service Unavailable&lt;/span&gt; error. The only book that I know about creating software factories using GAT is the &lt;a href="http://www.codeplex.com/RepositoryFactory/Thread/Practical%20Software%20Factories%20in%20.NET"&gt;Practical Software Factories in .NET&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The best online documentation I found about GAT is from &lt;a href="http://jelle.druyts.net/" target="_blank"&gt;Jelle Druyts&lt;/a&gt; , who created a series of articles about GAT based on the June 2006 CTP: &lt;ul&gt;&lt;li&gt;&lt;a href="http://jelle.druyts.net/2006/06/26/GAS01IntroductionToTheGuidanceAutomationJune2006CTP.aspx" target="_blank"&gt;GAS01: Introduction to the Guidance Automation June 2006 CTP&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://jelle.druyts.net/2006/06/26/GAS02CreatingAGuidancePackage.aspx" target="_blank"&gt;GAS02: Creating a Guidance Package&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://jelle.druyts.net/2006/06/27/GAS03GeneratingACProject.aspx" target="_blank"&gt;GAS03: Creating a C# project&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://jelle.druyts.net/2006/06/28/GAS04AddingProjectReferences.aspx" target="_blank"&gt;GAS04: Adding project references&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://jelle.druyts.net/2006/06/29/GAS05TuningTheCProjects.aspx" target="_blank"&gt;GAS05: Tuning the C# projects&lt;/a&gt;  &lt;/li&gt;&lt;li&gt;&lt;a href="http://jelle.druyts.net/2006/07/03/GAS06GeneratingClasses.aspx" target="_blank"&gt;GAS06: Generating classes&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a class="TitleLinkStyle" rel="bookmark" href="http://jelle.druyts.net/2006/09/18/GAS07RenamingTheSolutionSigningProjectsAndShowingDocumentation.aspx"&gt;GAS07: Renaming the solution, signing projects and showing documentation&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;I am just wondering who else is using the GAT, and if Microsoft will still release any new version of it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-7182833982392241132?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/hvprPM7Ozew/guidance-automation-toolkit-gat.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/01/guidance-automation-toolkit-gat.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-9155511620777610142</guid><pubDate>Mon, 05 Jan 2009 04:23:00 +0000</pubDate><atom:updated>2009-01-04T22:07:33.858-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Chinook Database</category><category domain="http://www.blogger.com/atom/ns#">Database</category><title>Chinook Database 1.1 Released</title><description>I just released a new version of the &lt;a href="http://www.codeplex.com/ChinookDatabase"&gt;Chinook Database&lt;/a&gt;. Chinook Database is a sample database that represents a digital media store, like iTunes, including information of artists, albums, tracks, media type, invoices, customers, etc. The media information was imported from my iTunes library, the customer/employee info was created manually, and the sales info is auto-generated for a 4 years period.&lt;br /&gt;&lt;br /&gt;It supports Oracle, MySQL, SQL Server and SQL Server Compact. The database can be created by running a single SQL script. It is also provided as an XML file and a SQL Server Compact database. It is possible to use your own iTunes library information to regenerate these scripts, see more details &lt;a href="http://www.codeplex.com/ChinookDatabase/Wiki/View.aspx?title=Building_Scripts&amp;amp;referringTitle=Home"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The SQL scripts and unit tests are auto-generated using T4 templates by reading the tables information defined in an XML schema.&lt;br /&gt;&lt;br /&gt;The new changes for the release 1.1 are:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Support for SQL Server Compact.&lt;/li&gt;&lt;li&gt;Additional customers from multiple countries.&lt;/li&gt;&lt;li&gt;Added a many-to-many relationship (a Playlist contains many Tracks, a Track belongs to many Playlists).&lt;/li&gt;&lt;li&gt;Added a one-to-many relationship between Employee and Customer (support representative).&lt;/li&gt;&lt;li&gt;Added Total field to invoice table.&lt;/li&gt;&lt;/ul&gt;I also created more unit tests to validate the data created in the database after running the SQL scripts.&lt;br /&gt;&lt;br /&gt;The new schema is:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://lh4.ggpht.com/_oKo6zFhdD98/SWFPtyfHJFI/AAAAAAAAAMc/GdrlzeBNsZM/s800/ChinookDatabaseSchema1.1.png"&gt;&lt;img src="http://lh4.ggpht.com/_oKo6zFhdD98/SWFPtyfHJFI/AAAAAAAAAMc/GdrlzeBNsZM/s800/ChinookDatabaseSchema1.1.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can download this new version from the &lt;a href="http://www.codeplex.com/ChinookDatabase/Release/ProjectReleases.aspx?ReleaseId=21111"&gt;Chinook Database 1.1 Release&lt;/a&gt; page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-9155511620777610142?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/mAAViYdLYi8/chinook-database-11-released.html</link><author>noreply@blogger.com (Luis Rocha)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_oKo6zFhdD98/SWFPtyfHJFI/AAAAAAAAAMc/GdrlzeBNsZM/s72-c/ChinookDatabaseSchema1.1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://www.luisrocha.net/2009/01/chinook-database-11-released.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-4832077399083701884</guid><pubDate>Wed, 31 Dec 2008 07:27:00 +0000</pubDate><atom:updated>2008-12-31T01:04:29.124-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tools</category><title>Robocopy error: ERROR 5 (0x00000005) Changing File Attributes</title><description>I use robocopy to backup my files to a network drive with the following command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;robocopy [source folder] [target folder] /MIR&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The MIR option will create the target folder as a mirror of the source folder. The command above works pretty well when both source and target folder are NTFS file systems.&lt;br /&gt;&lt;br /&gt;When I changed the target folder to my &lt;a href="http://www.dlink.com/products/?pid=509"&gt;DNS-323&lt;/a&gt; network storage, which uses a Linux file system (ext2/ext3), I started getting the following errors with the command above:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Although some files are virtually identical in both content and timestamp, robocopy still thinks they are different and show them as "Newer". So, whenever you run the command above, robocopy will always copy these files even if they did not change (not good for incremental backups!).&lt;br /&gt;&lt;/li&gt;&lt;li&gt;"ERROR 5 (0x00000005) Changing File Attributes ... Access is denied".&lt;/li&gt;&lt;/ul&gt;For the first error, you need to use the &lt;span style="font-weight: bold;"&gt;/FFT&lt;/span&gt; flag to assume FAT file times (2 second granularity). Although the target folder is ext2/ext3, these file systems also implement file times with 2 second granularity.&lt;br /&gt;&lt;br /&gt;For the second error (ERROR 5), you need to turn off the attribute copying. Robocopy uses the /COPY:DAT by default, which means to copy data, attributes and timestamp. You should turn off attribute copying by explicit setting &lt;span style="font-weight: bold;"&gt;/COPY:DT&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;So, the command to backup from a NTFS partition to a ext2/ext3 partition should be:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;robocopy [source folder] [target folder] /MIR /COPY:DT /FFT&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-4832077399083701884?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/ndaQou-XJQc/robocopy-error-error-5-0x00000005.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">15</thr:total><feedburner:origLink>http://www.luisrocha.net/2008/12/robocopy-error-error-5-0x00000005.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-6377016940366114360</guid><pubDate>Tue, 30 Dec 2008 01:30:00 +0000</pubDate><atom:updated>2008-12-29T19:59:32.420-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tools</category><category domain="http://www.blogger.com/atom/ns#">Database</category><category domain="http://www.blogger.com/atom/ns#">SQL Server</category><title>Upgrading to SQL Server 2008 Express and Management Studio Express 2008</title><description>In my developer machine, I have Visual Studio 2008 Professional which comes with SQL Server Express 2005. I decided to upgrade to SQL Server Express 2008 and also use the new Management Studio Express 2008.&lt;br /&gt;&lt;br /&gt;For the 2005 versions, we have two separate installers: one for SQL Express and another one for Management Studio Express. For the 2008 version, these products are deployed in the same installer: &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=7522a683-4cb2-454e-b908-e805e9bd4e28&amp;amp;DisplayLang=en"&gt;Microsoft SQL Server 2008 Express with Tools&lt;/a&gt;. Lots of people are complaining that they cannot get the Management Studio installed (see discussion &lt;a href="http://msdn.microsoft.com/en-us/library/ms365247.aspx"&gt;here&lt;/a&gt;), but the trick is to &lt;span style="font-weight: bold;"&gt;run the installer twice&lt;/span&gt;: first run to upgrade to SQL Express 2008, and the second run to add features to the current installation (Management Tools - Basic).  The main steps of this installation are:&lt;br /&gt;&lt;br /&gt;1. Download the installer from &lt;a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=7522a683-4cb2-454e-b908-e805e9bd4e28&amp;amp;DisplayLang=en"&gt;Microsoft SQL Server 2008 Express with Tools&lt;/a&gt; and run it.&lt;br /&gt;&lt;br /&gt;2. In the &lt;span style="font-weight: bold;"&gt;Installation&lt;/span&gt; screen, select &lt;span style="font-weight: bold;"&gt;Upgrade from SQL Server 2000 or SQL Server 2005&lt;/span&gt;, and just follow the next screens. During the upgrade, it is not possible to select new features to be added (Management Tools), so you will have to run this installer again later to add the management tools.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://lh4.ggpht.com/_oKo6zFhdD98/SVmBoODSM9I/AAAAAAAAALM/IyeEQdPfNls/s800/SQLServer2008WithTools1.png" /&gt;&lt;br /&gt;&lt;br /&gt;3. After the installation is completed, close the &lt;span style="font-weight: bold;"&gt;SQL Server Installation Center&lt;/span&gt; if it is still open. Then run again the same installer that you downloaded on step 1, in my case SQLEXPRWT_x86_ENU.exe.&lt;br /&gt;&lt;br /&gt;4. In the &lt;span style="font-weight: bold;"&gt;Installation&lt;/span&gt; screen, select &lt;span style="font-weight: bold;"&gt;New SQL Server stand-alonegrade from SQL Server 2000 or SQL Server 2005&lt;/span&gt;, and just follow the next screens.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://lh6.ggpht.com/_oKo6zFhdD98/SVmBoLioZAI/AAAAAAAAALU/gdY8Cb6v9Xw/s800/SQLServer2008WithTools2.png" /&gt;&lt;br /&gt;&lt;br /&gt;5. In the &lt;span style="font-weight: bold;"&gt;SQL Server 2008 Setup&lt;/span&gt; - &lt;span style="font-weight: bold;"&gt;Installation Type&lt;/span&gt; screen, select &lt;span style="font-weight: bold;"&gt;Add features to an existing instance of SQL Server 2008&lt;/span&gt;, and click on Next.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://lh5.ggpht.com/_oKo6zFhdD98/SVmF0XMCCjI/AAAAAAAAALc/d7ab0JTXidM/SQLServer2008WithTools3.png" /&gt;&lt;br /&gt;&lt;br /&gt;6. In the &lt;span style="font-weight: bold;"&gt;SQL Server 2008 Setup&lt;/span&gt; - &lt;span style="font-weight: bold;"&gt;Feature Selection &lt;/span&gt;screen, select &lt;span style="font-weight: bold;"&gt;Management Tools - Basic&lt;/span&gt;, and click on Next, and just follow all the remaining screens.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://lh3.ggpht.com/_oKo6zFhdD98/SVmF0u0708I/AAAAAAAAALk/ywb_7OYIF6s/SQLServer2008WithTools4.png" /&gt;&lt;br /&gt;&lt;br /&gt;When installation finishes, you will be able to access &lt;span style="font-weight: bold;"&gt;Microsoft SQL Server Management Studio&lt;/span&gt; from &lt;span style="font-weight: bold;"&gt;Start&lt;/span&gt;/&lt;span style="font-weight: bold;"&gt;Programs&lt;/span&gt;/&lt;span style="font-weight: bold;"&gt;Microsoft SQL Server 2008&lt;/span&gt; menu, or by just running &lt;span style="font-weight: bold;"&gt;ssms.exe&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;During the installation, the Setup Support Rules screen showed all the time. I understand their concern to verify that we meet all the installation requirements, but they should show this screen only if we fail in meeting some requirements, otherwise it becomes annoying.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-6377016940366114360?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/zxKiSmb--GU/upgrading-to-sql-server-2008-express.html</link><author>noreply@blogger.com (Luis Rocha)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh4.ggpht.com/_oKo6zFhdD98/SVmBoODSM9I/AAAAAAAAALM/IyeEQdPfNls/s72-c/SQLServer2008WithTools1.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2008/12/upgrading-to-sql-server-2008-express.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-6275143275568011893</guid><pubDate>Tue, 23 Dec 2008 08:32:00 +0000</pubDate><atom:updated>2008-12-23T13:24:54.593-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Repository Factory</category><category domain="http://www.blogger.com/atom/ns#">Tools</category><category domain="http://www.blogger.com/atom/ns#">Subversion</category><title>Team Foundation Server Power Tools</title><description>I work on some open source projects in Codeplex (&lt;a href="http://www.codeplex.com/RepositoryFactory"&gt;Repository Factory&lt;/a&gt; and &lt;a href="http://www.codeplex.com/ChinookDatabase"&gt;Chinook Database&lt;/a&gt;) and I've been using Visual Studio Team Explorer to access the source code repository in their Team Foundation Server.&lt;br /&gt;&lt;br /&gt;Although TortoiseSVN is my favorite client, and I could use it through &lt;a href="http://www.luisrocha.net/2008/10/using-tortoisesvn-with-codeplex.html"&gt;SVNBridge&lt;/a&gt;, I am still insisting in using VS Team Explorer just to get used to a different tool. One of the things I miss on it is the ability to undo files that were not changed. Perforce, another source code control that I used for many years, has this feature to undo unchanged files. This feature is important so that you only check in files that you modify, thus avoiding having unchanged files in your change list that would waste time of your reviewers!! If it is a small change set, it is not a big deal to manually undo them. When I was converting some projects from VS 2005 to 2008, I had to open for edit all files before initiating the conversion, otherwise it would fail. Most of the files did not change, and it became impractical to manually undo them due to the large number of files involved.&lt;br /&gt;&lt;br /&gt;After a few searches, I found &lt;a href="http://msdn.microsoft.com/en-ca/tfs2008/bb980963.aspx"&gt;Team Foundation Server Power Tools&lt;/a&gt; which consists of a set of enhancements, tools and command-line utilities that improve the Team Foundation Server user experience. It requires you to have &lt;a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx"&gt;Windows PowerShell&lt;/a&gt; installed. One of the tools included is the command line utility &lt;span style="font-weight: bold;"&gt;tfpt.exe&lt;/span&gt; which provides the following commands:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://lh3.ggpht.com/_oKo6zFhdD98/SVFEgTCUavI/AAAAAAAAAKk/hX0em3B_QBU/s800/tfpt.png" /&gt;&lt;br /&gt;&lt;br /&gt;In order to undo unchanged files in your workspace, you need to use the following command:&lt;br /&gt;&lt;pre&gt;   tfpt uu&lt;/pre&gt;This command will list all unchanged files and then prompt you if you really want to undo them. It worked really well for me and saved me lots of time!&lt;br /&gt;&lt;br /&gt;Besides the tfpt.exe command line tool, Team Foundation Power Tools also includes:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;TFS Best Practices Analyzer&lt;/li&gt;&lt;li&gt;Process Template Editor&lt;/li&gt;&lt;li&gt;Work Item Templates&lt;/li&gt;&lt;li&gt;Custom check-in policies&lt;/li&gt;&lt;li&gt;TFS Server Manager&lt;/li&gt;&lt;li&gt;TFS Users tool&lt;/li&gt;&lt;li&gt;Alert Editor&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-6275143275568011893?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/pLwh2PxPl9g/team-foundation-server-power-tools.html</link><author>noreply@blogger.com (Luis Rocha)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/_oKo6zFhdD98/SVFEgTCUavI/AAAAAAAAAKk/hX0em3B_QBU/s72-c/tfpt.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2008/12/team-foundation-server-power-tools.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-14118222168149792</guid><pubDate>Tue, 16 Dec 2008 21:40:00 +0000</pubDate><atom:updated>2008-12-16T14:46:41.723-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Patterns</category><title>patterns &amp; practices Application Architecture Guide 2.0 - Community Technology Preview (CTP)</title><description>&lt;div class="entry-body"&gt;&lt;div&gt;&lt;div class="item-body"&gt;&lt;div&gt;The Patterns and Practices team just released the Community Technology Preview (CTP) of &lt;a href="http://www.codeplex.com/AppArchGuide/Release/ProjectReleases.aspx?ReleaseId=20586"&gt;Application Architecture Guide 2.0&lt;/a&gt;. This guide provides design-level guidance for the architecture and design of applications built on the .NET Framework. This is a CTP, and the release of this guidance in the MSDN Library is currently scheduled for February 2009.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-14118222168149792?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/eDiMstN7vwM/patterns-practices-application.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2008/12/patterns-practices-application.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-9049014928530965070</guid><pubDate>Mon, 08 Dec 2008 18:59:00 +0000</pubDate><atom:updated>2008-12-08T12:15:54.422-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">VMware</category><category domain="http://www.blogger.com/atom/ns#">Ubuntu</category><title>Home, PageUp, PageDown and arrow keys not working inside VMware virtual machine</title><description>When running my Windows XP Pro 32-bit virtual machine on my Ubuntu 8.10 64-bit host, several keys are not working properly, including: Home, PageUp, PageDown, End, arrow keys, etc.&lt;br /&gt;&lt;br /&gt;This virtual machine works fine when the host is Windows Vista 32-bit. This looks like a common issue when running vmware on Ubuntu 8.10. Thanks to this &lt;a href="http://communities.vmware.com/thread/177321"&gt;post&lt;/a&gt; which provided a simple solution for this annoying problem. In your Ubuntu host, edit the file&lt;span style="font-style: italic;"&gt; /etc/vmware/config&lt;/span&gt;, and add the following line:&lt;br /&gt;&lt;pre&gt;xkeymap.nokeycodeMap = true&lt;br /&gt;&lt;/pre&gt;This worked out for me! For more info see the original &lt;a href="http://communities.vmware.com/thread/177321"&gt;post&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-9049014928530965070?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/BNDDZOIaqd8/home-pageup-pagedown-and-arrow-keys-not.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">2</thr:total><feedburner:origLink>http://www.luisrocha.net/2008/12/home-pageup-pagedown-and-arrow-keys-not.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-5392086076070295409</guid><pubDate>Thu, 20 Nov 2008 03:10:00 +0000</pubDate><atom:updated>2008-11-19T20:24:58.071-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Certification</category><title>Beta Exam 71-505: TS: Microsoft .NET Framework 3.5, Windows Forms Application Development</title><description>As mentioned on this &lt;a href="http://www.luisrocha.net/2008/11/mcpd-net-35-beta-exams.html"&gt;post&lt;/a&gt;, some exams of the Microsoft Certified Professional Developer certification, aka &lt;a href="http://www.microsoft.com/learning/mcp/mcpd/default.mspx"&gt;MCPD for .NET 3.5&lt;/a&gt;, are on beta. The new Windows Form exam (&lt;a href="http://www.microsoft.com/learning/en/us/exams/70-505.aspx"&gt;70-505&lt;/a&gt;) will have a beta version available for registration as of 11/21/2008. See the information at:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://blogs.technet.com/betaexams/archive/2008/11/19/register-for-beta-exam-71-505-ts-microsoft-net-framework-3-5-windows-forms-application-development.aspx"&gt;Beta Exam 71-505: TS: Microsoft .NET Framework 3.5, Windows Forms Application Development&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;You can register for this beta exam for &lt;span style="font-weight: bold;"&gt;free&lt;/span&gt; (normal cost is 125 USD), and if you pass on it, the exam credit will be added to your transcript and you will not need to take the exam in its released form.&lt;br /&gt;&lt;br /&gt;So hurry up, because seats are limited. First-come, first-serve!&lt;br /&gt;&lt;br /&gt;For more information about beta certification exams, see &lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;a href="http://blogs.technet.com/betaexams/default.aspx"&gt;Beta Exams Announcements Blog&lt;/a&gt;, and also &lt;a href="http://blogs.msdn.com/gerryo/default.aspx"&gt;Gerry O'Brien Blog&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-5392086076070295409?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/sU5WjlpbyOM/beta-exam-71-505-ts-microsoft-net.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2008/11/beta-exam-71-505-ts-microsoft-net.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-8422705929995542464</guid><pubDate>Sun, 16 Nov 2008 22:58:00 +0000</pubDate><atom:updated>2008-11-16T17:13:40.205-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">VMware</category><title>Shrinking the Capacity of a VMware Virtual Disk</title><description>I've being using my VMware images with virtual disks that allocate the space as needed, e.g. growable disks. VMware says that if you allocate the full capacity of the virtual disk, you will enhance the performance of your virtual machine. Since I have lots of space on my HD, I decided to convert my virtual disks from growable to preallocated type to enhance virtual machine performance. To do that, you just need to use the vmware-vdiskmanager.exe tool, for example:&lt;br /&gt;&lt;pre&gt;vmware-vdiskmanager -r old_disk.vmdk -t 2 new_disk.vmdk&lt;/pre&gt;It is pretty simple, but I also want to reduce the virtual disk capacity at the same time. The original capacity was 40 GiB, and I would like to reduce it to 28 GiB. It turns out that this is not something you can do with a simple command line. I thought I could just add the &lt;span style="font-style: italic;"&gt;-s &lt;size&gt;&lt;/size&gt;&lt;/span&gt; option to the command above, but this option is not valid with the convert option (-r), only when creating a new virtual disk.&lt;br /&gt;&lt;br /&gt;I thought about using the shrink option (-k), but this option is not to shrink the virtual disk capacity, it is only for reducing the size of the vmdk file itself that was created with the growable option. The virtual disk capacity stays the same. If you actually want to reduce the capacity of your virtual disk, then you will need to:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Create a new virtual disk with the desirable capacity. You can do this by either using VMware Server or Workstation GUI or using the vmware-vdiskmanager tool. For example, in my case:&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;      vmware-vdiskmanager -c -t 2 -s 28GB -a ide new_disk.vmdk&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Add your new virtual disk to your virtual machine. In VMware Server, you click on &lt;span style="font-style: italic;"&gt;Virtual Machine Settings&lt;/span&gt;, select &lt;span style="font-style: italic;"&gt;Hard Disk&lt;/span&gt;, and then click on &lt;span style="font-style: italic;"&gt;Add&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Shrink the logical partition of your existing virtual disk to fit on the new virtual disk. You can use GParted for this as described &lt;a href="http://www.howtogeek.com/howto/windows-vista/using-gparted-to-resize-your-windows-vista-partition/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Copy your logical partition from the original to the new virtual disk. You can also use GParted for this as described &lt;a href="http://gparted.sourceforge.net/larry/move/move.htm"&gt;here&lt;/a&gt;. If you are copying a boot partition, then it will require you an additional step. After you copied the logical partition to the new disk, you will need to add the boot flag to it. To do that, just right click on the partition, select &lt;span style="font-style: italic;"&gt;Manage Flags&lt;/span&gt;, then check the &lt;span style="font-style: italic;"&gt;boot &lt;/span&gt;option as shown below.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;table style="width: auto;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;a href="http://picasaweb.google.ca/lh/photo/-Z-QsHGsq4-ZXqmoniQIrw?authkey=sTu_kxOYYt8"&gt;&lt;img src="http://lh6.ggpht.com/_oKo6zFhdD98/SSCz9dykKEI/AAAAAAAAAKY/QAS34-7oWFo/s800/gparted_boot_flag.png" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;Although shrinking the capacity of a virtual disk involves lots of work, to expand the capacity is way simpler. You just need to use the expand option (-x) of the vmware-vdiskmanager tool, and it will add extra non formatted space to your virtual disk.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-8422705929995542464?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/2tR6gueTcJg/shrinking-capacity-of-vmware-virtual.html</link><author>noreply@blogger.com (Luis Rocha)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh6.ggpht.com/_oKo6zFhdD98/SSCz9dykKEI/AAAAAAAAAKY/QAS34-7oWFo/s72-c/gparted_boot_flag.png" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2008/11/shrinking-capacity-of-vmware-virtual.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-9567658.post-7494307476241857432</guid><pubDate>Wed, 12 Nov 2008 07:00:00 +0000</pubDate><atom:updated>2008-11-11T23:54:22.317-07:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Security</category><title>Microsoft SDL Threat Modeling Tool</title><description>&lt;p&gt;Microsoft announced the new SDL Threat Modeling Tool during the &lt;a href="http://www.microsoft.com/emea/teched2008/developer/default.aspx"&gt;Tech-Ed EMEA 2008&lt;/a&gt;. The &lt;a href="http://msdn.microsoft.com/en-us/security/cc448177.aspx"&gt;Security Development Lifecycle (SDL)&lt;/a&gt; is a Microsoft methodology which consists of a series of best practices for software developers and architects to evaluate and consider security issues when designing a product.&lt;/p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/security/dd206731.aspx"&gt;Microsoft SDL Threat Modeling Tool&lt;/a&gt; is part of the design phase of the SDL and allows software architects to identify and mitigate potential security issues early, when they are relatively easy and cost-effective to solve. With this tool, architects can communicate about the security design of their systems, analyze those designs for potential security issues and suggest and manage mitigations for security issues.&lt;br /&gt;&lt;br /&gt;See a demo of the &lt;a id="ctl00_mainContentContainer_ctl02" onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl02',this);" href="http://download.microsoft.com/download/1/5/0/150636A9-9EA8-4D00-9E6B-2723F4C188B4/Microsoft%20SDL%20Threat%20Modeling%20Tool.wmv"&gt;SDL Threat Modeling Tool v3&lt;/a&gt; or download it from &lt;a id="ctl00_mainContentContainer_ctl03" onclick="javascript:Track('ctl00_mainContentContainer_ctl00|ctl00_mainContentContainer_ctl03',this);" href="http://download.microsoft.com/download/E/5/3/E5318D25-7AEF-4A66-A147-81BBA727F2C1/SDLTM.msi"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Also, if you will be attending &lt;a href="http://www.edmontoncodecamp.com/"&gt;Edmonton Code Camp 2008&lt;/a&gt; at the end of this month, &lt;a href="http://haveyougotwoods.com/"&gt;David Woods&lt;/a&gt; will be doing a talk on Threat Modeling.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9567658-7494307476241857432?l=www.luisrocha.net'/&gt;&lt;/div&gt;</description><link>http://feedproxy.google.com/~r/LuisRocha/~3/YEmpHDvZNlQ/microsoft-sdl-threat-modeling-tool.html</link><author>noreply@blogger.com (Luis Rocha)</author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.luisrocha.net/2008/11/microsoft-sdl-threat-modeling-tool.html</feedburner:origLink></item></channel></rss>
