Posts Tagged ‘.net’

Problems with MSBUILD tasks after playing with Visual Studio 2010

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 by the [...]

Convert String Array to Int Array and vice versa in C#

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<int, string>(intArray, delegate(int intParameter) { return intParameter.ToString(); });
}

public static [...]