Sharing programs with friends

J

James

Hello,

I want to show my friends my c# work, but sending them the
bin/release/progname.exe program doesnt work. Research
has indicated this is because they have the .net framework
v1.1 - whereas I have v2.0

I have worked out that if I hit the menu 'Build, Publish progname'
it works on most of my friends PC's (but not all) so I have a
few questions.

1. Why doesnt it work on all PC's?

2. The standard exe is just 28k, yet the published files are
460kb, I expected it to be larger to accommodate the 2.0
framework bits required - but didnt expect it to be over 16
times larger. Is this right?

3. Ideally I'd like to give them just one .exe for them to run,
is there any way to do this?

Many, many thanks for your help. James.
 
J

Jon Skeet [C# MVP]

James said:
I want to show my friends my c# work, but sending them the
bin/release/progname.exe program doesnt work. Research
has indicated this is because they have the .net framework
v1.1 - whereas I have v2.0

I have worked out that if I hit the menu 'Build, Publish progname'
it works on most of my friends PC's (but not all) so I have a
few questions.

1. Why doesnt it work on all PC's?

That's hard to say without a bit more information.
2. The standard exe is just 28k, yet the published files are
460kb, I expected it to be larger to accommodate the 2.0
framework bits required - but didnt expect it to be over 16
times larger. Is this right?

That's not including .NET 2.0 (which would be much, much larger). It's
just a "ClickOnce" deployment. Look up ClickOnce on MSDN for more
information.
3. Ideally I'd like to give them just one .exe for them to run,
is there any way to do this?

Yes - get them to run Windows Update and install .NET 2.0.
 
J

James

Hi Jon,

Firstly thanks for the help.

I've looked up click once and it appears that that's the publishing
method I've been using. I cannot get everyone to install .Net 2.0
and so I guess I'm stuck with large archives and multiple files
until the latest windows becomes more prevelant!

Unless any other reader knows something special.... :blush:)


Many thanks, James.
 
M

Marc Gravell

If you are writing .NET 2 code (e.g. using some flavor of VS2005), then this
simply isn't going to work regardless of how you publish it, what files you
bundle, etc (short of bundling the CLR itself, which I don't think you can
do without major hacks). The CLR is a necessary prerequisite; note that we
are talking about the .NET 2 *framework*, and not Visual Studio or
anything...

If you want to target machines that only have v1.1 of the framework, then
you need to write v1.1 code, i.e. using VS2003 (or at least, the 1.1 version
of csc).

Marc
 

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