我想将VS2010项目导入MonoDevelop。我将它更新到版本4.3.0,所以我照惯例在MonoDevelop VS项目迁移错误
/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)
作为警告。然而,我却遇到了这样的错误:
'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)
为ContainsAny
函数的代码:
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;
}
}
我的项目有这样的程序集引用:
- 系统
- System.Core程序
- System.Data 个
- System.Data.DataSetExtensions
- 的System.Xml
- System.Xml.Linq的
试图增加在参考文献编辑没有帮助 - 我无法找到它。 任何人都可以解释什么参考和我应该如何添加?我是MonoDevelop的新手。你需要首先解决的Visual Studio的侧
谢谢!不过,它确实是4.0,所以我只是把平台变成了完整版。它建立。 – Danatela