Bug 10428 - Unknown Resolve Error
Summary: Unknown Resolve Error
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: Trunk
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Mike Krüger
URL:
Depends on:
Blocks:
 
Reported: 2013-02-19 05:40 UTC by Marek Safar
Modified: 2013-04-19 01:12 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Marek Safar 2013-02-19 05:40:34 UTC
using System;
using System.Threading.Tasks;

class A
{
	public Task OpenAsync ()
	{
		return null;
	}
}

class C
{
	public static void Main ()
	{
	}
	
	public A Connection {
		get {
			return null;
		}
	}
	
	async void Foo ()
	{
		{
			await Test ( // Hover over Test you gen Unknown resolve error
				async () => {
					await Connection.OpenAsync ();
			});
		}
	}
	
	T Test<T> (Func<T> func)
	{
		return default (T);
	}
}
Comment 1 Mike Krüger 2013-02-19 05:44:00 UTC
doesn't even compile
Comment 2 Marek Safar 2013-02-19 05:51:04 UTC
Compiles successfully for me. What error do you get?
Comment 3 Mike Krüger 2013-02-19 05:58:55 UTC
/Library/Frameworks/Mono.framework/Versions/2.10.11/bin/dmcs /noconfig "/out:/Users/mkrueger/Projects/BugTest/BugTest/bin/Debug/BugTest.exe" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/System.Core.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.11/lib/mono/4.0/Microsoft.CSharp.dll" /nologo /warn:4 /debug:full /optimize- /codepage:utf8 /platform:x86 "/define:DEBUG"  /t:exe "/Users/mkrueger/Projects/BugTest/BugTest/Main.cs" "/Users/mkrueger/Projects/BugTest/BugTest/AssemblyInfo.cs" 
Compilation failed: 4 error(s), 0 warnings

/Users/mkrueger/Projects/BugTest/BugTest/Main.cs(24,14): error CS1519: Unexpected symbol `void' in class, struct, or interface member declaration
/Users/mkrueger/Projects/BugTest/BugTest/Main.cs(27,23): error CS1525: Unexpected symbol `(', expecting `,', `;', or `='
/Users/mkrueger/Projects/BugTest/BugTest/Main.cs(30,13): error CS1525: Unexpected symbol `)', expecting `,', `;', or `='
/Users/mkrueger/Projects/BugTest/BugTest/Main.cs(34,4): error CS1525: Unexpected symbol `T'
Comment 4 Marek Safar 2013-02-19 06:00:04 UTC
Well, it's async code. You need Mono 3.0 and target 4.5 profile
Comment 5 Mike Krüger 2013-02-19 06:01:27 UTC
I hope I can switch to mono 3 for development some day ...
Comment 6 Mike Krüger 2013-02-25 04:55:01 UTC
fixed.
Comment 7 Sergey Khabibullin 2013-04-19 01:12:15 UTC
The same error message for namespaces (monodevelop 4.0, Linux)

For example download the xunit solution https://xunit.codeplex.com/SourceControl/BrowseLatest. Then open it and find the ExecutorWrapper.cs in xunit.runner.utility project.

In my case the following statements are highlighted by red.

using System.Globalization;
using System.Reflection;

The error is "Unknown resolve error". All classes and interfaces from those namespaces are highlighted too. But the project compiles fine.