I'm trying to import VS2010 Project into MonoDevelop. I updated it to version 4.3.0 so I get usual
/usr/lib/mono/4.0/Microsoft.Common.targets: Warning: Unable to find framework corresponding to the target framework moniker '.NETFramework,Version=v4.0,Profile=Client'. Framework assembly references will be resolved from the GAC, which might not be the intended behavior. (SlkRepair)
as a warning. However, I was faced with this error:
'SlkRepair/SlkRepair/SlkLib.cs(28,28): Error CS1110: 'SlkRepair.RegexEx.ContainsAny(this string, params char[])': Extension methods require 'System.Runtime.CompilerServices.ExtensionAttribute' type to be available. Are you missing an assembly reference? (CS1110) (SlkRepair)
The code for ContainsAny function:
public static class RegexEx
{
public static bool ContainsAny(this string s, params char[] chars)
{
bool result = false;
foreach (char c in chars)
{
result |= s.Contains(c);
if (result)
break;
}
return result;
}
}
My project has such assembly references:
- System
- System.Core
- System.Data
- System.Data.DataSetExtensions
- System.Xml
- System.Xml.Linq
Trying to add Reference in Edit References doesn't help – I can't find it. Can anyone explain what Reference and how should I add? I'm a novice with MonoDevelop.