.exe file with C#

P

perdrix

Hello,

I have written a little software with C#, express edition.

How can I send the .exe file to my friends ?

I have found a .exe file in the bin directory, but it seems mandatory to
install the . NET framework 4 on the computers before using this .exe.

Is it a simple way to get a usual .exe file, ready to run on a ordinary
computer ?


Thank you for your answers



perdrix
 
B

Bert

In jackOrip
C# is a managed programming language. Which means it needs the dotNET
framework installed wherever it is run. the EXE you found is the file
to share with your friends. Everyone will need the framework on their
computer unfortunately. You will have to use something that isn't
managed code, like c++, if you wish to share without the framework.
This is an oversimplified explanation, but I hope you get the picture.

Of course, the recipient will need the correct version of the dotNet
framework, matching the version for which the application was built. I'm
still using VS 2008 and I can target version 2.0, 3.0 or 3.5.

The various versions of the dotNet framework runtime can be found at
http://www.microsoft.com/download/en/search.aspx?q=.net

Even C++ programs (built with MS development tools) require the
appropriate runtime libraries installed.

The various versions of the C++ runtime libraries can be found at
http://www.microsoft.com/download/en/search.aspx?q=redistributable+c++
 
J

Jeff Johnson

I have written a little software with C#, express edition.

How can I send the .exe file to my friends ?

I have found a .exe file in the bin directory, but it seems mandatory to
install the . NET framework 4 on the computers before using this .exe.

Is it a simple way to get a usual .exe file, ready to run on a ordinary
computer ?

The Framework is required. If you are asking if there's a way for the user
to run your program WITHOUT having the corresponding Framework, the answer
is No. You can distribute the Framework by building a setup package. I don't
use the Express edition, however, so I don't know if it supports such a
thing.
 
A

Arne Vajhøj

I have written a little software with C#, express edition.

How can I send the .exe file to my friends ?

I have found a .exe file in the bin directory, but it seems mandatory to
install the . NET framework 4 on the computers before using this .exe.

Is it a simple way to get a usual .exe file, ready to run on a ordinary
computer ?

They need .NET.

But if you build for something older than 4.0, then there is a decent
chance that they already have it.

..NET/C#/VS gives you the opportunity to build for older versions
(except the very old 1.x stuff).

Windows 7 should ship with 3.5.

Vista with 3.0.

And if they do not have it then ask them to install it - it is free.

Arne
 
A

Arne Vajhøj

In jackOrip


Of course, the recipient will need the correct version of the dotNet
framework, matching the version for which the application was built. I'm
still using VS 2008 and I can target version 2.0, 3.0 or 3.5.

The various versions of the dotNet framework runtime can be found at
http://www.microsoft.com/download/en/search.aspx?q=.net

Even C++ programs (built with MS development tools) require the
appropriate runtime libraries installed.

The various versions of the C++ runtime libraries can be found at
http://www.microsoft.com/download/en/search.aspx?q=redistributable+c++

Note that both for .NET and C++ it should be possible to run code
at the same version that that it was build *or* newer versions.

Build on X should run on X and X+1 but not on X-1.

Arne
 
A

Arne Vajhøj

For better or worse, that's not true by default.

A program compiled for 3.5 can run on a system that has only 4.0
installed. But only if you have configured the program explicitly to be
supported on 4.0, in the application .config file.

If the program doesn't already have one, you can create it manually, so
it's possible to support a 3.5 program on 4.0 without rebuilding the
program. But some sort of manual intervention is required.

Some more info here:
http://social.msdn.microsoft.com/Forums/en/netfxsetup/thread/4f0b7821-506f-453f-896e-54a545c75081

That is different from 1.1->2.0.

And MS will regret the decision when Windows 8 comes out
(first Windows that will ship with 4.x and does not contain
3.x).

There will be a flood of complaints.

Arne
 
A

Arne Vajhøj

[...]
A program compiled for 3.5 can run on a system that has only 4.0
installed. But only if you have configured the program explicitly to be
supported on 4.0, in the application .config file.

[...]

That is different from 1.1->2.0.

Yup. It's possible they feel that they learned an important lesson with
the release of 2.0.
And MS will regret the decision when Windows 8 comes out
(first Windows that will ship with 4.x and does not contain
3.x).

There will be a flood of complaints.

Probably. But then, people complain regardless.

But this time they would have something to complain about

..NET would be one of the least upgrade friendly technologies
in the world.
When 4.0 came out, Microsoft's immediate concern was avoiding the
complaints of people whose 3.5-compatible code got broken because it was
running on 4.0 by default.

If it did the same as for 1.1-2.0 then it would not.

1.1 code runs with 1.1 if that is present, but will run on 2.0
if 1.1 is not present.
I expect that an OS still under the early
stages of development without even a specific release window probably
did not figure heavily into their thought process.

Given that the difference between the 1.1-2.0 way and 3.5-4.0 way
will only show up when 3.5 is not present, then how could they
not think about it.
For that matter, a) I haven't seen any written-in-stone statement that
Windows 8 won't include an earlier .NET version (i.e. that could
change),

It has been their practice for 8 years to ship Windows with latest
..NET and only that.

It could of course change.
and b) even if it only has 4.0, it's possible that they will
change the runtime policy yet again to enable 3.5 apps to run without
changes.

They could.

But why create a rule now and remove it again when the rule really
would start to have impact.

Arne
 
A

Arne Vajhøj

Time will tell. Or maybe Microsoft will. :) Either way, I think there
are plenty of other more concerning changes coming with Windows 8
(particularly the overall de facto-though-not-official deprecation of
.NET as a platform); I'd be surprised if this particular issue winds up
getting much of the spotlight when Windows 8 comes out.

I find it difficult to see .NET being de facto deprecated in Windows 8.

WinRT supports .NET fine.

WinRT also support non-.NET, but that is not new compared to
the situation today.

I can not see any reason why .NET should become less used for
web apps, web services, windows services, other server side code,
windows phone etc..

It seems likely that .NET would become less used for desktop
apps. The HTML5+JS way of coding will most likely eat a
good piece of what today is win forms or WPF.

Arne
 
A

Arne Vajhøj

[...]
But why create a rule now and remove it again when the rule really
would start to have impact.

I didn't mean to suggest they would remove the rule. They might _change_
the rule, so that if 3.5 isn't present, 4.0 would be used even without
changes to a 3.5-targeted program.

That would be doing it the 1.1-2.0 way.

And I still do not see any reason why not to have done it that
way now, if that is what they want to do in the future.

Arne
 
A

Arne Vajhøj

On 11/5/11 12:17 PM, Arne Vajhøj wrote:
[...]
But why create a rule now and remove it again when the rule really
would start to have impact.

I didn't mean to suggest they would remove the rule. They might _change_
the rule, so that if 3.5 isn't present, 4.0 would be used even without
changes to a 3.5-targeted program.

That would be doing it the 1.1-2.0 way.

Yes. And?

Just read the next two lines.
Wanting in the future to do something is not the same as wanting now to
do something in the future.

No.

But in this case it is doing it the traditional way when it
will become an important issue and doing it different while
very few will be affected.
And not seeing something is not the same as
it not being there.

True.

And I am all ears for good explanations.

Arne
 

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