eydjey / google-api-dotnet-client

Automatically exported from code.google.com/p/google-api-dotnet-client
Apache License 2.0
0 stars 0 forks source link

Some samples will not compile in MonoDevelop 2.6 #152

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Checkout samples source from repo
2.Load the mono sln in MonoDevelop (get errors related to other .csproj files, 
ignore these)
3.Attempt to compile "Tasks.SimpleOAuth2"

What is the expected output? What do you see instead?
Will not compile, throws an error pointing at the line:
using Google.Apis.Tasks.v1.Data;
"/home/me/Projects/google-api-dotnet-client.samples/Tasks.SimpleOAuth2/Program.c
s(28,28): Error CS0234: The type or namespace name `Data' does not exist in the 
namespace `Google.Apis.Tasks.v1'. Are you missing an assembly reference? 
(CS0234) (Tasks.SimpleOAuth2)"

However when viewing the "Google.Apis.Tasks.v1.dll" reference in the Assembly 
Browser I can see the "Google.Apis.Tasks.v1.Data" namespace just fine. Tried 
compiling the sample in VS2010, had no issues. Also tried in MonoDevelop 2.4 
with Mono 2.6.7 (bundled versions with Natty's repos), it also won't compile 
and complains about the CLR version. I am guessing that is expected though.

There are a few other projects throwing errors related to the Task reference, 
but a whole lot more concerning all kinds of other things. 47 errors in total 
for all of the samples. Again these compile flawlessly in VS2010.

What version of the product are you using? On what operating system?
Ubuntu 11.04
Mono 2.10.5
MonoDevelop 2.6

Mono and MonoDevelop builds are from this ppa: 
https://launchpad.net/~ermshiperete/+archive/monodevelop

google-api-dotnet-client src hg changeset 26:e75059fd6696

Am not truly interested in all of the other samples, but I would have figured 
the basic OAuth2 sample should work with Mono out of the box.

Original issue reported on code.google.com by nsch...@gmail.com on 28 Sep 2011 at 6:55

GoogleCodeExporter commented 9 years ago
I can confirm this issue. It does not only affect the Tasks API, but affect 
every sample though. I assume the libraries are compiled in a way the mono 
2.10.5 compiler does not like (not as pure .NET 3.5 assemblies maybe?)

One (temporary) workaround I found is to use the Google.Apis.Tasks.v1.cs 
instead of the .dll -- This will compile fine.

The ServiceGenerator project, which is still included in the _mono.sln, should 
also be removed as it was moved to the core library some time ago.

Original comment by mlinder...@gmail.com on 7 Oct 2011 at 8:43

GoogleCodeExporter commented 9 years ago

Original comment by asky...@google.com on 27 Oct 2011 at 5:40

GoogleCodeExporter commented 9 years ago
If the references are removed and added back, this works fine.

Original comment by asky...@google.com on 7 Nov 2011 at 10:01

GoogleCodeExporter commented 9 years ago

Original comment by asky...@google.com on 8 Nov 2011 at 2:56