I'm getting a binding error when using the dot net library that i dont
know how to solve. I compiled the library as is, tested some of the
examples that come with it, all of this succesfully. Then I tried to
use it from my main project. I'm doing so by adding a reference to the
generated assembly (google-api-adwords-dotnet.dll).

I've also updated the app.config of my application adding the
necessary fields for the adwords library, namely:

<?xml version="1.0"?>
<configuration>
      <section name="AdWordsApi"
 
type="com.google.api.adwords.lib.ApplicationConfiguration,google-api-
adwords-dotnet"/>
    </configSections>
<startup><supportedRuntime version="v2.0.50727"/></startup>
  <AdWordsApi>
    <!-- Change the appropriate flags to turn on SOAP logging. -->
    <add key="LogPath" value="C:\Logs\"/>
    <add key="LogToConsole" value="false"/>
    <add key="LogToFile" value="false"/>
    <add key="MaskCredentials" value="true"/>

    <!-- Fill the following values if you plan to use a proxy server.--
>
    <add key="ProxyServer" value=""/>
    <add key="ProxyUser" value=""/>
    <add key="ProxyPassword" value=""/>
    <add key="ProxyDomain" value=""/>

    <!-- Uncomment this key if you want to disable gzip compression in
SOAP requests.-->
    <!--<add key="EnableGzipCompression" value="false"/>-->
    <!-- Fill the header values. -->
LOGIN DATA REMOVED
    <!--sandbox values-->
    <!--end sandbox values-->
    <!-- Application token is now optional and will be ignored by the
server.-->
    <!-- <add key="ApplicationToken"
value="ENTER_YOUR_APPLICATION_TOKEN_HERE"/> -->


    <!-- Uncomment this key and comment ClientEmail if you want to
specify
         customer id instead of customer email. -->
    <!-- <add key="ClientCustomerId"
        value="ENTER_YOUR_CLIENT_CUSTOMER_ID_HERE"/> -->

    <!-- Uncomment this if you want to reuse an authToken multiple
times. -->
    <!--<add key="AuthToken" value="ENTER_YOUR_AUTH_TOKEN_HERE"/> -->

    <!-- Uncomment this key if you want to use v13 sandbox. -->
    <add key="LegacyAdWordsApi.Url" value="https://sandbox.google.com"/
>

    <!-- Uncomment this key if you want to use AdWords API sandbox. --
>
    <!-- <add key="AdWordsApi.Url" value="https://adwords-
sandbox.google.com"/> -->
  </AdWordsApi>
  <system.web>
    <webServices>
      <soapExtensionTypes>
        <add type="com.google.api.adwords.lib.TraceExtension,
                   google-api-adwords-dotnet" priority="1" group="0"/>
        <add type="com.google.api.adwords.lib.ApiUnitsExtension,
                   google-api-adwords-dotnet" priority="1" group="0"/>
      </soapExtensionTypes>
    </webServices>
  </system.web>
  <system.net>
    <settings>
      <httpWebRequest maximumErrorResponseLength="-1"  />
    </settings>
  </system.net>
</configuration>

I'm always getting the following assembly loading error

BindingFailure was detected
Message: The assembly with display name 'google-api-adwords-
dotnet.XmlSerializers' failed to load in the 'LoadFrom' binding
context of the AppDomain with ID 1. The cause of the failure was:
System.IO.FileNotFoundException: Could not load file or assembly
'google-api-adwords-dotnet.XmlSerializers, Version=7.1.0.0,
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The
system cannot find the file specified.
File name: 'google-api-adwords-dotnet.XmlSerializers, Version=7.1.0.0,
Culture=neutral, PublicKeyToken=null'

=== Pre-bind state information ===
LOG: User = mcolom-PC\mcolom
LOG: DisplayName = google-api-adwords-dotnet.XmlSerializers,
Version=7.1.0.0, Culture=neutral, PublicKeyToken=null,
processorArchitecture=MSIL
 (Fully-specified)
LOG: Appbase = file:///C:/Users/mcolom/Documents/Visual Studio 2008/
Projects/Atso/Atso/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Users\mcolom\Documents
\Visual Studio 2008\Projects\Atso\Atso\bin\Debug
\Atso.vshost.exe.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET
\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private,
custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Users/mcolom/Documents/Visual
Studio 2008/Projects/Atso/Atso/bin/Debug/google-api-adwords-
dotnet.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///C:/Users/mcolom/Documents/Visual
Studio 2008/Projects/Atso/Atso/bin/Debug/google-api-adwords-
dotnet.XmlSerializers/google-api-adwords-dotnet.XmlSerializers.DLL.
LOG: Attempting download of new URL file:///C:/Users/mcolom/Documents/Visual
Studio 2008/Projects/Atso/Atso/bin/Debug/google-api-adwords-
dotnet.XmlSerializers.EXE.
LOG: Attempting download of new URL file:///C:/Users/mcolom/Documents/Visual
Studio 2008/Projects/Atso/Atso/bin/Debug/google-api-adwords-
dotnet.XmlSerializers/google-api-adwords-dotnet.XmlSerializers.EXE.

The error happens at runtime when I actually try to make the first
call to any service. The creation of the adwrodsuser does not throw
any error.

I've tried to make sure any references appearing into the original
Examples project is into my project, I've googled if anyone is having
the same problem with no success, and after 3 days i'm completely out
of ideas. Does anyone has any indication of where the problem migh be?

Ty very much

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Have you migrated to v200909 yet?
The v13 sunset is on April 22, 2010.

Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords 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

Reply via email to