[Mono-bugs] [Bug 671537] New: monodroid : error 1: Mono.Linker.ResolutionException: Can not resolve reference: System.Func`2"
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sat Feb 12 12:54:32 EST 2011
https://bugzilla.novell.com/show_bug.cgi?id=671537
https://bugzilla.novell.com/show_bug.cgi?id=671537#c0
Summary: monodroid : error 1: Mono.Linker.ResolutionException:
Can not resolve reference: System.Func`2"
Classification: Mono
Product: MonoDroid
Version: SVN
Platform: Other
OS/Version: Windows 7
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Class Libraries
AssignedTo: mkestner at novell.com
ReportedBy: marcio at cialogica.com.br
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-us)
AppleWebKit/533.19.4 (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4
After trying to compile a project in P12, I get a "monodroid : error 1:
Mono.Linker.ResolutionException: Can not resolve reference: System.Func`2" that
didn't happen in P11.2.
I could track down the problem to the line where it causes the error, it's a
LINQ expression:
var usuarios = from Obj_Usuario usuario in BancoSqo.Banco
where usuario.User_Codigo ==
Convert.ToInt32(Codigo)
select usuario;
Output:
C:\Program Files\MSBuild\Novell\monodroid.exe -v --nosign
--sdk-dir="C:\Programas\android-sdk-r08"
--builddir="M:\Projects\TesteDroid\obj\Debug\android"
--framework-dir="C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoDroid\v2.2" --framework-dir="C:\Program
Files\Reference Assemblies\Microsoft\Framework\MonoDroid\v1.0"
-S="M:\Projects\TesteDroid\obj\Debug\res" --package="testedroid.testedroid"
--noshared --abi="armeabi;armeabi-v7a" --java-sdk-dir="C:\Program
Files\Java\jdk1.6.0_21" --debug
--manifest-template="M:\Projects\TesteDroid\Properties\AndroidManifest.xml"
--sdk-platform="8" "M:\Projects\TesteDroid\bin\Debug\TesteDroid.dll"
"C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoDroid\v2.2\Mono.Android.dll" "C:\Program
Files\Reference
Assemblies\Microsoft\Framework\MonoDroid\v1.0\Mono.Data.Sqlite.dll" "C:\Program
Files\Reference Assemblies\Microsoft\Framework\MonoDroid\v1.0\mscorlib.dll"
"M:\Shared\Bibliotecas\MonoDroid\SiaqodbMonoDroid.dll" "C:\Program
Files\Reference Assemblies\Microsoft\Framework\MonoDroid\v1.0\System.Core.dll"
"C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoDroid\v1.0\System.Data.dll" "C:\Program
Files\Reference Assemblies\Microsoft\Framework\MonoDroid\v1.0\System.dll"
"C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoDroid\v1.0\System.Xml.dll"
monodroid : error 1: Mono.Linker.ResolutionException: Can not resolve
reference: System.Func`2
at Mono.Linker.Steps.MarkStep.ResolveTypeDefinition(TypeReference type)
at
Mono.Linker.Steps.MarkStep.GetGenericProviderFromInstance(IGenericInstance
instance)
at
Mono.Linker.Steps.MarkStep.MarkGenericArgumentConstructors(IGenericInstance
instance)
at Mono.Linker.Steps.MarkStep.MarkGenericArguments(IGenericInstance
instance)
at Mono.Linker.Steps.MarkStep.GetOriginalType(TypeReference type)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkGenericArguments(IGenericInstance
instance)
at Mono.Linker.Steps.MarkStep.GetOriginalType(TypeReference type)
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext&
context, List`1& assemblies)
at Monodroid.Scanner.LinkAssemblies(Arguments args, List`1& assemblies)
at Monodroid.Droidinator.CreateApk()
at Monodroid.MainClass.Main(String[] argv)
Build FAILED.
Time Elapsed 00:00:04.89
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
Also, I tried this:
int codigo = Convert.ToInt32(Codigo);
var usuarios = from Obj_Usuario usuario in BancoSqo.Banco
where usuario.User_Codigo == codigo
select usuario;
It doesn't work either. Then I tested with the actual number:
var usuarios = from Obj_Usuario usuario in BancoSqo.Banco
where usuario.User_Codigo == 1
select usuario;
The error is the same. I had to reinstall P11.2 and now it works fine again.
Reproducible: Always
Steps to Reproduce:
1. Just use any LINQ expression like I mentioned and the compilation fails.
2.
3.
Already posted on MonoDroid list.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list