Reply
Solved! Go to solution

Method not found

Hi I seem to be having an issue with the 2.0 DLL supplied there : https://solidedgeinterop.codeplex.com/team/view

 

To reproduce :

 

Create a project with VS 2008 (went with console); Framework 3.5. As mentionned, use the 2.0 solid edge reference.

 

Use this code :

 

static SolidEdgeFramework.ISEApplicationEvents_Event objAppEvents;

static void Main(string[] args)
{
    SolidEdgeFramework.Application _application = (SolidEdgeFramework.Application)Marshal.GetActiveObject("SolidEdge.Application");
    objAppEvents = (SolidEdgeFramework.ISEApplicationEvents_Event)_application.ApplicationEvents;
    objAppEvents.BeforeQuit += new SolidEdgeFramework.ISEApplicationEvents_BeforeQuitEventHandler(objAppEvents_BeforeQuit);
}

static void objAppEvents_BeforeQuit()
{

}

 

When I run this I get the following error :

Method not found : Void System.Threading.Monitor.Enter(System.Object, Boolean ByRef)


Now if you use the same code in VS 2010, framework 4.0, and the 4.0 solid edge DLL, it works fine (and if I use the old application I'm trying to update, with the V19 DLL's, on a machine with V19, it also works fine).

 

From what I have found so far it seems to be an issue of framework, but I haven't managed to get further than that.

 

Thanks in advance for your help.

Carl Larochelle

4 REPLIES

Re: Method not found

I know why and will need to alter the way I produce the .NET 2.0 version of the dll. I will do so tonight and provide a new build. Thank you for letting me know.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Method not found

[ Edited ]

Oh and another problem, while at it.

 

Using the same code (though in the VS 2008 part, you have to comment out the

"objAppEvents.BeforeQuit +=" line, since it throws an error), add the following code after.

 

ArrayList Documents = new ArrayList();
foreach (SolidEdgeDocument SEDoc in _application.Documents)
    Documents.Add(SEDoc);

 

Now, assuming you have a document opened, in my case a part, you should get the following error with VS 2008 : " Could not load file or assembly 'CustomMarshalers, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. ".

 

Obviously, I don't have this error with the framework 4.0 DLL in VS 2010.

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

Re: Method not found

I have created a new work item for you for this issue. Work items are how users of open source projects can communicate issues like this. This enables the team to track issues and for everyone to track the progress. Any further comments that I make on this issue will be in the work item. Thanks so much.

Jason Newell
Applications Architect
www.jasonnewell.net

Re: Method not found

Sorry I didn't notice the issue tab on codeplex. If I find other problems i'll post them over there.

 

Thanks again.