Hi,
I am using Google Adwords Api for LXRPlugin[Excel AddIn] in visual studio
2017 c# project.
The visual studio solution contains GoogleAPIIntraction as the main project.
The solution runs successfully before .exe file is packaged.
After creating .exe file and installing the setup file I am getting the
error.
I am not able to debug the .exe project step by step, but In log file
following messages are shown in the build.
DownloadDllFiles() An exception occurred during a WebClient request.
DownloadXMLFiles() An exception occurred during a WebClient request.
Clicked on Add account button
selectd package type:agency
Adword autherization login form
I am sharing the code for DownloadDllFiles and DownloadXMLFiles.
private void DownloadDllFiles()
{
List<string> dllFiles = new List<string> {
"Google.Ads.Common.dll", "Google.AdWords.dll" };
//"Google.Apis.Analytics.v3.dll", "Google.Apis.Auth.dll",
"Google.Apis.Auth.PlatformServices.dll", "Google.Apis.Core.dll",
"Google.Apis.dll", "Google.Apis.PlatformServices.dll" };
string strAppDir =
Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
strAppDir = strAppDir.Remove(0, 6);
System.Net.WebClient wc = new System.Net.WebClient();
foreach (var dll in dllFiles)
{
string filePath = strAppDir + dll;
try
{
wc.DownloadFile(Globals.ThisAddIn.LXRXMLFilePath + dll,
filePath);
}
catch (Exception ex) {
LogWriter.Instance.CreateEntry("DownloadDllFiles() " + ex.Message); }
}
}
private void DownloadXMLFiles()
{
List<string> xmlFiles = new List<string> {
"ACCOUNT_PERFORMANCE_REPORT.xml", "ADGROUP_PERFORMANCE_REPORT.xml",
"AD_EXTENSIONS_PERFORMANCE_REPORT.xml",
"AD_PERFORMANCE_REPORT.xml", "AGE_RANGE_PERFORMANCE_REPORT.xml",
"AUDIENCE_PERFORMANCE_REPORT.xml",
"AUTOMATIC_PLACEMENTS_PERFORMANCE_REPORT.xml",
"CALL_METRICS_CALL_DETAILS_REPORT.xml",
"CAMPAIGN_NEGATIVE_KEYWORDS_PERFORMANCE_REPORT.xml",
"CAMPAIGN_NEGATIVE_PLACEMENTS_PERFORMANCE_REPORT.xml",
"CAMPAIGN_PERFORMANCE_REPORT.xml",
"DISPLAY_KEYWORD_PERFORMANCE_REPORT.xml", "FINAL_URL_REPORT.xml",
"GENDER_PERFORMANCE_REPORT.xml",
"GEO_PERFORMANCE_REPORT.xml",
"KEYWORDLESS_QUERY_REPORT.xml","ANALYTICS_QUERY_COLUMNS.xml",
"KEYWORDS_PERFORMANCE_REPORT.xml",
"SEARCH_QUERY_PERFORMANCE_REPORT.xml","PAID_ORGANIC_QUERY_REPORT.xml" };
string strAppDir =
Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
strAppDir = strAppDir.Remove(0, 6);
strAppDir = Path.Combine(strAppDir + "\\Xmls\\");
System.Net.WebClient wc = new System.Net.WebClient();
foreach (var xml in xmlFiles)
{
string filePath = strAppDir + xml;
try
{
wc.DownloadFile(Globals.ThisAddIn.LXRXMLFilePath + xml,
filePath);
}
catch (Exception ex) {
LogWriter.Instance.CreateEntry("DownloadXMLFiles() " + ex.Message); }
}
}
The following message is shown in log file when i select Google Analytics.
Ribbon button1_Click Could not load file or assembly 'Google.Apis.Core,
Version=1.33.1.0, Culture=neutral, PublicKeyToken=4b01fa6e34db77ab' or one
of its dependencies. The located assembly's manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040).
On Tuesday, October 30, 2018 at 4:39:37 PM UTC+5:30,
[email protected] wrote:
>
> I am using Google adwords Api for Excel addin in visual studio 2017.
> Unable to load account after button click event after creating .exe file
> for the project.
>
> After creating .exe file for the project and installing the set up
> file.The setup file shows this unhandled exception.
>
> The solution runs successfully before packaged as .exe file
>
> Object reference not set to an instance of an object.
>
>
>
>
> ************** Exception Text **************
> System.NullReferenceException: Object reference not set to an instance of
> an object.
> at GoogleAPIIntraction.LXRAccount.btnaddaccount_Click(Object sender,
> EventArgs e)
> at System.Windows.Forms.Control.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnClick(EventArgs e)
> at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
> at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
> button, Int32 clicks)
> at System.Windows.Forms.Control.WndProc(Message& m)
> at System.Windows.Forms.ButtonBase.WndProc(Message& m)
> at System.Windows.Forms.Button.WndProc(Message& m)
> at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
> IntPtr wparam, IntPtr lparam)
>
>
>
> CONFIDENTIALITY INFORMATION AND DISCLAIMER
>
> This email message and its attachments may contain confidential,
> proprietary or legally privileged information and is intended solely for
> the use of the individual or entity to whom it is addressed. If you have
> erroneously received this message, please delete all copies of it
> immediately and notify the sender. If you are not the intended recipient of
> the email message you should not disseminate, distribute or copy this
> e-mail. E-mail transmission cannot be guaranteed to be secure or error-free
> as information could be intercepted, corrupted, lost, destroyed, incomplete
> or contain viruses and NetElixir accepts no liability for any damage caused
> by the limitations of the e-mail transmission. Thank you for your
> cooperation.
>
>
--
CONFIDENTIALITY INFORMATION AND DISCLAIMER
This email message and
its attachments may contain
confidential, proprietary or legally privileged
information and is intended
solely for the use of the individual or entity
to whom it is addressed. If you
have erroneously received this message,
please delete all copies of it
immediately and notify the sender. If you
are not the intended recipient of the
email message you should not
disseminate, distribute or copy this e-mail.
E-mail transmission cannot be
guaranteed to be secure or error-free as information
could be intercepted,
corrupted, lost, destroyed, incomplete or contain viruses
and NetElixir
accepts no liability for any damage caused by the limitations of
the e-mail
transmission. Thank you for your cooperation.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/ea2cebb5-a7ec-4eae-8394-6071fb2a9917%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.