I’ve referenced the following libraries I acquired from this CodeProject article:
- Google.GData.AccessControl
- Google.GData.Calendar
- Google.GData.Client
- Google.GData.Extensions
I was able to successfully build & run the sample project. I then referenced the libraries in my own project (.NET 4.0 C# WinForms app). I used Intellisense to add the using statements (type the class name, then hover over the type and pick “Add ‘using Google.GData.Calendar'”. Great. Intellisense correctly found all types from the above libraries, and the Go To Definition header generator works as well.
I then tried to run my project and the build failed marking every class contained within the Google libraries as not found. Couldn’t find any of the classes or the namespaces specified in the using statements Intellisense added. I can delete the libraries from my References and re-add them, and Intellisense finds everything. I then build again, and the compiler loses them. I’ve seen plenty of cases where Intellisense is wrong but the compiler figures it out, but never the opposite. First time for everything, I guess. Any ideas?
It’s because the DLL bundled in the zip file were compiled for .NET 2.0.
You have two choices
1) Change your WinForm app to compile against .NET 2.0. That means you cannot use any .NET 4.0 features
2) The zip file also comes with the source code. So, recompile the DLL and target the new DLL to .NET 4.0 platform.