2014-04-09 2 views
1

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의 초심자입니다. 당신은 비주얼 스튜디오 측에서 먼저 수정해야

답변

2

두 가지 문제가

  1. 모노 클라이언트 프로파일을 지원하지 않습니다이다. 따라서 Visual Studio에서 클라이언트 프로파일 대신 전체 프로파일을 사용해야합니다.

  2. 사용하는 Mono 런타임 (MonoDevelop 아님)이 .NET 4.5를 지원하기에는 너무 오래되어서 ExtensionAttribute 예외가 발생합니다. 적어도 Mono 3.2.8을 사용해야합니다. 갖고 계신 Mono 버전을 확인 하시려면 터미널 실행 mono --version에서 간단히 확인하십시오. 4.5 기능을 사용하지 않으면 프로젝트를 .NET 4로 다운 그레이드 할 수도 있습니다.

+0

고마워요! 그러나 실제로 4.0 이었기 때문에 플랫폼을 완전히 풀었습니다. 그리고 그것을 구축합니다. – Danatela

관련 문제