<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/">
    <channel>
        <title>Tim Huffam</title>
        <link>http://geekswithblogs.net/TimH/Default.aspx</link>
        <description>Dotting the I and crossing the T of I.T.</description>
        <language>en-NZ</language>
        <copyright>Tim Huffam</copyright>
        <managingEditor>timhuffam@gmail.com</managingEditor>
        <generator>Subtext Version 0.0.0.0</generator>
        <image>
            <title>Tim Huffam</title>
            <url>http://geekswithblogs.net/images/RSS2Image.gif</url>
            <link>http://geekswithblogs.net/TimH/Default.aspx</link>
            <width>77</width>
            <height>60</height>
        </image>
        <item>
            <title>How to change the endpoint url of services that Silverlight clients use.</title>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Web Development, JavaScript &amp; CSS</category>
            <category>WPF &amp; Silverlight</category>
            <link>http://geekswithblogs.net/TimH/archive/2012/01/08/how-to-change-the-endpoint-url-of-services-that-silverlight.aspx</link>
            <description>&lt;p&gt;If your Silverlight app references services, the endpoints to these services are stored within a config file within the xap bundle - which is usually deployed as .xap file within the ClientBin dir of your web app.&lt;/p&gt;
&lt;p&gt;To change the end point urls:&lt;br /&gt;1) Rename the xap file (eg within E:\Demos\MySilverlightApp.Web\ClientBin) to .zip.  &lt;br /&gt;2) Unzip it &lt;br /&gt;3) Edit the ServiceReferences.ClientConfig file (to update the endpoint url) and save it.&lt;br /&gt;4) Recreate the zip file&lt;br /&gt;5) Rename the .zip file as .xap&lt;/p&gt;
&lt;p&gt;That's it.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/148286.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2012/01/08/how-to-change-the-endpoint-url-of-services-that-silverlight.aspx</guid>
            <pubDate>Mon, 09 Jan 2012 02:17:26 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/148286.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2012/01/08/how-to-change-the-endpoint-url-of-services-that-silverlight.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/148286.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/148286.aspx</trackback:ping>
        </item>
        <item>
            <title>Removing source control from a TFS project</title>
            <category>C# .NET</category>
            <category>Dev Env, TFS, MSBuild etc</category>
            <link>http://geekswithblogs.net/TimH/archive/2011/07/06/removing-source-control-from-a-tfs-project.aspx</link>
            <description>&lt;p&gt;To remove all source control from a TFS project (not a VS project!) - you must use the 'tf destroy' tool. &lt;/p&gt;
