Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7856561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:44:51+00:00 2026-06-02T20:44:51+00:00

I added as reference 3 dll’s: Google.Apis , Google.Apis.Translate.v2 , System.Runtime.Serialization In Form1 i

  • 0

I added as reference 3 dll’s: Google.Apis , Google.Apis.Translate.v2 , System.Runtime.Serialization

In Form1 i have one line:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {


        public Form1()
        {
            InitializeComponent();


            Translator.translate(new TranslateInput());

        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}

Now the error the exception is on the first line in the class Translator:
The line that throw the error is: var service = new TranslateService { Key = GetApiKey() };

The class code is:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
using System.Web;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Json;
using Google.Apis.Util;
using Google.Apis.Translate.v2;
using Google.Apis.Translate.v2.Data;
using TranslationsResource = Google.Apis.Translate.v2.Data.TranslationsResource;


public class Translator 
{ 
    public static string translate(TranslateInput input) 
    { 
        // Create the service. 
        var service = new TranslateService { Key = GetApiKey() };
        string translationResult = "";

// Execute the first translation request. 
        Console.WriteLine("Translating to '" + input.TargetLanguage + "' ...");
        TranslationsListResponse response = service.Translations.List(input.SourceText, input.TargetLanguage).Fetch();
        var translations = new List<string>();
        foreach (TranslationsResource translation in response.Translations) 
        { 
            translationResult = translation.TranslatedText;
        } 
        return translationResult;
    } 
    private static string GetApiKey() 
    {
        return "AIzaSyCjxMe6RKHZzd7xSfSh2pEsBqUdXYm5tA8"; // Enter Your Key 
    } 
}

/// <summary>
/// User input for this example.
/// </summary>
[Description("input")]
public class TranslateInput
{
    [Description("text to translate")]
    public string SourceText = "Who ate my candy?";
    [Description("target language")]
    public string TargetLanguage = "fr";
}

The error is:

Could not load type ‘Google.Apis.Discovery.FactoryParameterV1_0’ from assembly ‘Google.Apis, Version=1.1.4497.35846, Culture=neutral, PublicKeyToken=null’.

Tried to google for help and also tried to change the project type to x64 platform but it didnt help. So i put it back on x86

I have windows 7 64bit visual studio c# 2010 pro .net 4.0 profile client.

Cant figure out what is the error ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:44:52+00:00Added an answer on June 2, 2026 at 8:44 pm

    This error as reported in the above-posted messages is due to a local copy in the bin\Debug folder of your solution or project. Even though you attempt to clean your solution, such copies will persist to exist.

    In order to avoid this to happen, you have to force Visual Studio to refer to the correct DLL by adding reference paths within a project properties. Unfortunately, if you got several projects within your solutions, you will have to set the reference paths for the projects one after another until completed.

    Should you wish to know how to setup reference paths follow these simple instructions:

    1.Select your project, right-click, then click “Properties”;
    2.In the project properties, click “Reference Paths”;
    3.Folder, type or browse to the right location of your DLL, click [Add Folder].

    You will need to perform these steps for as many different locations you may have for each of your DLLs. Consider setting an output path under the Build tab of the same project properties, so that you may output your DLLs in the same directory for each of them, thus assuring you to find all the latest builds under the same location, simplifying forward your referencing.

    Note this can only be one reason for this error. But it is sure that is has to do something with a wrong copy of the mentioned assembly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've added the reference to System.Runtime.Serialization dll to my project but still can't find
The following is my code for using Google Translate. I have one dll I
I am using F# Interactive, and I have added the reference of FSharp.PowerPack.dll. When
In one of my websites, I have added a reference to IBM.DATA.DB2.dll (which is
I just added System.Web reference to a dll assembly, the assembly is for windows
I have added Microsoft.SqlServer.Management.Smo.dll reference to my project, but it still gives me the
I have just added a reference to one of our own Dlls when I
I have added a reference to a dll (sharpPDF) to my .net project. In
I have asp.net web site. I added reference of Microsoft.Practices.EnterpriseLibrary.Logging.dll to the site. in
I created a COM-interop .dll with this simple class: using System.Runtime.InteropServices; namespace ClassLibrary1 {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.