<?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>Codepolice.net &#187; .net</title>
	<atom:link href="http://codepolice.net/tag/net/feed/" rel="self" type="application/rss+xml" />
	<link>http://codepolice.net</link>
	<description>C#, ASP.NET, MVC, LINQ, Wordpress and stuff like that</description>
	<lastBuildDate>Mon, 26 Jul 2010 08:58:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Problems with MSBUILD tasks after playing with Visual Studio 2010</title>
		<link>http://codepolice.net/2010/02/22/problems-with-msbuild-tasks-after-playing-with-visual-studio-2010/</link>
		<comments>http://codepolice.net/2010/02/22/problems-with-msbuild-tasks-after-playing-with-visual-studio-2010/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 11:16:46 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[MSBuild]]></category>
		<category><![CDATA[visual studio 2010]]></category>
		<category><![CDATA[vs2010]]></category>

		<guid isPermaLink="false">http://codepolice.net/?p=225</guid>
		<description><![CDATA[I use a custom MSBUILD xml file to build some of my projects so that i can run stuff to compress CSS/JS files and stuff like that. After installing Visual Studio 2010 and playing around a bit with suddenly my builds started to fail. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(132,11): error MSB4064: The "Retries" parameter is not supported [...]]]></description>
			<content:encoded><![CDATA[<p>I use a custom MSBUILD xml file to build some of my projects so that i can run stuff to compress CSS/JS files and stuff like that. After installing Visual Studio 2010 and playing around a bit with suddenly my builds started to fail.</p>
<pre class="brush:shell">C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(132,11):
error MSB4064: The "Retries" parameter is not supported by the "Copy" task. Verify the parameter exists on the task, and it is a settable public instance property.
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(130,5):
error MSB4063: The "Copy" task could not be initialized with its input parameters.</pre>
<p>After some debugging i realized that Visual Studio 2010 had changed a line in the csproj file of my web application project.</p>
<p><strong>From: </strong></p>
<p><strong>To: </strong></p>
<p>I just had to change this line back to v9.0 to get it to work again. Hopefully this can help someone that has the same problem as me.</p>
<h3>UPDATE!</h3>
<p>Now when the RTM of Visual Studio was released i of course ran into this problem again. This time i tried to find a better solution and found this <a href="http://devlicio.us/blogs/derik_whittaker/archive/2010/02/27/issues-compiling-vs2010-solutions-with-web-projects-from-nant.aspx">post on devlicio</a>. In the comments to that post i found a solution that worked great for me.</p>
<blockquote><p>I had the same issue. I had to alter the MSbuild WebApplication file  located: C:\Program Files  (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications and remove  these entries.</p>
<p>Retries=&#8221;$(CopyRetryCount)&#8221;</p>
<p>and          RetryDelayMilliseconds=&#8221;$(CopyRetryDelayMilliseconds)&#8221;</p>
<p>Once both of these were removed (in 13 places) everything worked  fine. Hope it helps you too.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2010/02/22/problems-with-msbuild-tasks-after-playing-with-visual-studio-2010/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Convert String Array to Int Array and vice versa in C#</title>
		<link>http://codepolice.net/2009/11/07/convert-string-array-to-int-array-and-vice-versa-in-c/</link>
		<comments>http://codepolice.net/2009/11/07/convert-string-array-to-int-array-and-vice-versa-in-c/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 15:35:17 +0000</pubDate>
		<dc:creator>Ola</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[int]]></category>
		<category><![CDATA[int array]]></category>
		<category><![CDATA[string]]></category>
		<category><![CDATA[string array]]></category>

		<guid isPermaLink="false">http://codepolice.net/?p=181</guid>
		<description><![CDATA[Sometimes you want to convert arrays back and forth. This is to nice extension methods to convert a int array into a string array and vice versa. public static class ExtensionMethods { public static string[] ToStringArray(this int[] intArray) { return Array.ConvertAll&#60;int, string&#62;(intArray, delegate(int intParameter) { return intParameter.ToString(); }); } public static int[] ToIntArray(this string[] strArray) [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes you want to convert arrays back and forth. This is to nice extension methods to convert a int array into a string array and vice versa.</p>
<pre class="brush:c#">public static class ExtensionMethods {

  public static string[] ToStringArray(this int[] intArray) {
   return Array.ConvertAll&lt;int, string&gt;(intArray, delegate(int intParameter) { return intParameter.ToString(); });
  }

  public static int[] ToIntArray(this string[] strArray) {
   return Array.ConvertAll&lt;string, int&gt;(strArray, delegate(string intParameter) { return int.Parse(intParameter.ToString()); });
  }
}</pre>

]]></content:encoded>
			<wfw:commentRss>http://codepolice.net/2009/11/07/convert-string-array-to-int-array-and-vice-versa-in-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->