Confusing problem works as stand-alone project, but not under 4.0 Framework

vinnie881

Well-known member
Joined
Sep 3, 2006
Messages
152
Programming Experience
3-5
OK, so I have a project that has the following issues:

Here is the setup
VS 2010
Win 7
64 bit

1. I am using a compiled library that ONLY works win 7 64bit, using a 2.0 framework (Yeah, all others it does not run)

The app runs fine as a console app and everything else as long as I use that setup. Now the issue is when I compile as a 2.0 framework and add it to ANY project that is not using a 2.0 framework it crashes.

Now the easy solution is " CHANGE YOUR OTHER PROJECT TO 2.0 "... Not that simple, the other project is REQUIRED to be 4.0 framework as that has a library that ONLY works on win 7 64 bit that is 4.0.

ANY idea how to make this app that works perfectly fine standalone work where I can link to the DLL?

The whole solution is this

4.0 Framwork project - Opens and modifies PDF files and converts
2.0 Framework project - OCR that reads the PDF, and I need to return that back to the other project!

Any idea's would be very helpful!

Thanks in advance, I appreciate it!
 
You're probably out of luck. Different Frameworks are largely compatible but there are differences and if you strike one of those then there's not much you can do. I think that a DLL will run off the same Framework version as the app that references it but I'm not 100% sure about that. Have you got both versions installed?
 
Both frameworks I believe are installed, it does run everything fine individually on each project.

My only work around is I can write the 2.0 app as a standalone. console app and call it via a shell, but any good samples or ways to read that output from a console app that was called via a shell back to that 4.0 app?

If not I need to have the 2.0 app write to an XML or other file format to read that info back to the 4.0 framework.

Thanks again!
 
Both frameworks I believe are installed, it does run everything fine individually on each project.

My only work around is I can write the 2.0 app as a standalone. console app and call it via a shell, but any good samples or ways to read that output from a console app that was called via a shell back to that 4.0 app?

If not I need to have the 2.0 app write to an XML or other file format to read that info back to the 4.0 framework.

Thanks again!

Here is how is one way i can return the output. Any better?
VB.NET:
* * * * Dim oProcess As New Process()
* * * * Dim oStartInfo As New ProcessStartInfo("ApplicationName.exe", "arguments")
* * * * oStartInfo.UseShellExecute = False
* * * * oStartInfo.RedirectStandardOutput = True
* * * * oProcess.StartInfo = oStartInfo
* * * * oProcess.Start()

* * * * Dim sOutput As String
* * * * Using oStreamReader As System.IO.StreamReader = oProcess.StandardOutput
* * * * * * sOutput = oStreamReader.ReadToEnd()
* * * * End Using
* * * * Console.WriteLine(sOutput)
 
Back
Top