Reply
Solved! Go to solution

error with Interop for Solid Edge

Hi.

 

First i'd like to say that I haven't found any similar thread, if I missed it, sorry.

 

I have a VB.net application (VS 2008, framework 3.5) for which I need to update the references since we changed our solid edge version from V19 to ST6. I downloaded the dll's supplied there : https://solidedgeinterop.codeplex.com/team/view

 

My problem is, when I add the reference (the framework 2.0 one) I get a yellow warning triangle (with the exclamation mark) and I get the following warning :

"Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'C:\DLL\Interop.SolidEdge.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded."

So if the 2.0 DLL is built by a runtime newer than the one I'm using... what's the point of it? If my app needs the framework 4.0, shouldn't I simply use the 4.0 DLL's?

 

Thanks in advance for your reply.

8 REPLIES
Solution
Solution
Accepted by topic author Carl
‎08-26-2015 04:32 AM

Re: error with Interop for Solid Edge

Carl,

 

You are absolutely correct. I just tested it myself and it's built using runtime v4.0.30319. Not sure how that happened but I will work on correcting it and publishing an updated release. Thanks for letting me know.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: error with Interop for Solid Edge

[ Edited ]

Hi Jason.

 

First of all, thanks for all your contributions over the years, it is all much appreciated. Secondly, glad to know I wasn't going crazy with that DLL lol.

 

I'll wait for your DLL update, since I have a plugin architecture it's going to be much more simple than having to change framework, and then have to upgrade all my plugins and the main app.

 

Again thanks a bunch, and IF you think about it, I would appreciate an update here, but if you don't it's all good,I'll just refresh codeplex everyday until i see an update.

 

Regards,

Carl Larochelle

Re: error with Interop for Solid Edge

Problem corrected and a new release is now published. Totally a bonehead mistake on my part where the .NET 2.0 assembly got compiled using .NET 4.0. DUH!

 

BTW, I know you're using Visual Studio 2008 so I'm not sure how well it works in that version but newer versions of Visual Studio have NuGet which makes managing external references like this a breeze. It basically makes it where you don't have to manually download and manage external references. Just wanted to mention it in case you (or others) weren't aware. I do mention it on the Interop for Solid Edge main page at the bottom.

 

Thank you for the acknowledgement. It's always good to hear feedback from you all.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: error with Interop for Solid Edge

That was fast, thanks again Smiley Happy

 

As for NuGet, I just checked and it's with VS 2010 and up. Something to check when we end up upgrading our VS version.

 

Cheers

Re: error with Interop for Solid Edge

Carl, not sure if it helps but if upgrading is a "purchasing" issue, the free Express tools work just fine with Solid Edge.  You will want the one for Windows Desktop...


Thanks,
Ken

Production: ST9 MP7
Testing: ST10

Re: error with Interop for Solid Edge

Its more of a lack of time to start changing framework and then having to upgrade our main app and our +- 60 plugins. And then having to test a bunch of stuff. And while going over everything having to update our devexpress version while at it.... and so on and so forth.

 

But thanks for mentionning it.

 

Cheers,

Carl Larochelle

Re: error with Interop for Solid Edge

I'm having this same problem with the samples distributed in the ST6 disks.  I have no problem creating a new solution and pulling in Interop.SolidEdge, but I can't figure out how to make the Interop.SolidEdge work on the sample solution projects.  Specifically, NuGet informs that it's installed (and offers a Manage button), but the projects note the reference is invalid.

 

I'm not seeing here what step I should take to fix these.

Re: error with Interop for Solid Edge

Found a solution: In Nuget, click on the left on Updates. Click the Update button for the Interop.SolidEdge package.