473,378 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Force references to run against .NET 1.1

I am developing in VS2005, but I have some third-party DLL's that appear to
only work correctly when compiled in VS2003. ("Incorrect" operation is
defined as a busy-wait that kicks in on a message loop, hogging a full CPU
thread even when nothing is happening.)

I am assuming the difference is that the DLL's were compiled for .NET 1.1.
What are my options for compiling in VS2005 but running the DLL's against the
1.1 framework? My own code makes extensive use of C# generics and so I'm
assuming would only work against .NET 2.0?
Jun 13 '06 #1
5 4108
Dave Booker wrote:
I am developing in VS2005, but I have some third-party DLL's that appear
to only work correctly when compiled in VS2003. ("Incorrect" operation is
defined as a busy-wait that kicks in on a message loop, hogging a full CPU
thread even when nothing is happening.)

I am assuming the difference is that the DLL's were compiled for .NET 1.1.
What are my options for compiling in VS2005 but running the DLL's against
the
1.1 framework? My own code makes extensive use of C# generics and so I'm
assuming would only work against .NET 2.0?


My understanding is that the dll's will execute under whatever version of
the framework that the owning process is executing under. So if your app is
running under 2.0 and you are loading the referenced dlls in your app, then
they too will run under 2.0.

You would need to either come up with some way of leveraging the
functionality in the 3rd party components remotely, in a separate app that
runs under 1.1, or contact the supplier about obtaining a 2.0 compatible
version of the dll's.
--
Tom Porterfield

Jun 13 '06 #2
My understanding is that the dll's will execute under whatever version of
the framework that the owning process is executing under. So if your app is
running under 2.0 and you are loading the referenced dlls in your app, then
they too will run under 2.0.
How can I determine/force which framework a process should execute under?
You would need to either come up with some way of leveraging the
functionality in the 3rd party components remotely, in a separate app that
runs under 1.1, or contact the supplier about obtaining a 2.0 compatible
version of the dll's.


Sounds reasonable. So how can I force that separation? E.g., if I could
compile the components I want running in 1.1, how could I reference them from
a 2.0 process while running them in 1.1? With a System/Commandline call from
the 2.0 process? What are my options?
1. If I compile the DLL's into a separate
Jun 13 '06 #3
Dave Booker wrote:
My understanding is that the dll's will execute under whatever version of
the framework that the owning process is executing under. So if your
app is running under 2.0 and you are loading the referenced dlls in your
app, then they too will run under 2.0.


How can I determine/force which framework a process should execute under?


You can force your app to run under a specific version of the framework, but
if you are using generics then it won't work. For more info on how to
target a specific framework version, see the following article:

How to: Use an Application Configuration File to Target a .NET Framework
Version
http://msdn2.microsoft.com/en-us/library/9w519wzk.aspx

Also some discussion at http://channel9.msdn.com/Showpost.aspx?postid=73151.
You would need to either come up with some way of leveraging the
functionality in the 3rd party components remotely, in a separate app
that runs under 1.1, or contact the supplier about obtaining a 2.0
compatible version of the dll's.


Sounds reasonable. So how can I force that separation? E.g., if I could
compile the components I want running in 1.1, how could I reference them
from a 2.0 process while running them in 1.1? With a System/Commandline
call from the 2.0 process? What are my options?
1. If I compile the DLL's into a separate


Command line is an option. You could also use a remoting or webservice
call.
--
Tom Porterfield

Jun 13 '06 #4
Shoot, so I have a program that is very tightly coupled to .NET 2.0, and I
have these DLL's that define objects that only work in .NET 1.1.

I understand that with remoting I could run the DLL objects in a separate
process from the main code.

But is there anything that could save me the hassle of remoting? For
example, could I instantiate the DLL objects in a thread that runs against
the 1.1 framework while the main program thread runs against 2.0?
Sounds reasonable. So how can I force that separation? E.g., if I could
compile the components I want running in 1.1, how could I reference them
from a 2.0 process while running them in 1.1? With a System/Commandline
call from the 2.0 process? What are my options?
1. If I compile the DLL's into a separate


Command line is an option. You could also use a remoting or webservice
call.
--
Tom Porterfield

Jun 13 '06 #5
Hi dbooksta,

Thanks for your post!

Unfortunately, .Net does not support loading 2 different versions of CLR in
the same process, please refer to the link below for more information:
"CLR Side by Side and Compatibility"
http://blogs.msdn.com/junfeng/archiv...26/422014.aspx

Normally .Net2.0 has considered .Net1.1 backward compatibility in design,
so .Net1.1 code should work well in .Net2,.0 runtime. Therefore I do not
understand why that 3rd party dll will have slow performance hang in
message loop. In this scenario, you'd better contact that 3rd party vendor
for a .Net2.0 compatible version of dll as "Tom Porterfield" suggested.
Otherwise, the possible workaround in .Net is using .Net remoting or
WebService to isolate the dll from the exe.

Hope this helps!

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 14 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Ganesh | last post by:
Is there a utility by microsoft (or anyone) to force garbage collection in a process without have access to the process code. regards Ganesh
11
by: opt_inf_env | last post by:
Hello everybody, I have created a page consisting of two frames. The second frame is made to display "external" sites (i.e. written not by me, for example www.google.com). But I found that some...
10
by: Keith | last post by:
A2000 SP-3. Win XP Pro. I've inherited an A2k database which references both DAO and ADO libraries. I'm a bit of a newbie with libraries and so-on so my question is, can the two libraries be...
8
by: Keith H | last post by:
I'm looking for a way to force the user to re-authenticate with their Windows username/password/domain after clicking the submit button on an ASP.NET page. This is for an internal application. ...
4
by: John Lafrowda | last post by:
Hi all, I'm trying to handle two projects in one solution (.net 2002, both projects are VB). The first project contains only some public constant definitions (for the moment) and compiles into...
1
by: astro | last post by:
Is there a command/syntax that will force a given datagrid to submit it's changes to it's dataset? I know the currencymanager is responsable for this.......just can't get it to work. I've...
3
by: Dean Slindee | last post by:
My project is getting a bit large, and I would like to kick-start VS05 into performing the error-checking compilation at my direction, rather than waiting for it to self-start. Is there a way to...
6
by: Ronald S. Cook | last post by:
I have been asked to write a ..NET Windows app using the 1.1 framework. I have both 1.1 and 2.0 on my PC. When I create a new project in Visual Studio 2005, it shows initial namespaces under...
76
by: valentin tihomirov | last post by:
As explained in "Using pointers vs. references" http://groups.google.ee/group/borland.public.delphi.objectpascal/browse_thread/thread/683c30f161fc1e9c/ab294c7b02e8faca#ab294c7b02e8faca , the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.