[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • Last Modified:

Visual Studio Upgrade MS Dynamics GP

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
0
rwheeler23
Asked:
rwheeler23
  • 4
  • 3
1 Solution
 
Steve EndowMicrosoft MVP - Dynamics GPCommented:
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
0
 
rwheeler23Author 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
0
 
Steve EndowMicrosoft MVP - Dynamics GPCommented:
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
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
rwheeler23Author 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?
0
 
Steve EndowMicrosoft MVP - Dynamics GPCommented:
Hi Richard,

Sorry, I wasn't clear about the two versions.  You should have the DLL in both of these locations:

C:\Program Files\Common Files\Microsoft Shared\Dexterity\v2.0

C:\Program Files (x86)\Common Files\microsoft shared\Dexterity\v2.0

If you choose the one in Program Files, that should be the 64 bit version.  If you choose the one in the Program Files x86 directory, that should be the 32 bit version.

From what I can tell, the Microsoft Shared\Dexterity\v2.0 folder and files are created during the GP installation, as it have it on all of my servers.

Thanks,

Steve Endow
Microsoft MVP - Dynamics GP
Dynamics GP Certified IT Professional
0
 
rwheeler23Author 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.
0
 
rwheeler23Author Commented:
Excellent and very well expressed solution.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now