.Net to Native

H

Hasan Baydoon

Hello .Net pals:

I've been using the dot Net for the last year and a half and it took me
realativly no time to practice it right. But I still find it painy, that I
should provide every computer I intend to use my .Net apps on, with the .Net
framework (the exact version I programmed with). So have you got any idea,
of how to convert our .Net applications int "Win32" or ofcourse "Win64"
applications.

It would be fantastic if we managed to do so. Because we would have gained
both advantages of easy programming and overrided the "virtual machine" so
we get fast applications.

I think with my little knowledge that it should be only a problem of
converting the MSIL instructions into the corresponding primitive
instructions.

THanks
 
E

eBob.com

re "But I still find it painy, that I
should provide every computer I intend to use my .Net apps on, with the
.Net framework (the exact version I programmed with). "

In my VERY limited experience you do not have to provide the framework. The
install package you generate will download it from MS if it's needed.

(Based on my generation of exactly ONE setup.exe!)

Bob
 
J

Jesse Houwing

Hello Hasan,
Hello .Net pals:

I've been using the dot Net for the last year and a half and it took
me realativly no time to practice it right. But I still find it painy,
that I should provide every computer I intend to use my .Net apps on,
with the .Net framework (the exact version I programmed with). So have
you got any idea, of how to convert our .Net applications int "Win32"
or ofcourse "Win64" applications.

It would be fantastic if we managed to do so. Because we would have
gained both advantages of easy programming and overrided the "virtual
machine" so we get fast applications.

I think with my little knowledge that it should be only a problem of
converting the MSIL instructions into the corresponding primitive
instructions.

As other said, there's basically 2 options:

1) Link the framework binaries into your executable (Xenocode Postbuild http://www.xenocode.com/Products/Postbuild-for-NET/
can do this)

2) Link the Framwork Installer into your application installer

As a last comment, you don't need the exact framework version. Any newer
will (usually) do...
 
H

Hasan Baydoon

M

Mike Small

Peter Duniho said:
Re-reading the OP's message, I want to point out something else: it's
not true that the .NET that's installed has to be the "exact" one
coded to. It simply has to be a version equal to or later than the
one coded to, as long as the application itself hasn't specifically
been set to require a specific version (and if someone is concerned
about requiring a specific version, why would they do that?)

Pete

The equal to or later rule didn't hold true for me. There was some
real API flux in Windows Forms from 1.1 to 2.0 such that a client site
web control one of my co-workers developed with 1.1 did not run in the
2.0 framework. There's a good section in Juval Lowy's book
_Programming .NET Components_ that tells the whole story on the
framework versions and which are really backward compatible to which.
So 1.0 -> 1.1 would be okay, but 1.1 -> 2.0 not so much. I'm
guessing 2.0 -> 3.5 is okay too, but the edition I have only covers up
to 2.0. There must be a place on MS's site somewhere that specifies
the compatibility between frameworks.
 
M

Mike Small

Peter Duniho said:
There is.
http://msdn.microsoft.com/en-us/netframework/aa570326.aspx

Here's the page specific to ASP.NET run-time changes (i.e. those that
would affect an already-delivered web app):
http://msdn.microsoft.com/en-us/netframework/aa497240.aspx

It wasn't an ASP.NET change that was relevant in my case but something
with Windows Forms. The guy used Windows Forms classes to construct a
client side control on a web page -- a grid with a bunch of extra
features. Actually now that I look over the first link you gave, it
might have been something in System.Data too. It's been a while
though. I'd have to review the changes to remember it exactly.
There are similar pages for the more recent versions, though of course
there's a _lot_ less to document in those cases.

As you can see from reading through the documentation, many of the
changes are either security issues or affect only those applications
that are doing something non-standard or invalid anyway. .NET 2.0
added better security, and does more/stricter data validation. In
other words, applications affected by those kinds of changes ought to
be updated anyway.

Even with the large degree of changes between 1.1 and 2.0, the large
majority of pre-2.0 .NET applications work fine on .NET 2.0 and later.
There will be exceptions, to be sure...but one should not assume there
will be a problem.

Pete

Okay, but one should also not assume that there will not be a problem.
This is the difference between backward compatibility and close to
backward compatibility. It made my company look bad and gave me some
unexpected extra work to do. It should not be an unexpected sort of
thing, perhaps, that development tools and runtimes change. When we
changed C++ compilers we had lots of work to do too. The nasty thing
in this case was that it happened outside of our control at the
client's site without us being around and the error messages weren't
very helpful, leaving me with some interesting detective work to do.
The client upgraded to .NET 2.0 for a separate application. Because
of the way the, what's it called again, Internet Explorer 6's .NET
container picked the run time to use it hit us by surprise. If I
remember rightly, even though both 1.1 and 2.0 were installed, it
picked the most recent runtime they had instead of matching the
runtime to that noted in the assembly metadata, as it would have done
if it were a simple Windows Forms application and not a client side
control on a web page. Reminded me of the old descriptions of DLL
hell, which I haven't really experience myself with our native code
because of how we deploy our libraries.

That said, I'm not sure why installing various CLR versions is such a
concern for the original poster (assuming he's not silly like we were
and isn't using .NET for client side web controls). Java has dealt
with this sort of thing for years. Are people so resistant to
installing multiple runtimes? With the popularity of .NET, they'll
eventually have most of them anyway if they're running Windows. If it
is a genuine problem, then I'm told Delphi is a pretty good dev
environment still. Perhaps it would be a better choice. Or Tcl/Tk
has a very interesting deployment model with its Star Kits or whatever
they're called.
 
J

Jesse Houwing

Hello Hasan,
Really thanks Jesse, the link is so helpful.

And for :

In MSDN it doesn't seem that the frameworks are always backward
compatible, the following link talks about .Net 1.1 and 2.0.
http://social.msdn.microsoft.com/Forums/en-US/clr/thread/811bf6ad-fa27
-47a9-874d-f358e5945350

Most of these issues are around compiling sources for the old framework to
the new one. A compiled binary has a much larger chance of runnign smoothly
;).

Jesse
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top