We help IT Professionals succeed at work.

Visual Studio Upgrade MS Dynamics GP

536 Views
Last Modified: 2014-08-06
I have a class library that was originally written in VS 2008. The time has come to upgrade it to VS 2010. The library belongs with an application that has its own toolkit. I have installed the latest version of this toolkit. The problem I have is that when I build the code and run the application, I get this error message."Error Message
Comment
Watch Question

Steve EndowMicrosoft MVP
CERTIFIED EXPERT

Commented:
Hi Richard,

That message may indicate that you have a broken reference for GPConnNet.dll.  Even though your VS project may not show the broken reference, for some reason GPConnNet usually needs to be removed and readded after an upgrade.

In your VS project, remove the GPConnNet.dll, then add it back by browsing to Program Files (x86) \ Common Files \ Microsoft Shared \ Dexterity \ v2.0 \ GPConnNet.dll

If that doesn't work, try changing your compilation options to target the x86 platform rather than Any CPU.

Give that a try and let me know if that fixes the problem.

(After thinking about it more and re-reading the error--particularly the "incorrect format" message, my money is on x86, but let me know what you find)

Thanks,

Steve Endow
Microsoft MVP - Dynamics GP
Dynamics GP Certified IT Professional
rwheeler23President

Author

Commented:
Steve, this is very strange. First I tried changing the CPU to x86 and that did not help. Then I removed the reference to GPConnNewt.dll and put it back and that did not help. Then I noticed that once again when I build VS inserts the GPConnNet.dll file into the GP Add Ins folder. When I delete it, GP runs just fine and so does my code. So one question is how to do I stop VS from depositing this dll into the add ins folder? The other is why do I keep getting this warning when I build?

Warning      2      There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "GPConnNet, Version=11.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=x86", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.      SOPWorkSamples
Steve EndowMicrosoft MVP
CERTIFIED EXPERT

Commented:
Hi Richard,

If you select the GPConnNet reference and then look in the Properties window, there is a "Copy Local" property.  Make sure that is set to False.

When you add the GPConnNet reference, check which directory you are using.  There appears to be both a 64 bit and 32 bit version.  If you reference the one in Program Files, then set your solution to compile for AnyCPU.  If you reference the one in Program Files (x86), set your solution to compile for x86.

Let me know if those resolve the issue.

Thanks,

Steve Endow
Microsoft MVP - Dynamics GP
Dynamics GP Certified IT Professional
rwheeler23President

Author

Commented:
Steve, this all makes sense now. One last question I have is the x86 vs x64 version of GPConnNet.dll. In my Common Files folder there is only one version. Does the installation of GP create this folder of is it the installation of the GP VS Toolkit?
Microsoft MVP
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
rwheeler23President

Author

Commented:
Now it all makes sense. I did not have to do any of this before for GP 10. At least now I know. Thank you very much.
rwheeler23President

Author

Commented:
Excellent and very well expressed solution.

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.