Visual C# program without .NET - possible?

G

Guest

I've developed a small program using Visual C# .NET 2005 Beta, which required
..NET 2.0 Beta. I may redo it in Visual Studio .NET 2003. My clients don't
have .NET installed, and I'd like to avoid installing .NET on their machines
for now. Is there a way to (1) determine IF I'm using any .NET components in
my code, (2) redesign without those components, and (3) create an executable
that doesn't rely on .NET? If not, is there a tool that allows C# programs
without reliance on .NET?

Thanks for any help you can provide.
 
J

Jon Skeet [C# MVP]

csscouter said:
I've developed a small program using Visual C# .NET 2005 Beta, which required
.NET 2.0 Beta. I may redo it in Visual Studio .NET 2003. My clients don't
have .NET installed, and I'd like to avoid installing .NET on their machines
for now. Is there a way to (1) determine IF I'm using any .NET components in
my code, (2) redesign without those components, and (3) create an executable
that doesn't rely on .NET? If not, is there a tool that allows C# programs
without reliance on .NET?

See http://www.pobox.com/~skeet/csharp/faq/#framework.required
 
P

Philip Rieck

1) You are. The code itself is compiled to MSIL, not machine code, then
placed in a PE .exe (for an application). This PE exe actually uses
mscorlib.dll to run the MSIL - and mscorlib is a .net cornerstone. So you
are very much using .net, even if you have just a "hello world" application
in c#

2) Rewrite in any unmanaged language / tool (like VB6, C++/MFC, Delphi, etc)

3) No. However, you can check out the Salamander Linker
http://www.remotesoft.com/linker/ which will create a standalone app that
links in the needed parts of .net - and so doesn't require you to install
..net on the client. However, I've heard mixed reviews about it - and I
personally don't recommend the concept as it pushes the burden of .net patch
distribution onto the application vendor.
 
D

Daniel Carbajal [MVP]

Very simple, convert your application to a web application and then your
clients don't need the .NET Framework installed on their machines...
Regards,
Daniel Carbajal
MVP
 
G

Guest

Thanks very much for your response, as well as those from John and Daniel.
I'm new to the .NET environment and don't yet understand its underpinnings. I
suspected that your answer to part (2) was what I'd need to do, but I didn't
anticipate the Salamander linker reference. I'll be sure to check it out.

I appreciate your help, and thank you again for your time and consideration!
 
G

Guest

Did my first reply post? (Got an error).. If not, basically I just wanted to
thank you for the details of your reponse, as well as those by Jon and
Daniel. I sincerely appreciate your time and consideration! I will check out
the Salamander linker reference...
 
L

Lloyd Dupont

web application sucks!

ok, maybe overstated, and I will genereate plenty of flame.
but you're simple (and provocatively written) statement, required me to
answer like that...
 
L

Lloyd Dupont

this salamender stuff look interesting hey!

Philip Rieck said:
1) You are. The code itself is compiled to MSIL, not machine code, then
placed in a PE .exe (for an application). This PE exe actually uses
mscorlib.dll to run the MSIL - and mscorlib is a .net cornerstone. So you
are very much using .net, even if you have just a "hello world"
application in c#

2) Rewrite in any unmanaged language / tool (like VB6, C++/MFC, Delphi,
etc)

3) No. However, you can check out the Salamander Linker
http://www.remotesoft.com/linker/ which will create a standalone app that
links in the needed parts of .net - and so doesn't require you to install
.net on the client. However, I've heard mixed reviews about it - and I
personally don't recommend the concept as it pushes the burden of .net
patch distribution onto the application vendor.
 
M

Marc Scheuner [MVP ADSI]

web application sucks!

Couldn't agree more - I still haven't seen a REALLY GOOD web app -
WinForms UI apps are just all that much more flexible, powerful,
useful.

Marc
================================================================
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)inova.ch
 
G

Guest

Daniel,

I appreciate the comment, but the reason I developed this C# program is to
bring up the WebBrowser control in a window that I would have more control
over. Specifically, I needed the capability to keep the browser on top of
other windows regardless of the currently active window, to make it modeless,
and to reuse the existing instance rather than launching multiple windows
every time a new URL was requested from the program that launches mine.

As such, a web application doesn't address my need. I wasn't clear enough in
my original post, so your suggestion in the absence of my clarifications was
reasonable.

I've also checked out the suggestion made by Philip Reick to look at the
Salamander Linker. As I read it, an installation is still required, and
that's what I wanted to avoid. If it had bundled all necessary resources into
one executable, it would function just like a non-managed (pre-.NET) program,
and that would have solved my problem about doing a separate install. As it
is, if I have to do any kind of install, I might as well install .NET 1.1 on
all the target machines. His point about not taking on the responsibility for
updating is very important and quite relevant.

Many thanks to all who've provided input. I appreciate it.
 

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