<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blog of developer Mikkel Ovesen &#187; vs</title>
	<atom:link href="http://blog.ovesens.net/tag/vs/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ovesens.net</link>
	<description>My thoughts, stuff I need to remember or things I just want to share with the world</description>
	<lastBuildDate>Thu, 19 Jan 2012 11:55:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>My attempts at installing Umbraco via NuGet</title>
		<link>http://blog.ovesens.net/2011/11/my-attempts-at-installing-umbraco-via-nuget/</link>
		<comments>http://blog.ovesens.net/2011/11/my-attempts-at-installing-umbraco-via-nuget/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 13:19:20 +0000</pubDate>
		<dc:creator>Mikkel Ovesen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[nuget]]></category>
		<category><![CDATA[umbraco]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs]]></category>
		<category><![CDATA[vs2010]]></category>

		<guid isPermaLink="false">http://blog.ovesens.net/?p=461</guid>
		<description><![CDATA[I often use Umbraco as a CMS for my web projects, and NuGet for referencing other libraries. This made me wonder whether Umbraco could be deployed via Nuget. The short answer is, it is possible, but it does not work &#8230; <a href="http://blog.ovesens.net/2011/11/my-attempts-at-installing-umbraco-via-nuget/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I often use <a href="http://umbraco.com/">Umbraco</a> as a CMS for my web projects, and NuGet for referencing other libraries. This made me wonder whether Umbraco could be deployed via Nuget. The short answer is, it is possible, but it does not work very well. Here is my experience.</p>
<p>I started to read the <a href="http://docs.nuget.org/">NuGet docs</a> to figure out what a NuGet package actually is.</p>
<h2>NuGet package</h2>
<p>A NuGet package is a file that makes it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework. A NuGet package is comprised by these three things:</p>
<ul>
<li><strong>tools</strong> &#8211; The tools folder of a package is for powershell scripts and programs accessible from the Package Manager Console. After the folder is copied to the target project, it is added to the `$env:Path (PATH) environment variable.</li>
<li><strong>lib</strong> &#8211; Assemblies (.dll files) in the lib folder are added as assembly references when the package is installed.</li>
<li><strong>content</strong> &#8211; Files in the content folder are copied to the root of your application when the package is installed.</li>
</ul>
<div><em><span style="font-size: small;"><span class="Apple-style-span" style="line-height: 24px;">The above is from the <a href="http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package">NuGet docs</a>.</span></span></em></div>
<p>The documentation also indicate that NuGet was not designed for a project like Umbraco with so many files and such a complex web.config file. But I wanted to try and see how and if it was actually possible.</p>
<h2>The strategy</h2>
<p>The Umbraco project consists of libraries/assemblies and content, so it should be rather easy to create the NuGet package.</p>
<p>The first step was to download Umbraco 4.7.1 and go through the required assemblies and web.config. Initially I located assemblies that could already be found on NuGet and added these dependencies to the NuGet package. It later showed, that there would be versioning problems which I was not able to fix.</p>
<p>So instead of using dependencies to other NuGet packages as NuGet was actually intended, I  just added all the assemblies released with Umbraco 4.7.1.</p>
<h2>Assemblies</h2>
<p>The assemblies that gave me the most trouble was ClientDependency and ICharpCode.SharpZipLib.</p>
<p>ClientDependency was actually already in the NuGet feed, but the configuration transformation made from that NuGet package combined with the web.config transformation from the Umbraco package, yilded an invalid web.config file.  ClientDependency was therefor provided as an assembly directly from the Umbraco package and not as an external dependency.</p>
<p>The assembly ICSharpCode.SharpZipLib was also found in the NuGet feed, but Umbraco 4.7.1 required a specific version (0.85.5.452) that NuGet could not provide, and this assembly was as such also added as a part of the Umbraco package.</p>
<h2>Web.config</h2>
<p>The web.config configuration file for Umbraco is long and rather complex, and that makes merging of multiple web.config files difficult. The configuration transformation features in NuGet are limited, so you should expect problems when adding the Umbraco package to an existing website. The best results I achieved was when the package was added to an empty website or web application.</p>
<p>But even though a web.config file is almost empty, you should still prepare for some clean up.</p>
<h2>Content</h2>
<p>The <a href="http://umbraco.codeplex.com/releases/view/73692">Umbraco 4.7.1 binary release</a> containes more than 1500 files. NuGet was not designed for this number of files and does not handle it very well. A complete package installation can take up to 5-10 min. depending on you machine and SSD/HDD configuration.</p>
<h2>Example</h2>
<p>The following describes the steps I used to run the Umbraco NuGet package against a web application project and the problems that arose.</p>
<p>1. Open Visual Studio 2010 and create an empty C# web application project</p>
<p>2. Open the NuGet Package Manager Console</p>
<p>3. Write:</p>
<pre>Install-Package "Umbraco" -Source "c:\[NuGetPackageFolder]"</pre>
<p><em>NuGetPackageFolder: Replace with the path to the folder containing the Umbraco.4.7.1.nupkg file. <strong>Important do not give the full path to the file, just the folder</strong></em></p>
<p>4. Hit [ENTER] and wait for NuGet to do its work</p>
<p>5. Wait for the following two messages:</p>
<pre>Successfully installed 'Umbraco 4.7.1'.
Successfully added 'Umbraco 4.7.1' to WebApplication1.</pre>
<p>6. Compile and receive an error from web.config. (Multiple System.Web -&gt; Compilation sections are present)</p>
<p>7. Remove the first and compile and run again</p>
<pre class="brush: xml;">&lt;compilation debug="true" targetFramework="4.0" /&gt;</pre>
<p>8. At this point everything worked and I was able to follow the usual Umbraco installation steps <img src='http://blog.ovesens.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Conclusion</h2>
<p>Umbraco is a fantastic CMS and NuGet is very cool, but together is not a good idea.</p>
<p>My goal was to find a way for installing Umbraco to a web project via NuGet, and that is not impossible, but I would not recommend it. I find it a lot easier to simply download the Umbraco released ZIP, and then extract and drag all files to my web application project. So that is what I will do <img src='http://blog.ovesens.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>But if you still wants the Umbraco NuGet file, you can download it <a href="/wp-content\uploads/2011/11/Umbraco.4.7.1.nupkg.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ovesens.net/2011/11/my-attempts-at-installing-umbraco-via-nuget/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manually start Visual Studio dev. web server</title>
		<link>http://blog.ovesens.net/2010/03/manually-start-visual-studio-dev-web-server/</link>
		<comments>http://blog.ovesens.net/2010/03/manually-start-visual-studio-dev-web-server/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 10:58:00 +0000</pubDate>
		<dc:creator>Mikkel Ovesen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs]]></category>

		<guid isPermaLink="false">http://blog.ovesens.net/?p=228</guid>
		<description><![CDATA[I needed to manually start the Visual Studio dev. web server for profililng purposes&#8230; The web server is located here: C:\Program Files (x86)\Common Files\microsoft shared\DevServer\9.0\WebDev.WebServer.EXE Arguments /port:&#60;port number&#62; Optional, an unused port number between 1 and 65535. /path:&#60;physical path&#62; A &#8230; <a href="http://blog.ovesens.net/2010/03/manually-start-visual-studio-dev-web-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I needed to manually start the Visual Studio dev. web server for profililng purposes&#8230;</p>
<pre>The web server is located here:
C:\Program Files (x86)\Common Files\microsoft shared\DevServer\9.0\WebDev.WebServer.EXE</pre>
<h2>Arguments</h2>
<table border="0" cellspacing="1" cellpadding="3">
<tbody>
<tr>
<td>/port:&lt;port number&gt;</td>
<td>Optional, an unused port number between 1 and 65535.</td>
</tr>
<tr>
<td>/path:&lt;physical path&gt;</td>
<td>A valid directory where the web application is rooted.</td>
</tr>
<tr>
<td>/vpath:&lt;virtual path&gt;</td>
<td>Optional, the virtual path or application root in the form of &#8216;/&lt;app name&gt;&#8217;.</td>
</tr>
</tbody>
</table>
<h2>Example</h2>
<pre>C:\Program Files (x86)\Common Files\microsoft shared\DevServer\9.0&gt;
WebDev.WebServer.EXE /port:8080 /path:"C:\Users\Administrator\Documents\Visual Studio 2008\Projects\WebApplication\Compiled" \vpath:"\"</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.ovesens.net/2010/03/manually-start-visual-studio-dev-web-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An Introduction to Native Concurrency in Visual Studio 2010</title>
		<link>http://blog.ovesens.net/2009/01/an-introduction-to-native-concurrency-in-visual-studio-2010/</link>
		<comments>http://blog.ovesens.net/2009/01/an-introduction-to-native-concurrency-in-visual-studio-2010/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 14:48:00 +0000</pubDate>
		<dc:creator>Mikkel Ovesen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs]]></category>
		<category><![CDATA[vs2010]]></category>

		<guid isPermaLink="false">/post/2009/01/14/An-Introduction-to-Native-Concurrency-in-Visual-Studio-2010.aspx</guid>
		<description><![CDATA[Read this article: http://blogs.msdn.com/nativeconcurrency/archive/2009/01/12/an-introduction-to-native-concurrency-in-visual-studio-2010.aspx]]></description>
			<content:encoded><![CDATA[<p>
Read this article:
</p>
<p>
<a href="http://blogs.msdn.com/nativeconcurrency/archive/2009/01/12/an-introduction-to-native-concurrency-in-visual-studio-2010.aspx">http://blogs.msdn.com/nativeconcurrency/archive/2009/01/12/an-introduction-to-native-concurrency-in-visual-studio-2010.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ovesens.net/2009/01/an-introduction-to-native-concurrency-in-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2008 &#8211; ItemTemplatesCache missing</title>
		<link>http://blog.ovesens.net/2008/11/visual-studio-2008-itemtemplatescache-missing/</link>
		<comments>http://blog.ovesens.net/2008/11/visual-studio-2008-itemtemplatescache-missing/#comments</comments>
		<pubDate>Mon, 10 Nov 2008 23:57:00 +0000</pubDate>
		<dc:creator>Mikkel Ovesen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs]]></category>
		<category><![CDATA[vs2008]]></category>

		<guid isPermaLink="false">/post/2008/11/11/Visual-Studio-2008-ItemTemplatesCache-missing.aspx</guid>
		<description><![CDATA[The issue&#160; My Visual Studio 2008 opened the solution file with no problem. However, when I was to add a new class, user control, aspx file or similar, I received the error: Could not find part of &#34;c:\Program Files\Microsoft Visual &#8230; <a href="http://blog.ovesens.net/2008/11/visual-studio-2008-itemtemplatescache-missing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h1>The issue&nbsp;</h1>
<p>
My Visual Studio 2008 opened the solution file with no problem. However, when I was to add a new class, user control, aspx file or similar, I received the error:
</p>
<p>
Could not find part of &quot;c:\Program Files\Microsoft Visual Studio 9.0\&#8230;\ItemTemplatesCache&#8230;&quot;
</p>
<p>
[and the path to the ItemTemplatesCache in Visual Studio 2008 folder].
</p>
<h1>The solution</h1>
<p>
Well, one slution would be to reinstall or repair installation of Visual studio 2008. However, after searching for a while I found a solution that is much easier:
</p>
<ol>
<li>Open &quot;Visual Studio 2008 Command Prompt&quot; as an Administrator</li>
<li>Run the command: &quot;devenv /installvstemplates&quot;</li>
<li>That&#39;s it</li>
</ol>
<p>
&nbsp;
</p>
<p>
It takes a while but it completely rebuild your item template cache if it is corrupt or completely missing like me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ovesens.net/2008/11/visual-studio-2008-itemtemplatescache-missing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How Do I: Debug ASP.NET AJAX Applications Using Visual Studio 2005?</title>
		<link>http://blog.ovesens.net/2007/09/how-do-i-debug-asp-net-ajax-applications-using-visual-studio-2005/</link>
		<comments>http://blog.ovesens.net/2007/09/how-do-i-debug-asp-net-ajax-applications-using-visual-studio-2005/#comments</comments>
		<pubDate>Sat, 29 Sep 2007 13:57:00 +0000</pubDate>
		<dc:creator>Mikkel Ovesen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs]]></category>
		<category><![CDATA[vs2005]]></category>

		<guid isPermaLink="false">/post/2007/09/29/How-Do-I-Debug-ASPNET-AJAX-Applications-Using-Visual-Studio-2005.aspx</guid>
		<description><![CDATA[Original post here: http://www.asp.net/learn/ajax-videos/video-167.aspx &#8212; In this video we learn how to use Visual Studio 2005 to debug ASP.NET AJAX applications. We are shown how the ScriptManager is used to access the JavaScript created by the ASP.NET AJAX server controls, &#8230; <a href="http://blog.ovesens.net/2007/09/how-do-i-debug-asp-net-ajax-applications-using-visual-studio-2005/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Original post here: <a title="http://www.asp.net/learn/ajax-videos/video-167.aspx" href="http://www.asp.net/learn/ajax-videos/video-167.aspx">http://www.asp.net/learn/ajax-videos/video-167.aspx</a></p>
<p>&#8212;</p>
<p>In this video we learn how to use Visual Studio 2005 to debug ASP.NET AJAX applications. We are shown how the ScriptManager is used to access the JavaScript created by the ASP.NET AJAX server controls, and we also see how to use the Sys.Debug class to insert a trace message and a breakpoint.</p>
<p>View video: <a href="/wp-content/uploads/archive/WinVideo-ASP-DebugAJAXApplicationsUsingVisualStudio2005.wmv">WinVideo-ASP-DebugAJAXApplicationsUsingVisualStudio2005.wmv (16.89 mb)</a></p>
<p><a href="/wp-content/uploads/archive/WinVideo-ASP-DebugAJAXApplicationsUsingVisualStudio2005.wmv"><img src="http://static.asp.net/asp.net/images/videos/video-167.png" alt="Play Video" width="264" height="156" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ovesens.net/2007/09/how-do-i-debug-asp-net-ajax-applications-using-visual-studio-2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using different Web.Config for development, test and production</title>
		<link>http://blog.ovesens.net/2007/09/using-different-web-config-for-development-test-and-production/</link>
		<comments>http://blog.ovesens.net/2007/09/using-different-web-config-for-development-test-and-production/#comments</comments>
		<pubDate>Fri, 21 Sep 2007 14:34:59 +0000</pubDate>
		<dc:creator>Mikkel Ovesen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs]]></category>

		<guid isPermaLink="false">/post/2007/09/21/Using-different-WebConfig-for-development-test-and-production.aspx</guid>
		<description><![CDATA[Read more here: http://weblogs.asp.net/scottgu/archive/2007/09/21/tip-trick-automating-dev-qa-staging-and-production-web-config-settings-with-vs-2005.aspx &#xA0; Or here: http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx]]></description>
			<content:encoded><![CDATA[<p>Read more here:</p>
<p><a title="http://weblogs.asp.net/scottgu/archive/2007/09/21/tip-trick-automating-dev-qa-staging-and-production-web-config-settings-with-vs-2005.aspx" href="http://weblogs.asp.net/scottgu/archive/2007/09/21/tip-trick-automating-dev-qa-staging-and-production-web-config-settings-with-vs-2005.aspx">http://weblogs.asp.net/scottgu/archive/2007/09/21/tip-trick-automating-dev-qa-staging-and-production-web-config-settings-with-vs-2005.aspx</a></p>
<p><a href="http://weblogs.asp.net/scottgu/archive/2007/09/21/tip-trick-automating-dev-qa-staging-and-production-web-config-settings-with-vs-2005.aspx"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="240" alt="image" src="/wp-content/uploads/archive/WindowsLiveWriter/Usi.Configfordevelopmenttestandproductio_CD05/image_3.png" width="244" border="0" /></a> </p>
<p>&#xA0;</p>
<p>Or here:</p>
<p><a title="http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx" href="http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx">http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx</a></p>
<p><a href="http://www.hanselman.com/blog/ManagingMultipleConfigurationFileEnvironmentsWithPreBuildEvents.aspx"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="240" alt="image" src="/wp-content/uploads/archive/WindowsLiveWriter/Usi.Configfordevelopmenttestandproductio_CD05/image_6.png" width="244" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ovesens.net/2007/09/using-different-web-config-for-development-test-and-production/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrading VS 2005 Web Site Projects to be VS 2005 Web Application Projects</title>
		<link>http://blog.ovesens.net/2007/09/upgrading-vs-2005-web-site-projects-to-be-vs-2005-web-application-projects/</link>
		<comments>http://blog.ovesens.net/2007/09/upgrading-vs-2005-web-site-projects-to-be-vs-2005-web-application-projects/#comments</comments>
		<pubDate>Fri, 21 Sep 2007 14:17:23 +0000</pubDate>
		<dc:creator>Mikkel Ovesen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs]]></category>
		<category><![CDATA[vs2005]]></category>
		<category><![CDATA[web application]]></category>

		<guid isPermaLink="false">/post/2007/09/21/Upgrading-VS-2005-Web-Site-Projects-to-be-VS-2005-Web-Application-Projects.aspx</guid>
		<description><![CDATA[Original post here: http://webproject.scottgu.com/csharp/migration2/migration2.aspx &#8212; Step 1: Create a New VS 2005 Web Application Project The best strategy to migrate an existing VS 2005 Web Site Project is to first create a new blank VS 2005 Web Application Project in &#8230; <a href="http://blog.ovesens.net/2007/09/upgrading-vs-2005-web-site-projects-to-be-vs-2005-web-application-projects/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[</p>
<p>Original post here: <a title="http://webproject.scottgu.com/csharp/migration2/migration2.aspx" href="http://webproject.scottgu.com/csharp/migration2/migration2.aspx">http://webproject.scottgu.com/csharp/migration2/migration2.aspx</a></p>
<p>&#8212;</p>
<h1>Step 1: Create a New VS 2005 Web Application Project</h1>
<p>The best strategy to migrate an existing VS 2005 Web Site Project is to first create a new blank VS 2005 Web Application Project in a separate directory. This avoids changing any of the existing web site files, and will allow us to copy in already implemented functionality. You can add this new project either to your existing solution (ideal when you have lots of other class library projects that you want to use), or by starting a new instance of Visual Studio and creating a new solution+project within it.</p>
<p>To create a new VS 2005 Web Application Project in a new solution, choose File-&gt;New Project and then select the ASP.NET Web Application Project option. If you want to add a VS 2005 Web Application Project to an existing solution right click on the solution node and select Add-&gt;New Project. Name the project whatever you want, and select the language type you want to use.</p>
<p>Once you&#8217;ve either created or added this new VS 2005 Web Application Project, delete the &quot;default.aspx&quot; and &quot;web.config&quot; that are added to it by default (since you&#8217;ll instead just want to copy in your existing ones). In this example I added the new Web Application Project to my existing solution. If you do this you&#8217;ll then be left with a blank project that looks like this:</p>
<p>&#xA0;<a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step1_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="398" alt="step1" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step1_thumb.png" width="322" border="0" /></a> </p>
<h1>Step 2: Setup Project References</h1>
<p>Before migrating any code into your new VS 2005 Web Application Project, you should first make sure to setup any project or assembly references for it. You can see the list of default references with new VS 2005 Web Application Projects under the References node above. You can right-click on the References node to add new References to the project, as well as setup project-to-project references if you have other class library projects part of the solution.</p>
<p>Once you have all of your references setup for the project, right click on the project and choose &quot;Build&quot; (or just hit Ctrl-Shift-B). This will build the project and verify that any project to project references are working.</p>
<h1>Step 3: Copy the files from the Web Site Project into the new Web Application Project</h1>
<p>The easiest way to add your existing files from a VS 2005 Web Site Project is simply select all the files in the Web Site Project copy and paste them into the New Web Application Project.</p>
<p>At this point none of the files have been converted and the directory structure looks the same as it did in the Web Site Project.</p>
<p><a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step2a_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="529" alt="step2a" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step2a_thumb.png" width="378" border="0" /></a> </p>
<p>If the Data Source Configuration Wizard is launched during the copy, cancel the dialog and allow the rest of the files to be copied.</p>
<p><a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step2aa_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="455" alt="step2aa" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step2aa_thumb.png" width="579" border="0" /></a> </p>
<p>One difference between a VS 2005 Web Site Project and a VS 2005 Web Application Project is that the VS 2005 Web Site Project Model dynamically generates the tool-generated partial class half of a page, and does not persist it on disk. The VS 2005 Web Application Project model on the other-hand does save this partial class on disk within files that have a .designer.cs extension and compiles it using the in-memory VS compilers when a build occurs (one benefit of this is faster build times). You can learn more about how this code-generation model works by reading <a href="http://webproject.scottgu.com/UnderstandingCodeBehind/UnderstandingCodeBehind.aspx">this tutorial</a>.</p>
<p>Notice how the code-behind files for each page/user-control is still associated with the .aspx, .master and .ascx content. However, no .designer.cs files have been generated.</p>
<p><a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step2c_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="132" alt="step2c" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step2c_thumb.png" width="177" border="0" /></a> </p>
<p>As part of our next step, we will be converting these pages to persist their partial class declarations on disk within a .designer.cs file.</p>
<h1>Step 4: Converting the Project Files</h1>
<p>To convert pages and classes within the project, right click the root node of the Web Application Project and select &quot;Convert to Web Application&quot;. This will cause VS 2005 to recursively examine every page, user-control, and master-page in the project and automatically generate a .designer.cs file for each, as well as change the .aspx/.ascx files to use the &quot;codebehind&quot; rather than the &quot;codefile&quot; attribute. This command will also rename App_Code to Old_App_Code. When it&#8217;s completed your project will look as follows:</p>
<p><a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step2b_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="582" alt="step2b" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step2b_thumb.png" width="306" border="0" /></a> </p>
<p>After you&#8217;ve added these files, build the project again to see if there are any compile errors. The most likely cause of errors at this stage are: a) You are missing an assembly reference, or b) You are using a dynamically generated type like the &quot;Profile&quot; object or a Typed DataSet. If you are missing an assembly reference, you should go to the reference manager and add it. If you are using a dynamically generated type, please see the Appendix of this tutorial for details on how to use it with the new VS 2005 Web Application Project option.</p>
<p><strong>VERY, VERY IMPORTANT:</strong> Because ASP.NET 2.0 tries to dynamically compile any classes it finds under the /App_Code directory of an application at runtime, you explictly *DO NOT* want to store classes that you compile as part of your VS 2005 Web Application Project under an &quot;app_code&quot; folder. If you do this, then the class will get compiled twice &#8212; once as part of the VS 2005 Web Application Project assembly, and then again at runtime by ASP.NET. The result will most likely be a &quot;could not load type&quot; runtime exception &#8212; caused because you have duplicate type names in your application. Instead, you should store your class files in any other directory of your project other than one named &quot;app_code&quot;. This will be handled automatically by the &quot;Convert to Web Applicaiton&quot; command. This command will rename the folder Old_App_Code. </p>
<h1>Step 5: Running the Site</h1>
<p>Once you have completed the above steps, you should be able to cleanly compile and run your application. By default it will use the built-in VS Web Server (aka Cassini) to run the site. You can alternatively configure the project to use IIS instead. To manage these settings, right-click on the project and pull up its project properties. You can then select the &quot;Web&quot; tab to configure these runtime settings:</p>
<p><a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step9_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="615" alt="step9" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step9_thumb.png" width="756" border="0" /></a> </p>
<h1>Step 6: Optionally Adding Namespaces</h1>
<p>By default, pages and classes built within the VS 2005 Web Site Project option are not automatically added using a code namespace. Pages/Controls/Classes built using the VS 2005 Web Application Project option, on the other hand, do &#8212; so new pages/classes you add will by default have namespaces.</p>
<p>You can easily add namespaces in code to existing classes within VS using the &quot;Surround With&quot; context menu command in the C# code editor. Simply select a class (or multiple classes) in the source editor, then right click and select &quot;Surround With-&gt;Namespace&quot; option:</p>
<p><a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step10_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="390" alt="step10" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step10_thumb.png" width="608" border="0" /></a> <a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step11_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="390" alt="step11" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step11_thumb.png" width="608" border="0" /></a> <a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step12_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="436" alt="step12" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step12_thumb.png" width="625" border="0" /></a> </p>
<p>Note that .aspx, .ascx, .master, .ashx, .asmx, and .asax files contain &quot;inherits=&quot; or &quot;class=&quot; attributes that list the class names they should invoke. So if you add namespaces to the code-behind files of these types you will also want/need to update the inherits and class declarations to also contain the namespace you use. For example: a Details.aspx page would need to have its page directive changed from &quot;inherits=Details_aspx&quot; to &quot;inherits=WebApplication5.Details_aspx&quot;</p>
<p>One easy way to bulk edit the namespace is to use Edit-&gt;Find and Replace command to find all <i>inherits=&quot;</i> strings and change them to <i>inherits=&quot;WebApplication.</i> (note the trailing &quot;.&quot; &#8212; which will be prepended before the previous class name). </p>
<h1>Appendix 1: Migrating Declarative Typed DataSets (.xsd files)</h1>
<p>If you have <a href="http://weblogs.asp.net/scottgu/archive/2006/01/15/435498.aspx">Strongly Typed DataSets</a> under the App_Code directory in your VS 2005 Web Site Project, then you need to make an additional change to fixup the connection string in web.config. </p>
<p>Specifically, you need to open each DataSet in the Data Designer and select each TableAdapter and re-set the connectionstring for the object (you can do this by selecting the TableAdapter in the designer and then changing the &quot;ConnectionString&quot; property in the propertygrid).</p>
<h1>Appendix 2: Migrating Code that works with the ASP.NET 2.0 Profile Object</h1>
<p>ASP.NET 2.0 adds support for a new feature called &quot;Profile Personalization&quot;. This enables developers to easily store and retrieve profile data about a user visiting the site within a personalization database. With VS 2005 Web Site Projects, ASP.NET automatically adds a strongly typed &quot;Profile&quot; object to each page in the project that provides a strongly-typed mapping of all properties defined within the &quot;profile&quot; section of the application&#8217;s web.config file. Developers can then get intellisense against this, and automatically save/retrieve values from it. For example, if an application&#8217;s web.config file had this section in it:</p>
<p><a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step17_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="104" alt="step17" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step17_thumb.png" width="587" border="0" /></a> </p>
<p>Then developers could write this code within their pages to save/retrieve &quot;Teachers&quot; information:</p>
<p><a href="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step18_2.png"><img id="id" style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="330" alt="step18" src="/wp-content/uploads/archive/WindowsLiveWriter/UpgradingVS2005WebSiteProjectstobeVS2005_C8E5/step18_thumb.png" width="527" border="0" /></a> </p>
<p>This is supported because with the VS 2005 Web Site Project option Visual Studio is dynamically creating and adding a &quot;ProfileCommon&quot; class named &quot;Profile&quot; into every code-behind instance.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ovesens.net/2007/09/upgrading-vs-2005-web-site-projects-to-be-vs-2005-web-application-projects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Line numbers in code view in VS2005</title>
		<link>http://blog.ovesens.net/2007/09/line-numbers-in-code-view-in-vs2005/</link>
		<comments>http://blog.ovesens.net/2007/09/line-numbers-in-code-view-in-vs2005/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 14:51:00 +0000</pubDate>
		<dc:creator>Mikkel Ovesen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs]]></category>
		<category><![CDATA[vs2005]]></category>

		<guid isPermaLink="false">/post/2007/09/19/Line-numbers-in-code-view-in-VS2005.aspx</guid>
		<description><![CDATA[Open Visual Studio 2005. Then go to Tools -&#62; Options. Select &#34;Text Editor&#34; and the language you want to change the setting for.]]></description>
			<content:encoded><![CDATA[<p>
Open Visual Studio 2005. Then go to Tools -&gt; Options. Select &quot;Text Editor&quot; and the language you want to change the setting for.
</p>
<p>
<a href="/image.axd?picture=WindowsLiveWriter/LinenumbersincodeviewinVS2005_D0EB/image_2.png"><img style="border-width: 0px" src="/image.axd?picture=WindowsLiveWriter/LinenumbersincodeviewinVS2005_D0EB/image_thumb.png" border="0" alt="image" width="244" height="143" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ovesens.net/2007/09/line-numbers-in-code-view-in-vs2005/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VS2005 &#8211; Open folder or file in Explorer</title>
		<link>http://blog.ovesens.net/2007/09/vs2005-open-folder-or-file-in-explorer/</link>
		<comments>http://blog.ovesens.net/2007/09/vs2005-open-folder-or-file-in-explorer/#comments</comments>
		<pubDate>Wed, 19 Sep 2007 14:24:00 +0000</pubDate>
		<dc:creator>Mikkel Ovesen</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[vs]]></category>
		<category><![CDATA[vs2005]]></category>

		<guid isPermaLink="false">/post/2007/09/19/VS2005-Open-folder-or-file-in-Explorer.aspx</guid>
		<description><![CDATA[Sometimes you just need to open the website you are working on in VS2005 in Explorer. Well here is the trick of how to do it. Download and install the following - Download Explorer add-in for VS2005 or read more &#8230; <a href="http://blog.ovesens.net/2007/09/vs2005-open-folder-or-file-in-explorer/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>
Sometimes you just need to open the website you are working on in VS2005 in Explorer.
</p>
<p>
<img src="http://www.csharper.net/resources/blog_media/explore_in_windows_screen.gif" alt="" width="240" height="84" />
</p>
<p>
Well here is the trick of how to do it. Download and install the following
</p>
<p>
- <a href="http://www.csharper.net/download.aspx?f=ExploreInWindowsSetup.exe" title="d">Download Explorer add-in for VS2005</a>
</p>
<p>
or read more about here
</p>
<p>
<a href="http://www.csharper.net/blog/_explore_in_windows__add_in_for_visual_studio_2005.aspx">http://www.csharper.net/blog/_explore_in_windows__add_in_for_visual_studio_2005.aspx</a>
</p>
<p>
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ovesens.net/2007/09/vs2005-open-folder-or-file-in-explorer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