&lt;p&gt;If, like me you try to delete the top-level directory/project node in Source Control Explorer (within VS), then you'll likely get the following error:&lt;/p&gt;
&lt;pre&gt;&lt;span style="font-size: smaller"&gt;TF10169: Unsupported pending change attempted on team project folder $/MyProject.  Use the Project Creation Wizard in Team Explorer to create a project or the Team Project deletion tool to delete one.&lt;/span&gt;&lt;/pre&gt;
&lt;p&gt;So, this (removing source control) is useful if you have a TFS project created just for project management assets eg Work Items, Sprints, PBI's etc.&lt;/p&gt;
&lt;p&gt;Use the following syntax:&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri"&gt;&lt;font color="#0000ff"&gt;&lt;span class="510000401-07072011"&gt;  tf destroy $/&amp;lt;project name&amp;gt; /s:&amp;lt;server name&amp;gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri"&gt;&lt;font color="#0000ff"&gt;&lt;span class="510000401-07072011"&gt;
&lt;p&gt;&lt;font face="Calibri"&gt;&lt;font color="#0000ff"&gt;&lt;span class="510000401-07072011"&gt;&lt;font color="#000000"&gt;  eg:  &lt;br /&gt;
&lt;/font&gt;  tf destroy $/MyProject /s:mytfsserver.mydomain.com&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000" size="3"&gt;&lt;span class="510000401-07072011"&gt;
&lt;p&gt;The tf.exe tool is within the &amp;lt;&lt;span class="510000401-07072011"&gt;&lt;font face="Calibri"&gt;Program Files&amp;gt;\Microsoft Visual Studio 9.0\VC&lt;/font&gt;&lt;/span&gt; dir.&lt;/p&gt;
&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000" size="3"&gt;&lt;span class="510000401-07072011"&gt;Note that this will remove the project from the Source Control Explorer - but the TFS project still exists - you can see it in Team Explorer and/or TFS Web Access.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/146114.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2011/07/06/removing-source-control-from-a-tfs-project.aspx</guid>
            <pubDate>Thu, 07 Jul 2011 03:07:08 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/146114.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2011/07/06/removing-source-control-from-a-tfs-project.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/146114.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/146114.aspx</trackback:ping>
        </item>
        <item>
            <title>Conscience and subconscience from an AI/Robotics POV</title>
            <category>Off Topic</category>
            <category>AI &amp; Robotics</category>
            <link>http://geekswithblogs.net/TimH/archive/2011/03/09/conscience-and-unconscience-from-an-airobotics-pov.aspx</link>
            <description>&lt;div dir="ltr" align="left"&gt;&lt;span class="799333902-10032011"&gt;&lt;font face="Calibri" color="#0000ff"&gt;Just pondering the workings of the human mind - from an AI/robotics point of view (either of which I know little about)..&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt; &lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;&lt;span class="799333902-10032011"&gt;&lt;font face="Calibri" color="#0000ff"&gt;If conscience is when you're thinking about it (processing it in realtime)... and subconscience is when you're not thinking about it (eg it's autonomous behaviour)..  would it be fair to say then, that:&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;&lt;span class="799333902-10032011"&gt;&lt;font face="Calibri" color="#0000ff"&gt;  - conscience could be likened to (or implemented as) software (as it requires a processor at runtime)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;&lt;span class="799333902-10032011"&gt;&lt;font face="Calibri" color="#0000ff"&gt;  - subconscience could be likened to (or implemented as) hardware (as it does not require a processor at runtime)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;
&lt;div dir="ltr" align="left"&gt; &lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;&lt;span class="799333902-10032011"&gt;&lt;font face="Calibri" color="#0000ff"&gt;Considering that human learning is attributed to the number of neural connections made - and repetition is the key - the more the connections, the better one understands the subject - until it becomes a 'known'.&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div dir="ltr" align="left"&gt; &lt;/div&gt;
&lt;div dir="ltr" align="left"&gt;&lt;span class="799333902-10032011"&gt;&lt;font face="Calibri" color="#0000ff"&gt;Therefore could this be likened to forming hard (wired) connections?  Eg maybe learning would progress from an MCU to FPGA's - therefore offloading realtime process to the hardware (FPGA or some such device)?&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;t&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/144284.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2011/03/09/conscience-and-unconscience-from-an-airobotics-pov.aspx</guid>
            <pubDate>Thu, 10 Mar 2011 03:00:35 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/144284.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2011/03/09/conscience-and-unconscience-from-an-airobotics-pov.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/144284.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/144284.aspx</trackback:ping>
        </item>
        <item>
            <title>TFS 2008 error: MSB4131: The "Reason" parameter is not supported by the "GetBuildProperties" task.</title>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Dev Env, TFS, MSBuild etc</category>
            <link>http://geekswithblogs.net/TimH/archive/2011/02/03/tfs-2008-error-msb4131-the-reason-parameter-is-not-supported.aspx</link>
            <description>&lt;p&gt;This error occured on our TFS2008 (RTM) build server after installing VS2010.&lt;/p&gt;
&lt;p&gt;This is caused because VS2010 updates the MSBuild targets file Microsoft.TeamFoundation.Build.targets but not the &lt;span class="Apple-style-span" style="word-spacing: 0px; font: 16px 'Times New Roman'; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px; webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; color: rgb(51,51,51); line-height: 16px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; text-align: left"&gt;Microsoft.TeamFoundation.Build.Tasks.dll file (which preforms the tasks mentioned in the targets file).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="Apple-style-span" style="word-spacing: 0px; font: 16px 'Times New Roman'; text-transform: none; color: rgb(0,0,0); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px; webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px"&gt;&lt;span class="Apple-style-span" style="font-size: 13px; color: rgb(51,51,51); line-height: 16px; font-family: 'Segoe UI', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif; text-align: left"&gt;To resolve you need to update TFS (build) server with SP1.  See &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/tfsbuild/thread/f370c977-d455-4263-a054-f556352f954a"&gt;this article&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/143784.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2011/02/03/tfs-2008-error-msb4131-the-reason-parameter-is-not-supported.aspx</guid>
            <pubDate>Thu, 03 Feb 2011 23:22:32 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/143784.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2011/02/03/tfs-2008-error-msb4131-the-reason-parameter-is-not-supported.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/143784.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/143784.aspx</trackback:ping>
        </item>
        <item>
            <title>Error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the &lt;Import&gt; declaration is correct, and that the file exists on disk</title>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Web Development, JavaScript &amp; CSS</category>
            <category>Dev Env, TFS, MSBuild etc</category>
            <link>http://geekswithblogs.net/TimH/archive/2010/12/08/tset.aspx</link>
            <description>&lt;p&gt;This error occurred on our TFS2008 build server which we had upgraded to cater for VS2010 projects (by installing VS2010 on the build server - see &lt;a href="http://www.richard-banks.org/2009/11/how-to-build-vs2010-solutions-using.html"&gt;this article&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;Error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the &amp;lt;Import&amp;gt; declaration is correct, and that the file exists on disk.&lt;/p&gt;
&lt;p&gt;However - although we had installed VS2010 on the build server - we had not installed the web development components (Visual Web Developer) - this is what caused the error.&lt;/p&gt;
&lt;p&gt;To fix - simply add the web development components:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Go into Control Panel - Add or Remove Programs&lt;/li&gt;
    &lt;li&gt;Select Microsoft Visual Studio 2010, and click on Change/Remove&lt;/li&gt;
    &lt;li&gt;In the VS Maintenance Mode screens, select Add or Remove Features&lt;/li&gt;
    &lt;li&gt;In the Setup - Options page make sure 'Visual Web Developer' is checked.&lt;/li&gt;
    &lt;li&gt;Click on Update.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;You shouldn't need to restart your build service.&lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;br /&gt;
 &lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/143055.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2010/12/08/tset.aspx</guid>
            <pubDate>Wed, 08 Dec 2010 19:46:27 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/143055.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2010/12/08/tset.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/143055.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/143055.aspx</trackback:ping>
        </item>
        <item>
            <title>Creating mulitple TFS Build services on the same server - one for VS2008 projects and one for VS2010 projects</title>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Web Development, JavaScript &amp; CSS</category>
            <category>Unit Testing</category>
            <category>Dev Env, TFS, MSBuild etc</category>
            <category>WPF &amp; Silverlight</category>
            <link>http://geekswithblogs.net/TimH/archive/2010/12/01/creating-mulitple-tfs-build-services-on-the-same-server.aspx</link>
            <description>&lt;p&gt;This is for TFS2008.&lt;/p&gt;
&lt;p&gt;This is based mainly on this article: &lt;a href="http://blogs.msdn.com/b/jpricket/archive/2007/08/03/tfs-2008-running-two-build-agents-on-the-same-machine.aspx"&gt;http://blogs.msdn.com/b/jpricket/archive/2007/08/03/tfs-2008-running-two-build-agents-on-the-same-machine.aspx&lt;/a&gt;&lt;br /&gt;
But also had input from these:&lt;br /&gt;
&lt;a href="http://www.woodwardweb.com/vsts/000398.html"&gt;http://www.woodwardweb.com/vsts/000398.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://blogs.msdn.com/b/buckh/archive/2007/08/14/tfs-2008-a-basic-guide-to-team-build-2008.aspx"&gt;http://blogs.msdn.com/b/buckh/archive/2007/08/14/tfs-2008-a-basic-guide-to-team-build-2008.aspx&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://blogs.msdn.com/b/jimlamb/archive/2010/04/13/configuring-multiple-tfs-build-services-on-one-machine.aspx"&gt;http://blogs.msdn.com/b/jimlamb/archive/2010/04/13/configuring-multiple-tfs-build-services-on-one-machine.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Also the following article discussing upgrading a TFS2008 build server to cater for VS2010 projects: &lt;a href="http://www.richard-banks.org/2009/11/how-to-build-vs2010-solutions-using.html"&gt;http://www.richard-banks.org/2009/11/how-to-build-vs2010-solutions-using.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Scenario:  &lt;br /&gt;
---------&lt;br /&gt;
We want to use the existing build service the way it is - for VS2008 projects.&lt;br /&gt;
We will create a new build service, on the same machine but using another port -  for building VS2010/.Net 4.0 projects. &lt;br /&gt;
**For this we must have first installed VS2010 on the build server! (see article mentioned above).&lt;/p&gt;
&lt;p&gt;The reason we're creating another service is that we found certain VS2008 projects would not build using MSBuild 4.0 (intended for VS2010 - but supposedly catering also for VS2008).  The main problem area was unit tests and the private accessor's VS generates (to provide access to private/internal members of a class being tested).  The following link provides a work around, but we found this just opened up more problems - and in the end decided that the multi-service solution would get us up and running quickest: &lt;a href="http://blogs.msdn.com/b/adamroot/archive/2009/12/10/building-vs-2008-unit-test-projects-in-msbuild-4-0-beta-2.aspx"&gt;http://blogs.msdn.com/b/adamroot/archive/2009/12/10/building-vs-2008-unit-test-projects-in-msbuild-4-0-beta-2.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
&lt;span style="font-size: small"&gt;&lt;span style="font-family: Courier New"&gt;&lt;tt&gt;To create the 2nd build service (VS2010/.Net 4.0 projects):&lt;br /&gt;
-----------------------------------------------------------&lt;br /&gt;
1) Copy build service executable and config file (tfsbuildservice.exe &amp;amp; tfsbuildservice.exe.config) giving them another name &lt;br /&gt;
   (eg tfsbuildservice_2.exe &amp;amp; tfsbuildservice_2.exe.config).&lt;br /&gt;
   They are located within the following directory:&lt;br /&gt;
   &amp;lt;Program Files&amp;gt;\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies&lt;/tt&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Courier New"&gt;&lt;tt&gt;2) Modify port setting.&lt;br /&gt;
   Edit the new config file (tfsbuildservice_2.exe.config) and update the following line with a new port number (eg 9193):&lt;br /&gt;
   &amp;lt;add key="port" value="9191" /&amp;gt;&lt;/tt&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Courier New"&gt;&lt;tt&gt;3) Make the new service use .Net 4.0 - by changing the MSBuildPath - so it references MSBuild 4 (for VS2010/.Net 4.0 projects).&lt;br /&gt;
   Change the following line in tfsbuildservice_2.exe.config from:&lt;br /&gt;
    &amp;lt;add key="MSBuildPath" value="" /&amp;gt;&lt;br /&gt;
   to&lt;br /&gt;
    &amp;lt;add key="MSBuildPath" value="C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319" /&amp;gt;&lt;/tt&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Courier New"&gt;&lt;tt&gt;4) Configure URL ACLs.  Do this by running the wcfhttpconfig.exe utility in the new directory using the following syntax:&lt;br /&gt;
  wcfhttpconfig reserve &amp;lt;domain&amp;gt;\&amp;lt;user name&amp;gt; &amp;lt;port number&amp;gt;&lt;br /&gt;
  *** You must run this command as a local administrator.&lt;/tt&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Courier New"&gt;&lt;tt&gt;5) Create the new windows service.&lt;br /&gt;
   Execute the following command at the command prompt - as an administrator.  Note the spaces after the equals signs.&lt;br /&gt;
   sc.exe create "VSTFBUILD_2" binpath= "D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\TFSBuildService_2.exe" DisplayName= "Visual Studio Team Foundation Build Service 2 (for VS2010 and .Net 4.0 projects)"  &lt;br /&gt;
  *** You must run this command as a local administrator.&lt;/tt&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small"&gt;&lt;span style="font-family: Courier New"&gt;&lt;tt&gt;6) Open the new service's properties and set the account and password to run as, then start it.  &lt;br /&gt;
   It would also pay to set this service's startup type to automatic.&lt;/tt&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;You will need to create new Build Agents to point to this new service.&lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/142959.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2010/12/01/creating-mulitple-tfs-build-services-on-the-same-server.aspx</guid>
            <pubDate>Thu, 02 Dec 2010 02:51:59 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/142959.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2010/12/01/creating-mulitple-tfs-build-services-on-the-same-server.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/142959.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/142959.aspx</trackback:ping>
        </item>
        <item>
            <title>Moving TFS warehouse from SQL Server Analysis Services 2005 to SQL Server 2008 </title>
            <category>C# .NET</category>
            <category>Dev Env, TFS, MSBuild etc</category>
            <link>http://geekswithblogs.net/TimH/archive/2010/11/04/moving-tfs-warehouse-from-sql-server-analysis-services-2005-to.aspx</link>
            <description>&lt;p&gt;Turns out you can't just move a TFS warehouse/cube from SQL Server 2005 to 2008...  &lt;/p&gt;
&lt;p&gt;Once performed we got the following error on the TFS app server tier  - when we tried to update/process the cube (both manually and via the TFS scheduler service):&lt;br /&gt;
&lt;span class="332490202-29102010"&gt;&lt;font face="Arial" color="#0000ff" size="2"&gt;Detailed Message: Failed to load adapter Microsoft.TeamFoundation.Warehouse.CommonStructureAdapter. Exception Info: \n Microsoft.TeamFoundation.Server.AnalysisServiceConnectionException: Error encountered when creating connection to Analysis Services. Contact your Team Foundation Server administrator. ---&amp;gt; Microsoft.AnalysisServices.ConnectionException: Cannot connect to Analysis Services version '10.0.1600.22'.&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The point worth noting here is the version number (10.0.1600.22) - this is the version of the updated Analysis Services server (on the SQL Server 2008 platform).  The problem was that our TFS app server did not have the client access software of the correct version.&lt;/p&gt;
&lt;p&gt;Assuming you've moved your cube already (using this article) - The following steps should fix the problem (all done on the TFS app server tier):&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Install the correct version of the Microsoft.AnalysisServices.dll assembly.   Download and install "Microsoft Analysis  Management Objects" from &lt;a href="http://www.microsoft.com/downloads/en/details.aspx?familyid=228de03f-3b5a-428a-923f-58a033d316e1&amp;amp;displaylang=en"&gt;here&lt;/a&gt;.&lt;/li&gt;
    &lt;li&gt;Update the following config files so that this line&lt;br /&gt;
    &lt;span style="color: #0000ff"&gt;&lt;tt&gt;&amp;lt;bindingRedirect oldVersion="9.0.242.0" newVersion="9.0.242.0"/&amp;gt;&lt;/tt&gt;&lt;br /&gt;
    &lt;/span&gt;looks like this:&lt;br /&gt;
    &lt;span style="color: #0000ff"&gt;&lt;tt&gt;&amp;lt;bindingRedirect oldVersion="9.0.242.0" newVersion="10.0.0.0"/&amp;gt;&lt;br /&gt;
    &lt;/tt&gt;&lt;/span&gt;Files to update:&lt;br /&gt;
    &lt;span style="font-size: x-small"&gt;&lt;tt&gt;&amp;lt;programfiles&amp;gt;\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\Warehouse\web.config&lt;/tt&gt;&lt;/span&gt;&lt;br /&gt;
    &lt;span style="font-size: x-small"&gt;&lt;tt&gt;&amp;lt;programfiles&amp;gt;\Microsoft Visual Studio 2008 Team Foundation Server\TFSServerSchedluer\TFSServerScheduler.exe.config&lt;/tt&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;Process the cube (this updates both the TFSWarehouse relational db and then the cube: &lt;br /&gt;
    - Log on to the TFS app server, then navigate your browser to &lt;a href="http://localhost:8080/Warehouse/v1.0/warehousecontroller.asmx"&gt;http://localhost:8080/Warehouse/v1.0/warehousecontroller.asmx&lt;/a&gt;, then click Run, then Invoke.&lt;br /&gt;
    - go back to the main warehousecontroller.asmx page and run GetWarehouseStatus - to monitor it's progress.&lt;br /&gt;
    - when it's complete (status of idle) check the event log for errors - should be none.&lt;/li&gt;
    &lt;li&gt;Run a report (via  &lt;a href="http://tfsappserver/reports"&gt;http://tfsappserver/reports&lt;/a&gt; url) to see if it contains updated data.&lt;/li&gt;
    &lt;li&gt;Restart the TFS Scheduler service.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note that if you're having problems - ie you're not seeing updated data in the reports, yet you're not seeing errors in the event log, then turn on verbose error logging (I think that's what this is/does) but updating the web.config file in this dir: &amp;lt;programfiles&amp;gt;\Microsoft Visual Studio 2008 Team Foundation Server\Web Services - changing this line&amp;lt;add name="General" value="1" /&amp;gt;  to value="4"&lt;/p&gt;
&lt;p&gt;Here's some useful links I found while trying to do all this work:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa721760(VS.90).aspx"&gt;How to move the analysis services db to another server&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://billwg.blogspot.com/2009/04/cant-synchronize-tfs-warehouse-after.html"&gt;Can't synchronize TFS warehouse afer upgrading to SQL server 2008&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://social.msdn.microsoft.com/Forums/en-US/sqlanalysisservices/thread/d9fbfbb4-f997-4519-894d-b101ce8a2350/"&gt;Which ADOMD.NET?&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; I have to say, TFS really is a b*tch to manage. &lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/142603.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2010/11/04/moving-tfs-warehouse-from-sql-server-analysis-services-2005-to.aspx</guid>
            <pubDate>Fri, 05 Nov 2010 03:42:23 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/142603.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2010/11/04/moving-tfs-warehouse-from-sql-server-analysis-services-2005-to.aspx#feedback</comments>
            <slash:comments>22</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/142603.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/142603.aspx</trackback:ping>
        </item>
        <item>
            <title>Upgrade TFS 2008 to be able to build VS2010 solutions/projects - need to delete workspaces</title>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Dev Env, TFS, MSBuild etc</category>
            <category>WPF &amp; Silverlight</category>
            <link>http://geekswithblogs.net/TimH/archive/2010/08/22/upgrade-tfs-2008-to-be-able-to-build-vs2010-solutionsprojects.aspx</link>
            <description>&lt;p&gt;After following steps in &lt;a href="http://www.richard-banks.org/2009/11/how-to-build-vs2010-solutions-using.html"&gt;this link&lt;/a&gt;, I found that my projects would still not build correctly. &lt;/p&gt;
&lt;p&gt;The error I got in the build was:&lt;/p&gt;
&lt;p&gt;"The path C:\Documents and Settings\myBuildServiceUser\Local Settings\Temp\myProject\Build1\Sources\WindowsFormsApplication1 is already mapped in workspace myBuildServerMachineName_16."&lt;/p&gt;
&lt;p&gt;To fix this problem you need to delete all workspaces on the build server (owned by the user account that the build service runs as) - these are named buildservername_nn where buildservername is your build server name and nn is a number it assigns as it generates them (upon the first time a build is run).  It appear that these old workspaces are incompatible with the MSBuild 4.0 engine - hence we delete them so it can re-create them upon next build.&lt;/p&gt;
&lt;p&gt;To get a list of all the workspaces on the build server use this command:&lt;/p&gt;
&lt;p&gt;tf.exe workspaces /owner:myTFSBuildServiceUser /server:myTFSServer /computer:myBuildServerMachineName&lt;/p&gt;
&lt;p&gt;tf.exe is run from the VS command prompt (TFS/VS2008 install dir: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE).&lt;/p&gt;
&lt;p&gt;or just run a build - to get the error message mentioned above - this will provide the problem workspace name (eg myBuildServerMachineName_16).&lt;/p&gt;
&lt;p&gt;The following command will delete a workspace:&lt;/p&gt;
&lt;p&gt;tf.exe workspace /delete /server:myTFSServer workspaceName;myBuildServerUser&lt;/p&gt;
&lt;p&gt;See &lt;a href="http://msmvps.com/blogs/vstsblog/archive/2007/08/30/how-to-remove-someone-else-s-workspace-in-tfs.aspx"&gt;this article&lt;/a&gt; for how to delete workspaces.&lt;/p&gt;
&lt;p&gt;Attrice's &lt;a href="http://www.attrice.info/downloads/"&gt;Team Foundation Sidekicks &lt;/a&gt;provides a nice GUI to both view and remove workspaces.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UPDATE 21 September 2010&lt;/strong&gt;:&lt;br /&gt;
Updated/re-written to correct a number of things.  &lt;/p&gt;
&lt;p&gt;If you get the following error:&lt;br /&gt;
"TF30076: The server name myTFSServer provided does not correspond to a server URI that can be found. Confirm that the server name is correct."&lt;br /&gt;
Then you will need to specify it's full URI eg: &lt;br /&gt;
tf.exe workspace /delete /server:&lt;a href="http://myTFSServer:8080"&gt;http://myTFSServer:8080&lt;/a&gt; myBuildServer_16;myBuildServerUser&lt;br /&gt;
See &lt;a href="http://blogs.msdn.com/b/granth/archive/2008/07/22/tf30076-confirm-that-the-server-name-is-correct.aspx"&gt;this article&lt;/a&gt; regarding this error.&lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/141437.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2010/08/22/upgrade-tfs-2008-to-be-able-to-build-vs2010-solutionsprojects.aspx</guid>
            <pubDate>Sun, 22 Aug 2010 22:51:06 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/141437.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2010/08/22/upgrade-tfs-2008-to-be-able-to-build-vs2010-solutionsprojects.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/141437.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/141437.aspx</trackback:ping>
        </item>
        <item>
            <title>VS2010 debugger catching AssertFailedException instead of running and failing tests</title>
            <category>BizTalk</category>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Unit Testing</category>
            <category>WPF &amp; Silverlight</category>
            <link>http://geekswithblogs.net/TimH/archive/2010/07/28/vs2010-debugger-catching-assertfailedexception-instead-of-running-and-failing-tests.aspx</link>
            <description>&lt;p&gt;When workig on a project in VS2010 and performing a "run tests in context" the debugger was catching and halting on a test that fails, raising the exception AssertFailedException.  I thought this was strange as the same test (in fact any test) that failed in VS2008 would simply just be noted in the test results as Failed...&lt;/p&gt;
&lt;p&gt;Turns out it's the way I've been running tests..&lt;/p&gt;
&lt;p&gt;Both VS2008 and VS2010 have the same shortcut mappings:&lt;br /&gt;
- "ctrl-r, t" for "Run tests in context"&lt;br /&gt;
- "ctrl-r, ctrl-t" for "Debug tests in context"&lt;/p&gt;
&lt;p&gt;I've always done "ctrl-r, ctrl-t" - holding down ctrl then pressing r, releasing r then pressing t (while still holding down ctrl) then t then releasing ctrl.  This is actually "ctrl-r, ctrl-t".. so should have been invoking "debug tests in context" - but in VS2008 it was not detecting that I was holding down the ctrl when pressing t.&lt;/p&gt;
&lt;p&gt;So, now that vs2010 is properly detecting the ctrl key, its running "debug tests in context" (as it should), hence I'm seeing the AssertFailedException being caught by the debugger instead of just failing the test.&lt;/p&gt;
&lt;p&gt;So the solution is for me to use the proper shortcut to "Run tests in context" which is": "ctrl-r, t" - hold down ctrl, press r, release r and release ctrl, then press t (by itself).&lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/141106.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2010/07/28/vs2010-debugger-catching-assertfailedexception-instead-of-running-and-failing-tests.aspx</guid>
            <pubDate>Thu, 29 Jul 2010 02:18:10 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/141106.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2010/07/28/vs2010-debugger-catching-assertfailedexception-instead-of-running-and-failing-tests.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/141106.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/141106.aspx</trackback:ping>
        </item>
        <item>
            <title>WPF 3D - programmatically adding an image brush</title>
            <category>C# .NET</category>
            <category>WPF &amp; Silverlight</category>
            <category>Graphics</category>
            <link>http://geekswithblogs.net/TimH/archive/2010/07/24/wpf-3d---programmatically-adding-an-image-brush.aspx</link>
            <description>&lt;p&gt;
&lt;/p&gt;&lt;p&gt; &lt;/p&gt;

&lt;div style="margin: 0px"&gt;&lt;font size="2"&gt;&lt;span style="font-size: 10pt"&gt;If you are programmatically assigning an image as a DiffuseMaterial to your 3D model, then you need to make sure that you have created TextureCoordinates. &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;font size="2"&gt;&lt;span style="font-size: 10pt"&gt;I was using some sample code that created a 3D object - and tried to change the brush from a color to an image.  The color worked fine, but the image never showed (it was invisible).  The reason was that the sample code only did mesh.Positions.Add() and mesh.TriangleIndicies.Add().  When I added the appropriate mesh.TextureCoordinates.Add() lines the image then showed.  eg:&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;&lt;font size="+0"&gt;&lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;MeshGeometry3D&lt;/span&gt;&lt;/font&gt; mesh = &lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;MeshGeometry3D&lt;/span&gt;&lt;/font&gt;();&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.Positions.Add(&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Point3D&lt;/span&gt;&lt;/font&gt;(1, 1, 1));&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.Positions.Add(&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Point3D&lt;/span&gt;&lt;/font&gt;(1, 1, -1));&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.Positions.Add(&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Point3D&lt;/span&gt;&lt;/font&gt;(-7, 1, -1));&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.Positions.Add(&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Point3D&lt;/span&gt;&lt;/font&gt;(-7, 1, 1));&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.TriangleIndices.Add(0);&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.TriangleIndices.Add(1);&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.TriangleIndices.Add(2);&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.TriangleIndices.Add(0);&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.TriangleIndices.Add(2);&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.TriangleIndices.Add(3);&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;&lt;font color="#008000"&gt;&lt;span style="color: green"&gt;// These are the lines you need to allow an image to be painted onto the 3d model&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.TextureCoordinates.Add(&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;ne&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-family: Courier New"&gt;&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;w&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Point&lt;/span&gt;&lt;/font&gt;(0, 0));&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.TextureCoordinates.Add(&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;ne&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-family: Courier New"&gt;&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;w&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Point&lt;/span&gt;&lt;/font&gt;(0, 1));&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.TextureCoordinates.Add(&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;ne&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-family: Courier New"&gt;&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;w&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Point&lt;/span&gt;&lt;/font&gt;(1, 1));&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;mesh.TextureCoordinates.Add(&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;ne&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-family: Courier New"&gt;&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;w&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Point&lt;/span&gt;&lt;/font&gt;(1, 0));&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;&lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;ImageBrush&lt;/span&gt;&lt;/font&gt; imgBrush = &lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;ImageBrush&lt;/span&gt;&lt;/font&gt;(&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;BitmapImage&lt;/span&gt;&lt;/font&gt;(&lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new &lt;/span&gt;&lt;/font&gt;&lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Uri&lt;/span&gt;&lt;/font&gt;(&lt;font color="#a31515"&gt;&lt;span style="color: rgb(163,21,21)"&gt;"pack://siteoforigin:,,,/&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#a31515"&gt;&lt;span style="color: rgb(163,21,21)"&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="font-family: Courier New"&gt;&lt;font color="#a31515"&gt;&lt;span style="color: rgb(163,21,21)"&gt;myimage.png"&lt;/span&gt;&lt;/font&gt;)));&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;&lt;font color="#008000"&gt;&lt;span style="color: green"&gt;//GeometryModel3D geometry = new GeometryModel3D(mesh, new DiffuseMaterial(Brushes.Green)&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;font color="#008000"&gt;&lt;span style="color: green"&gt;&lt;wbr&gt;&lt;/wbr&gt;&lt;/span&gt;&lt;span style="font-family: Courier New"&gt;&lt;span style="color: green"&gt;);  // this line works without the TextureCoordinates&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;&lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;GeometryModel3D&lt;/span&gt;&lt;/font&gt; geometry = &lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;GeometryModel3D&lt;/span&gt;&lt;/font&gt;(mesh, &lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt;&lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;DiffuseMaterial&lt;/span&gt;&lt;/font&gt;(imgBrush));&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;geometry.Transform = &lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Transform3DGroup&lt;/span&gt;&lt;/font&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;&lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Model3DGroup&lt;/span&gt;&lt;/font&gt; group = &lt;font color="#0000ff"&gt;&lt;span style="color: blue"&gt;new&lt;/span&gt;&lt;/font&gt; &lt;font color="#2b91af"&gt;&lt;span style="color: rgb(43,145,175)"&gt;Model3DGroup&lt;/span&gt;&lt;/font&gt;();&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;group.Children.Add(geometry);&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;HTH&lt;/span&gt;&lt;/div&gt;
&lt;div style="margin: 0px"&gt;&lt;span style="font-family: Courier New"&gt;Tim&lt;/span&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/141049.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2010/07/24/wpf-3d---programmatically-adding-an-image-brush.aspx</guid>
            <pubDate>Sat, 24 Jul 2010 11:39:37 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/141049.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2010/07/24/wpf-3d---programmatically-adding-an-image-brush.aspx#feedback</comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/141049.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/141049.aspx</trackback:ping>
        </item>
        <item>
            <title>Databinding a .Net WinForms ComboBox to an Enum</title>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <link>http://geekswithblogs.net/TimH/archive/2010/04/07/databinding-a-.net-winforms-combobox-to-an-enum.aspx</link>
            <description>&lt;p&gt;This is quite simple...&lt;/p&gt;
&lt;p&gt;Define the enum eg:&lt;/p&gt;
&lt;pre&gt;
public enum MyEnum{
  ItemOne,
  ItemTwo,
}&lt;/pre&gt;
&lt;p&gt;Within the form set the datasource of the combobox to the values of the enum eg:&lt;/p&gt;
&lt;pre&gt;
myCombo.DataSource = System.Enum.GetValues(typeof(MyEnum));&lt;/pre&gt;
&lt;p&gt;To have the combo auto select a value based on a bound object, set the databinding of the combo eg:&lt;/p&gt;
&lt;pre&gt;
class MyObject{
  private MyEnum myEnumProperty;
  public MyEnum MyEnumProperty{get {return myEnumProperty;}}
}
MyObject myObj = new MyObject();
myCombo.DataBindings.Add(new Binding("SelectedIndex", myObject, "MyEnumProperty");&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/139151.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2010/04/07/databinding-a-.net-winforms-combobox-to-an-enum.aspx</guid>
            <pubDate>Thu, 08 Apr 2010 03:00:19 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/139151.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2010/04/07/databinding-a-.net-winforms-combobox-to-an-enum.aspx#feedback</comments>
            <slash:comments>16</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/139151.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/139151.aspx</trackback:ping>
        </item>
        <item>
            <title>Reading a file for input in Aris, using Aris Script (Server/Report)</title>
            <category>Architecture, Design and Development</category>
            <category>Modelling, Aris, etc</category>
            <link>http://geekswithblogs.net/TimH/archive/2010/03/03/reading-a-file-for-input-in-aris-using-aris-script.aspx</link>
            <description>&lt;p&gt;The Aris scripting language provides a couple of ways to select and read a file for input.  This is useful for auto populating Aris (generating models and objects).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To select a file on the clients machine&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;Aris provides a dialog for selecting a file on the users machine.  This returns an array of file objects, each of which have a method which returns a byte array (which seems to be the standard way to handle file content in Aris). Eg:&lt;/p&gt;
&lt;p&gt;    // Get file from client&lt;br /&gt;
    var selectedFiles = Dialogs.&lt;strong&gt;getFilePath&lt;/strong&gt;(null, "XML Files|*.xml||", null, "Select file", 0);&lt;br /&gt;
    if(selectedFiles==null){&lt;br /&gt;
        Dialogs.MsgBox("No file selected.");&lt;br /&gt;
        return;&lt;br /&gt;
    }&lt;br /&gt;
    var fileByteArray = selectedFiles[0].&lt;strong&gt;getData&lt;/strong&gt;();&lt;br /&gt;
 &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To use a file on the Aris Server:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Alternatively you can just access a known file from the Common Files area.  To put the file there in the first place you need to add it within Aris (from the Scripting module open the server, right-click on "Common files" and select "Add files..." etc).  Then use the Dialogs.getFilePath() method, eg:&lt;/p&gt;
&lt;p&gt;    // Get file from Common files&lt;br /&gt;
    var fileByteArray = Context.getFile("myInputFile.xml", Constants.LOCATION_COMMON_FILES); &lt;br /&gt;
 &lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/138314.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2010/03/03/reading-a-file-for-input-in-aris-using-aris-script.aspx</guid>
            <pubDate>Wed, 03 Mar 2010 21:35:07 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/138314.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2010/03/03/reading-a-file-for-input-in-aris-using-aris-script.aspx#feedback</comments>
            <slash:comments>22</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/138314.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/138314.aspx</trackback:ping>
        </item>
        <item>
            <title>Installing Artcut (plotter/cutter software) without prompt to insert Graphics Disc</title>
            <category>OS/Networking/Misc Apps</category>
            <link>http://geekswithblogs.net/TimH/archive/2010/01/04/installing-artcut-plottercutter-software-without-prompt-to-insert-graphics-disc.aspx</link>
            <description>&lt;p&gt;If you do a 'typical' install of Artcut, it will try to install the 'chinese graph files' - and therefore, when you run it for the first time (after the installation) it will prompt you to insert the Graphic Disc.&lt;/p&gt;
&lt;p&gt;To avoid this, run the install and choose Custom install (instead of the default of 'Typical') then click Next, then uncheck the component 'chinese graph files' and continue with the installation.&lt;/p&gt;
&lt;p&gt;HTH&lt;/p&gt;
&lt;p&gt;Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/137340.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2010/01/04/installing-artcut-plottercutter-software-without-prompt-to-insert-graphics-disc.aspx</guid>
            <pubDate>Tue, 05 Jan 2010 00:27:30 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/137340.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2010/01/04/installing-artcut-plottercutter-software-without-prompt-to-insert-graphics-disc.aspx#feedback</comments>
            <slash:comments>42</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/137340.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/137340.aspx</trackback:ping>
        </item>
        <item>
            <title>Winform Progress Bar Marquee Style Not Working</title>
            <category>C# .NET</category>
            <link>http://geekswithblogs.net/TimH/archive/2009/07/21/winform-progress-bar-marquee-style-not-working.aspx</link>
            <description>&lt;p&gt;When trying to run a .Net winforms app with a progressbar on it, I found that if it was run from a non-standard class, the marquee style did not work.&lt;/p&gt;
&lt;p&gt;The reason was because we were running the app from our own loader class, instead of the usual winforms program.cs.  This was because we were instatiating it from VB using COM interop - I thought this was the cause of the issue - but it turns out that this is not the case...  &lt;/p&gt;
&lt;p&gt;The problem was that our own loader class did not enable the windows XP visual styles (apparently the Marquee style is only supported on platforms later than and including Windows XP - &lt;em&gt;with visual styles enabled&lt;/em&gt;).&lt;/p&gt;
&lt;p&gt;So the solution (to make the Marquee style work) is to include the following line of code before instantiating your form:&lt;/p&gt;
&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;Application&lt;font color="#000000"&gt;.EnableVisualStyles();&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#000000"&gt;HTH&lt;br /&gt;
Tim&lt;/font&gt;&lt;/p&gt;
&lt;/font&gt;&lt;/font&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/133634.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2009/07/21/winform-progress-bar-marquee-style-not-working.aspx</guid>
            <pubDate>Wed, 22 Jul 2009 02:19:52 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/133634.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2009/07/21/winform-progress-bar-marquee-style-not-working.aspx#feedback</comments>
            <slash:comments>119</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/133634.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/133634.aspx</trackback:ping>
        </item>
        <item>
            <title>Async web service/WCF calls updating the UI on the UI thread (using WinForms)</title>
            <category>C# .NET</category>
            <category>Architecture, Design and Development</category>
            <link>http://geekswithblogs.net/TimH/archive/2009/07/07/async-web-servicewcf-calls-updating-the-ui-on-the-ui-again.aspx</link>
            <description>&lt;p&gt;To update the UI with values returned from an asynchronous WCF/web service call you need to make sure the coding updating the UI is running on the UI thread.  Depending on how you've performed the async remote service call, often this is done on another thread - so when the handler executes upon completion of the call it is not on the UI thread and causes a threading exception.&lt;/p&gt;
&lt;p&gt;Within winforms, the solution is to use the Invoke() method eg the following method would be on your form or user control and could be safely called from the async service call handler:&lt;/p&gt;
&lt;font size="2"&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; UpdateCustomerName()&lt;br /&gt;
{&lt;br /&gt;
  &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.InvokeRequired)&lt;br /&gt;
  {&lt;br /&gt;
    &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Invoke(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;EventHandler&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;delegate&lt;br /&gt;
      &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;{textBox1.Text = presenter.Customer.Name;}));&lt;br /&gt;
  }&lt;br /&gt;
  &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;else&lt;br /&gt;
  &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;{&lt;br /&gt;
    textBox1.Text = presenter.Customer.Name;&lt;br /&gt;
  }&lt;br /&gt;
}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;If you're using something like the MVP pattern (in winforms) then you could make your presenter base class provide some generic handling for it with these 2 members:&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;protected&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;delegate&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;UIDeligate&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;();&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;&amp;lt;summary&amp;gt;&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt; Invokes the specified method in the UI thread. This is useful for executing view methods, that update the UI, from an asynchronous callback handler in the presenter.&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt; Eg: &lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;&amp;lt;code&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;OnUIThread(new Presenter&amp;amp;lt;ITestView&amp;amp;gt;.UIDeligate(View.BindCustomers));&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;&amp;lt;/summary&amp;gt;&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt; &lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;&amp;lt;example&amp;gt;&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt; The folling code executes the view method BindCustomrs() in the UI thread.&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt; OnUIThread(new Presenter&amp;amp;lt;ITestView&amp;amp;gt;.UIDeligate(View.BindCustomers));&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;&amp;lt;/example&amp;gt;&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;///&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;&amp;lt;param name="method"&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;Method to invoke.&lt;/font&gt;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;&lt;font color="#808080" size="2"&gt;&amp;lt;/param&amp;gt;&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;protected&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; OnUIThread(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;UIDeligate&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; method)&lt;br /&gt;
{&lt;br /&gt;
  &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (disposed) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;return&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;
  &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Control&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; control = View &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;as&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Control&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;
  &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; ((control != &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;) &amp;amp;&amp;amp; (control.Created))&lt;br /&gt;
    control.Invoke(method);&lt;br /&gt;
  &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;else&lt;br /&gt;
    &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;method.DynamicInvoke();&lt;br /&gt;
}&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;These allow your presenter to handle the thread synchronization for you (as it would be the one handling the the callback processing).  In this case your UI method, in your form or usercontrol, would look like this:&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; UpdateCustomerName()&lt;br /&gt;
{&lt;br /&gt;
&lt;/font&gt;&lt;font size="2"&gt;    textBox1.Text = presenter.Customer.Name;&lt;br /&gt;
}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;and the presenter implementation class would call it like this:&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; customerService_CustomerUpdate(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;EventArgs&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Customer&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;gt; e)&lt;br /&gt;
{&lt;br /&gt;
  customer = e.Data;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;  // Previously we would have done:  &lt;br /&gt;
  &lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// View.UpdateCustomerName();&lt;br /&gt;
  // but now we do this:&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;  OnUIThread(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;Presenter&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;lt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;ITestView&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;gt;.&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;UIDeligate&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(View.BindLivingExpenseRates));&lt;br /&gt;
}&lt;/font&gt; &lt;/p&gt;
&lt;p&gt;So now the view does not need to care about any threading/async issues.&lt;/p&gt;
&lt;p&gt;You could also use the &amp;lt;methodname&amp;gt;Async method and &amp;lt;methodname&amp;gt;Completed event in the generated WCF client proxy - as from what I've seen the &amp;lt;methodname&amp;gt;Completed event magically executes on the UI thread (have no idea how/why).  See &lt;a href="http://blogs.msdn.com/rickrain/archive/2009/03/18/making-asynchronous-service-calls-from-a-winform-client.aspx"&gt;this article&lt;/a&gt; for a good example.&lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;/font&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/133332.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2009/07/07/async-web-servicewcf-calls-updating-the-ui-on-the-ui-again.aspx</guid>
            <pubDate>Wed, 08 Jul 2009 02:56:40 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/133332.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2009/07/07/async-web-servicewcf-calls-updating-the-ui-on-the-ui-again.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/133332.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/133332.aspx</trackback:ping>
        </item>
        <item>
            <title>Turning on code coverage/instrumentation in a TFS Build</title>
            <category>BizTalk</category>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Unit Testing</category>
            <category>Dev Env, TFS, MSBuild etc</category>
            <link>http://geekswithblogs.net/TimH/archive/2009/06/16/turning-on-code-coverageinstrumentation-in-a-tfs-build.aspx</link>
            <description>&lt;p&gt;This requires a testrunconfig file that has been configured correctly.  To do this I did the following:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;In VS2008, right click on Solution Items folder and select Add - New Item... &lt;/li&gt;
    &lt;li&gt;Select Test Run Configuration and enter the name WithCodeCoverage.testrunconfig. &lt;/li&gt;
    &lt;li&gt;Open/edit this file in VS. &lt;/li&gt;
    &lt;li&gt;Select the 'Code Coverage' item on the left, then selected (checked) the assemblies I wanted to instrument &lt;/li&gt;
    &lt;li&gt;Click Apply to save these changes. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Note that you can select which is the active test run configuration from under the Test menu in VS2008. &lt;/p&gt;
&lt;p&gt;Now we need to update the TFS build...&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Open your TFS build file (eg TFSBuild.proj)&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;In the section starting with&lt;br /&gt;
    &lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;PropertyGroup&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;font face="Courier New"&gt; TEST ARGUMENTS&lt;/font&gt;...&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;
    Add the following line (after the comments and before the closing of PropertyGroup):&lt;br /&gt;
    &lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;RunConfigFile&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;Condition&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;"&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt; '$(IsDesktopBuild)' != 'true' &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;"&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;$(SolutionRoot)\DEV\Release1\Source\WithCodeCoverage.testrunconfig&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;RunConfigFile&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;
    (update accordingly to suit your build server paths). &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That's it.  Queue a build to test - you may need to verify your server build paths to get it working (I did).&lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/132870.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2009/06/16/turning-on-code-coverageinstrumentation-in-a-tfs-build.aspx</guid>
            <pubDate>Wed, 17 Jun 2009 04:32:14 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/132870.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2009/06/16/turning-on-code-coverageinstrumentation-in-a-tfs-build.aspx#feedback</comments>
            <slash:comments>1</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/132870.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/132870.aspx</trackback:ping>
        </item>
        <item>
            <title>How to turn on unit testing in your TFS build</title>
            <category>BizTalk</category>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Unit Testing</category>
            <category>Dev Env, TFS, MSBuild etc</category>
            <link>http://geekswithblogs.net/TimH/archive/2009/06/16/how-to-turn-on-unit-testing-in-your-tfs-build.aspx</link>
            <description>&lt;p&gt;The following will make your builds (running on a TFS Server) execute your unit tests after the build:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Open your build file (eg TFSBuild.proj).  VS2008 has a nice xml editor for this.&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;Search for the RunTest node and change it from:&lt;br /&gt;
    &lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;RunTest&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;false&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;RunTest&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font face="Courier New"&gt;&amp;gt;&lt;/font&gt;&lt;br /&gt;
    &lt;/font&gt;&lt;/font&gt;to:&lt;br /&gt;
    &lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;RunTest&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;true&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;RunTest&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;
    &lt;/li&gt;
    &lt;li&gt;Look for a section that starts with:&lt;br /&gt;
    &lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;ItemGroup&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;
    &amp;lt;!--&lt;/font&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;font face="Courier New"&gt; TEST ARGUMENTS&lt;/font&gt; ...&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;
    and add nodes within this (after the comments and before the closing of the ItemGroup node) - one entry for each unit test assembly you have eg:&lt;br /&gt;
    &lt;font face="Courier New"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;TestContainer&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;Include&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;"&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;$(OutDir)\My.App.UnitTests.dll&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;"&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt; /&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thats it - check in this file and queue a build.&lt;/p&gt;
&lt;p&gt;An error I got while getting this working indicated that the MSTest.exe could not be found - this was because TFS Client had not been installed on the build server - once these were installed it worked fine.&lt;/p&gt;
&lt;p&gt;Something else you may want to do is ensure that a build is triggered every time someone checks in.  To do this, edit your build definition (right click on your build within Team Explorer and choose "Edit Build Definition...") - click on the 'Trigger' item in the list on the left and make sure the "Build each check-in (more builds)" item is checked.&lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/132866.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2009/06/16/how-to-turn-on-unit-testing-in-your-tfs-build.aspx</guid>
            <pubDate>Wed, 17 Jun 2009 03:54:27 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/132866.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2009/06/16/how-to-turn-on-unit-testing-in-your-tfs-build.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/132866.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/132866.aspx</trackback:ping>
        </item>
        <item>
            <title>How to unit test against resources (localization) values within Visual Studio 2008</title>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Unit Testing</category>
            <link>http://geekswithblogs.net/TimH/archive/2009/05/22/how-to-unit-test-against-resources-localization-values-within-visual.aspx</link>
            <description>&lt;p&gt;When unit testing you sometimes need to test that values are being set to the correct literal/constant value - and this value is often stored in a resources file.&lt;/p&gt;
&lt;p&gt;However, for some reason the VS2008 'Create Private Accessor' feature did not work for me for resources (maybe be cause they're all static properties and the generated _Accessor classes need to be instantiated).  So to make these resource available within the unit test project I simply made the Resources class public (by default it's internal).&lt;/p&gt;
&lt;p&gt;To do this:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Open the resource file (eg Resources.resx) using the Visual Studio resource editor tool (just double click on the .resx file).&lt;/li&gt;
    &lt;li&gt;At the top of the editor tab there is a drop down box labelled "Access Modifier" - change this from Internal to Public and save the file.&lt;/li&gt;
    &lt;li&gt;Rebuild the project.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Your resources will now be accessible in your unit tests.&lt;/p&gt;
&lt;p&gt;HTH&lt;br /&gt;
Tim&lt;/p&gt;
&lt;p&gt; &lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/132362.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2009/05/22/how-to-unit-test-against-resources-localization-values-within-visual.aspx</guid>
            <pubDate>Fri, 22 May 2009 21:07:55 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/132362.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2009/05/22/how-to-unit-test-against-resources-localization-values-within-visual.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/132362.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/132362.aspx</trackback:ping>
        </item>
        <item>
            <title>Error: Failed to access IIS metabase. Hosting WCF Service in IIS</title>
            <category>Off Topic</category>
            <category>ASP.NET</category>
            <category>IIS</category>
            <category>Web Development, JavaScript &amp; CSS</category>
            <link>http://geekswithblogs.net/TimH/archive/2009/05/14/error-failed-to-access-iis-metabase.-hosting-wcf-service-in.aspx</link>
            <description>&lt;p&gt;This error ("Failed to access IIS metabase") can occur when you try to access your WCF when you have added for hosting within IIS.&lt;/p&gt;
&lt;p&gt;To solve this problem do this:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Reregister ASP.NET for IIS:  Open an Visual Studio Command Prompt (or a regular command prompt and cd into the .Net dir - usually: &lt;font face="Arial"&gt;C:\WINNT\Microsoft.NET\Framework\v2.0.50727&lt;/font&gt;) then type:&lt;br /&gt;
       aspnet_regiis -i&lt;/li&gt;
    &lt;li&gt;When complete, from the same command prompt run: iisreset&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Verify your IIS virtual/app dir is setup correctly (uses .Net 2).  If you don't already have one...&lt;/p&gt;
&lt;p&gt;To Host a WCF Service within IIS:&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Develop your service in IIS (I'm not going to tell you how to do that!) and build it.&lt;/li&gt;
    &lt;li&gt;Within your computer management/MMC console (compmgmt.msc), open the Internet Information Service node and right click on the site you want to use and select New - Virtual Directory...&lt;/li&gt;
    &lt;li&gt;Enter the name you want.&lt;/li&gt;
    &lt;li&gt;Point this to the directory you created your WCF service project in (the project root dir - not the bin dir).&lt;/li&gt;
    &lt;li&gt;Complete the wizard then back in the MMC window right click on your new virtual dir and select Properties.&lt;/li&gt;
    &lt;li&gt;On the ASP.NET tab make sure uses version 2.0.50727 (or whatever your v2 is).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To test:  within the MMC console - open your new virtual dir, right click on one of your services (eg MyService.svc) and select Browse.&lt;/p&gt;
&lt;p&gt;HTH&lt;/p&gt;
&lt;p&gt;Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/132098.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2009/05/14/error-failed-to-access-iis-metabase.-hosting-wcf-service-in.aspx</guid>
            <pubDate>Thu, 14 May 2009 20:13:04 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/132098.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2009/05/14/error-failed-to-access-iis-metabase.-hosting-wcf-service-in.aspx#feedback</comments>
            <slash:comments>24</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/132098.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/132098.aspx</trackback:ping>
        </item>
        <item>
            <title>How to fade image layers using Gimp gradient/blend tool</title>
            <category>Off Topic</category>
            <category>OS/Networking/Misc Apps</category>
            <category>Web Development, JavaScript &amp; CSS</category>
            <category>Graphics</category>
            <link>http://geekswithblogs.net/TimH/archive/2009/03/10/how-to-fade-image-layers-using-gimp-gradientblend-tool.aspx</link>
            <description>&lt;p&gt;This post will explain how to do fading (fade out a layer) in Gimp.&lt;/p&gt;
&lt;p&gt;Assuming you have an image open...&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Add a new layer &lt;/li&gt;
    &lt;li&gt;Draw the part you want faded &lt;/li&gt;
    &lt;li&gt;Right click on the layer in the Layers panel/window and select 'Add Layer Mask', then click on Add on the Add Layer Mask dialog (making sure the default value of 'White (full opacity)' is selected). &lt;/li&gt;
    &lt;li&gt;Select the Blend/Gradient tool and set the Gradient to 'FG to GB(RGB)' . &lt;/li&gt;
    &lt;li&gt;On the layer click and drag a line where you want the gradient (fade) to start and finish.  The first click is where it will be faded out and the second click is where it will start to fade. &lt;/li&gt;
    &lt;li&gt;Right click on the layer in the Layers panel/window and select 'Apply Layer Mask'. &lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That's it.&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/129953.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2009/03/10/how-to-fade-image-layers-using-gimp-gradientblend-tool.aspx</guid>
            <pubDate>Tue, 10 Mar 2009 14:49:34 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/129953.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2009/03/10/how-to-fade-image-layers-using-gimp-gradientblend-tool.aspx#feedback</comments>
            <slash:comments>14</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/129953.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/129953.aspx</trackback:ping>
        </item>
        <item>
            <title>How to change permissions on Vista Home so you can update your hosts file</title>
            <category>OS/Networking/Misc Apps</category>
            <category>Half Baked</category>
            <link>http://geekswithblogs.net/TimH/archive/2009/02/01/how-to-change-permissions-on-vista-home-so-you-can.aspx</link>
            <description>&lt;p&gt;Windows Vista Home edition has some funny quirks - and this one is a prime example...&lt;/p&gt;
&lt;p&gt;When trying to update my hosts file I get permission denied.  That's odd - so I check the permissions and sure enough Administrator group has write access - yet I am the only administror on the system.   How's that for tricky - so I'm an admin with no admin rights - go figure.  Then I tried deleting the file then readding it....  wow - delete worked but could not re-add.&lt;/p&gt;
&lt;p&gt;It appears the only way around this little gem is to turn off user access control (not recommended - but there seems to be no other option as the security is fairly random and not what it used to be in earlier verisons of windows).&lt;/p&gt;
&lt;p&gt;To do this go into Control Panel, select User Accounts then choose "&lt;font face="Arial"&gt;Turn User Account Control On or Off" and turn it off (uncheck the checkbox then click OK) - you'll need to reboot for this to take effect.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Now you can change the files.&lt;/p&gt;
&lt;p&gt;*** Just remember to undo the security by-pass - but turning back on the user access control (same as above - checking the checkbox). ***&lt;/p&gt;
&lt;p&gt;**** &lt;strong&gt;Updated:&lt;/strong&gt; As Joe suggests below - yes the correct way would be to start your editor by using right-click - 'Run as administrator'.  However this still does not explain the bug with Vista's security model that does not allow an admin user to update the hosts file without turning off UAC.&lt;/p&gt;
&lt;p&gt;HTH&lt;/p&gt;
&lt;p&gt;Tim&lt;/p&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/129117.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2009/02/01/how-to-change-permissions-on-vista-home-so-you-can.aspx</guid>
            <pubDate>Mon, 02 Feb 2009 03:38:05 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/129117.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2009/02/01/how-to-change-permissions-on-vista-home-so-you-can.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/129117.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/129117.aspx</trackback:ping>
        </item>
        <item>
            <title>Script to remove unchanged files in TFS/VS2008</title>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Half Baked</category>
            <category>Dev Env, TFS, MSBuild etc</category>
            <link>http://geekswithblogs.net/TimH/archive/2009/01/22/script-to-remove-unchanged-files-in-tfsvs2008.aspx</link>
            <description>TFS has a wonderful feature whereby it marks files as changed, even though there are no changes.  These files show up in the Pending Changes window in Visual Studio (VS 2008). &lt;br /&gt;
&lt;br /&gt;
To work around this,  add the following external command to your VS tools:&lt;br /&gt;
&lt;ol&gt;
    &lt;li&gt;First you need to install &lt;a href="javascript:void(0);/*1232591142036*/"&gt;TFS Power Tools&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;In VS go into Tools - External Tools and click Add&lt;/li&gt;
    &lt;li&gt;Enter the following details:&lt;br /&gt;
    &lt;span style="font-weight: bold;"&gt;Title&lt;/span&gt;: Unchange&lt;br /&gt;
    &lt;span style="font-weight: bold;"&gt;Command&lt;/span&gt;: C:\Program Files\Microsoft Team Foundation Server 2008 Power Tools\tfpt.exe&lt;br /&gt;
    &lt;span style="font-weight: bold;"&gt;Arguments&lt;/span&gt;: uu /recursive /noget&lt;br /&gt;
    &lt;span style="font-weight: bold;"&gt;Initial Directory&lt;/span&gt;: $(SolutionDir)&lt;/li&gt;
    &lt;li&gt;And check 'Use Output Window'&lt;/li&gt;
    &lt;li&gt;Click Ok&lt;/li&gt;
&lt;/ol&gt;
That's it.  To test, view the Pending Changes window - usually after a 'Get Latest' is when it lists unmodified files as changed - then click Tools  - Unchange.&lt;br /&gt;
&lt;br /&gt;
Thanks to &lt;a href="javascript:void(0);/*1232591391656*/"&gt;Duncan Smith&lt;/a&gt; for this gem of info.&lt;br /&gt;
&lt;br /&gt;
The fact they created a tool for this makes you wonder!&lt;br /&gt;
&lt;br /&gt;
HTH&lt;br /&gt;
Tim &lt;img src="http://geekswithblogs.net/TimH/aggbug/128877.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2009/01/22/script-to-remove-unchanged-files-in-tfsvs2008.aspx</guid>
            <pubDate>Thu, 22 Jan 2009 21:31:34 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/128877.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2009/01/22/script-to-remove-unchanged-files-in-tfsvs2008.aspx#feedback</comments>
            <slash:comments>13</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/128877.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/128877.aspx</trackback:ping>
        </item>
        <item>
            <title>How to move/drag objects in Silverlight (2.0)</title>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Web Development, JavaScript &amp; CSS</category>
            <category>WPF &amp; Silverlight</category>
            <link>http://geekswithblogs.net/TimH/archive/2008/11/05/how-to-movedrag-objects-in-silverlight-2.0.aspx</link>
            <description>&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;font face="Arial"&gt;The following code shows you how you can make Silverlight controls/objects moveable by dragging them with the mouse.&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;font face="Arial"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;font face="Arial"&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;font face="Arial" color="#000000" size="3"&gt;&lt;strong&gt;Page.cs:&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;UserControl&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; x&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;:&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;Class&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="MovingObjs.Page"&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;   &lt;span style="COLOR: red"&gt; xmlns&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="http://schemas.microsoft.com/winfx/2006/xaml/presentation"&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;   &lt;span style="COLOR: red"&gt; xmlns&lt;/span&gt;&lt;span style="COLOR: blue"&gt;:&lt;/span&gt;&lt;span style="COLOR: red"&gt;x&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="http://schemas.microsoft.com/winfx/2006/xaml"&lt;/span&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;   &lt;span style="COLOR: red"&gt; Width&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="400"&lt;/span&gt;&lt;span style="COLOR: red"&gt; Height&lt;/span&gt;&lt;span style="COLOR: blue"&gt;="300"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;    &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;Canvas&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; x&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;:&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;Name&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="LayoutRoot"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; Background&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="White"&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;        &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;Border&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; CornerRadius&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="10"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; x&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;:&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;Name&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="brdMovable"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; BorderBrush&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="Black"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; BorderThickness&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="2"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; Background&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="AntiqueWhite"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; Canvas.Top&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="100"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; Canvas.Left&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="10"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; MouseLeftButtonDown&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="brdMovable_MouseLeftButtonDown"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; MouseLeftButtonUp&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="brdMovable_MouseLeftButtonUp"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; MouseMove&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="brdMovable_MouseMove"&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;            &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;Grid&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; x&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;:&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;Name&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="grid1"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; Width&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="300"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; Margin&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="5" &amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;                &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;TextBlock&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; x&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;:&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt;Name&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="txtBlkTest"&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 'Courier New'"&gt; Text&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;="Test"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;TextBlock&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;            &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;Grid&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;        &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;Border&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;    &lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;Canvas&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: #a31515; FONT-FAMILY: 'Courier New'"&gt;UserControl&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&amp;gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;&lt;font face="Arial" color="#000000" size="3"&gt;&lt;strong&gt;Page.xaml.cs:&lt;/strong&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'"&gt;namespace&lt;/span&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt; MovingObjs&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;    &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; &lt;span style="COLOR: blue"&gt;partial&lt;/span&gt; &lt;span style="COLOR: blue"&gt;class&lt;/span&gt; &lt;span style="COLOR: #2b91af"&gt;Page&lt;/span&gt; : &lt;span style="COLOR: #2b91af"&gt;UserControl&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;    {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;bool&lt;/span&gt; moving = &lt;span style="COLOR: blue"&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;double&lt;/span&gt; offSetX;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;double&lt;/span&gt; offSetY;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        &lt;span style="COLOR: blue"&gt;public&lt;/span&gt; Page()&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;            InitializeComponent();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; brdMovable_MouseLeftButtonDown(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; sender, &lt;span style="COLOR: #2b91af"&gt;MouseButtonEventArgs&lt;/span&gt; e)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;            moving = &lt;span style="COLOR: blue"&gt;true&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;            &lt;span style="COLOR: #2b91af"&gt;Point&lt;/span&gt; offset = e.GetPosition(brdMovable);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;            offSetX = offset.X;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;            offSetY = offset.Y;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; brdMovable_MouseLeftButtonUp(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; sender, &lt;span style="COLOR: #2b91af"&gt;MouseButtonEventArgs&lt;/span&gt; e)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;            moving = &lt;span style="COLOR: blue"&gt;false&lt;/span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        &lt;span style="COLOR: blue"&gt;private&lt;/span&gt; &lt;span style="COLOR: blue"&gt;void&lt;/span&gt; brdMovable_MouseMove(&lt;span style="COLOR: blue"&gt;object&lt;/span&gt; sender, &lt;span style="COLOR: #2b91af"&gt;MouseEventArgs&lt;/span&gt; e)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;            &lt;span style="COLOR: blue"&gt;if&lt;/span&gt; (moving)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;            {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;                &lt;span style="COLOR: #2b91af"&gt;Canvas&lt;/span&gt; parent = (&lt;span style="COLOR: #2b91af"&gt;Canvas&lt;/span&gt;)&lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.brdMovable.Parent;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;                &lt;span style="COLOR: #2b91af"&gt;Point&lt;/span&gt; p = e.GetPosition(parent);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;                &lt;span style="COLOR: blue"&gt;double&lt;/span&gt; x = p.X - offSetX;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;                &lt;span style="COLOR: blue"&gt;double&lt;/span&gt; y = p.Y - offSetY;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;                txtBlkTest.Text = &lt;span style="COLOR: #a31515"&gt;"X: "&lt;/span&gt; + x.ToString() + &lt;span style="COLOR: #a31515"&gt;", Y: "&lt;/span&gt; + y.ToString();&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;                &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.brdMovable.SetValue(&lt;span style="COLOR: #2b91af"&gt;Canvas&lt;/span&gt;.LeftProperty, x);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;                &lt;span style="COLOR: blue"&gt;this&lt;/span&gt;.brdMovable.SetValue(&lt;span style="COLOR: #2b91af"&gt;Canvas&lt;/span&gt;.TopProperty, y);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;            }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;        }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;    }&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'"&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt; &lt;/div&gt;
&lt;/span&gt;&lt;/div&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/126621.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2008/11/05/how-to-movedrag-objects-in-silverlight-2.0.aspx</guid>
            <pubDate>Wed, 05 Nov 2008 18:24:43 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/126621.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2008/11/05/how-to-movedrag-objects-in-silverlight-2.0.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/126621.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/126621.aspx</trackback:ping>
        </item>
        <item>
            <title>System.ArgumentException: Invalid postback or callback argument.</title>
            <category>Off Topic</category>
            <category>MySQL</category>
            <category>Architecture, Design and Development</category>
            <link>http://geekswithblogs.net/TimH/archive/2008/10/29/system.argumentexception-invalid-postback-or-callback-argument.aspx</link>
            <description>&lt;p&gt;The following exception occurs in ASP.NET (version: 2.0.50727.1433) when you trigger an event on an ASP.Net object that has no ID set, eg clicking on a LinkButton:&lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" color="#0000ff" size="2"&gt;System.ArgumentException: Invalid postback or callback argument.  Event validation is enabled using &amp;lt;pages enableEventValidation="true"/&amp;gt; in configuration or &amp;lt;%@ Page EnableEventValidation="true" %&amp;gt; in a page.  For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them.  If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;The fix for this is to simply make sure the object has an ID assigned to it eg:&lt;/p&gt;
&lt;font color="#2b91af" size="2"&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;&lt;font face="Courier New" size="2"&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size="2"&gt;&lt;font color="#2b91af" size="2"&gt;LinkButton&lt;/font&gt; theButton = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;LinkButton&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size="2"&gt;();&lt;br /&gt;
&lt;/font&gt;&lt;/font&gt;&lt;font face="Courier New"&gt;&lt;font size="2"&gt;theButton.ID = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;"buttonID"&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;;&lt;/font&gt;&lt;/font&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/126279.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2008/10/29/system.argumentexception-invalid-postback-or-callback-argument.aspx</guid>
            <pubDate>Wed, 29 Oct 2008 05:37:51 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/126279.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2008/10/29/system.argumentexception-invalid-postback-or-callback-argument.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/126279.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/126279.aspx</trackback:ping>
        </item>
        <item>
            <title>How to remove TFS workspaces</title>
            <category>C# .NET</category>
            <category>ASP.NET</category>
            <category>Dev Env, TFS, MSBuild etc</category>
            <link>http://geekswithblogs.net/TimH/archive/2008/10/09/how-to-remove-tfs-workspaces.aspx</link>
            <description>&lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="210411022-23082008"&gt;This will actually remove the your workspaces - unlike the VS/TFS Source Control Explorer which simply does not display them - duh!&lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="210411022-23082008"&gt;&lt;/span&gt;&lt;/font&gt; &lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;span class="210411022-23082008"&gt;From the VS command prompt: &lt;/span&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;&lt;font face="Courier New"&gt;&lt;span class="210411022-23082008"&gt;  &lt;/span&gt;&lt;font color="#0000ff"&gt;tf workspaces /remove:*&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font face="Arial" size="2"&gt;&lt;/font&gt; &lt;/div&gt; &lt;img src="http://geekswithblogs.net/TimH/aggbug/125718.aspx" width="1" height="1" /&gt;</description>
            <dc:creator>Tim Huffam</dc:creator>
            <guid>http://geekswithblogs.net/TimH/archive/2008/10/09/how-to-remove-tfs-workspaces.aspx</guid>
            <pubDate>Thu, 09 Oct 2008 14:10:29 GMT</pubDate>
            <wfw:comment>http://geekswithblogs.net/TimH/comments/125718.aspx</wfw:comment>
            <comments>http://geekswithblogs.net/TimH/archive/2008/10/09/how-to-remove-tfs-workspaces.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://geekswithblogs.net/TimH/comments/commentRss/125718.aspx</wfw:commentRss>
            <trackback:ping>http://geekswithblogs.net/TimH/services/trackbacks/125718.aspx</trackback:ping>
        </item>
    </channel>
</rss>
