Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google.Apis.Services.BaseClientService' is defined in an assembly that is not referenced (Google Analytics) #331

Closed
GoogleCodeExporter opened this issue Apr 14, 2015 · 7 comments
Assignees

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create Sharepoint 2010 Console app
2. Add references to the latest stable release binary Google files
3. Build 


What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?

The type 'Google.Apis.Services.BaseClientService' is defined in an assembly 
that is not referenced. You must add a reference to assembly 'Google.Apis, 
Version=1.3.0.15233, Culture=neutral, 
PublicKeyToken=null'.   C:\Users\khodzhaa\Documents\Visual Studio 
2010\Projects\SP_ANALYTICS_APP\Analytics\GoogleAnalyticsHandler.cs  30  41  SP_ANAL
YTICS_APP
. You must add a reference to assembly 'Google.Apis, Version=1.3.0.15233, 
Culture=neutral, PublicKeyToken=null'.


Version of Google.Apis.dll referenced is 1.3.0.15233

Please provide any additional information below.

private static AnalyticsService AuthenticateInfo()
{

            string scopeUrl = "";// ConfigurationManager.AppSettings.Get("scopeUrl");
            string clientEmailId = "";//  ConfigurationManager.AppSettings.Get("clientEmailId");
            string keyFile = "";//  ConfigurationManager.AppSettings.Get("keyFile");
            string keyPass = "";//  ConfigurationManager.AppSettings.Get("keyPass");
            var desc = GoogleAuthenticationServer.Description;
            var key = new X509Certificate2(keyFile, keyPass, X509KeyStorageFlags.Exportable);

            var client = new AssertionFlowClient(desc, key) { ServiceAccountId = clientEmailId, Scope = scopeUrl };
            var auth = new OAuth2Authenticator<AssertionFlowClient>(client, AssertionFlowClient.GetState);
            BaseClientService.Initializer Initializer = new BaseClientService.Initializer();
            var gas = new AnalyticsService(new BaseClientService.Initializer()
            {
                Authenticator = auth,
                ApiKey = ""
            });
            return gas;

//             var auth = new 
OAuth2Authenticator<NativeApplicationClient>(provider, GetAuthentication);
//var service = new XXXService(new BaseClientService.Initializer()
//{
//Authenticator = auth,
//ApiKey = “[DEVELOPER_KEY_HERE]”
//});
        }


Original issue reported on code.google.com by mansur1...@hotmail.com on 28 May 2013 at 7:57

@GoogleCodeExporter
Copy link
Author

Can you please also attach the content of your project file?
It will be very helpful to try understand what's happening here.


Thanks,
Eyal

Original comment by pele...@google.com on 29 May 2013 at 3:46

  • Changed state: Accepted
  • Added labels: Component-Api

@GoogleCodeExporter
Copy link
Author

Original comment by pele...@google.com on 29 May 2013 at 3:47

@GoogleCodeExporter
Copy link
Author

Hi Eyal,

attached is SharePoint 2010 Console App (C#).
I'm getting build error in GoogleAnalyticsHandler.cs

Original comment by mansur1...@hotmail.com on 29 May 2013 at 6:54

Attachments:

@GoogleCodeExporter
Copy link
Author

Why google analytics dll isn't signed like all the other dlls you have 
reference to?
Is it in purpose?

Original comment by pele...@google.com on 30 May 2013 at 2:41

@GoogleCodeExporter
Copy link
Author

I signed all Google dlls with this code

ILDASM Google.XXXXX.dll /out:Google.XXXXX.il
ILASM Google.XXXXX.il /dll /resource=Google.XXXXX.res 
/key=MyCertificate-publickey.snk

The only dll that gave me FAILURE result on signing was 
Google.Apis.Analytics.v3.dll 

Original comment by mansur1...@hotmail.com on 30 May 2013 at 4:55

@GoogleCodeExporter
Copy link
Author

what is the failure? I don't have enough experience with signing but it looks 
like you need to sign it as well to make it work

Original comment by pele...@google.com on 30 May 2013 at 6:02

@LindaLawton
Copy link
Collaborator

Cleanup Question is 2 years old and probably relates back to issue #238

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
@jskeet jskeet removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants