14 Replies - 1279 Views - Last Post: 23 June 2010 - 01:00 AM Rate Topic: -----

#1 xsharpedgex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 22-June 10

c# exe to managed?

Posted 22 June 2010 - 03:41 AM

Yeah I searched around on google and read that you need the CRL on the computer in order to run a c# *.exe. So I searched around to see if I could somehow convert my *.exe to native code(If I'm right) none successfull. So I thought about another solution, including having a installer for my program that searches through your computer and checks if it has the CRL, if not it either starts installing it or takes you to the microsoft website so you can download it.

Anyway, my questions are the following:
How do I convert my exe so it can run without the CRL. If that isn't possible then, How do I make an installer as I described above.

I hope my question is clear, thanks for the answers.

Is This A Good Question/Topic? 0
  • +

Replies To: c# exe to managed?

#2 Adkins  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 66
  • View blog
  • Posts: 560
  • Joined: 27-October 09

Re: c# exe to managed?

Posted 22 June 2010 - 04:03 AM

Microsoft offers a bootstrapper for .NET that gives the client computer all the necessary files to run any .NET applicaiton. The name of it escapes me right now, but I will look around and see what I can find.

As for making your .NET *.exe native, I am not aware of any, but I would love to be proven wrong ;)

Here is the link to a Microsoft site that should help you make an installation (assuming you know how to make an MSI that is)

Microsoft .NET Framework Setup.exe Bootstrapper Sample

This post has been edited by Adkins: 22 June 2010 - 04:06 AM

Was This Post Helpful? 2
  • +
  • -

#3 xsharpedgex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 22-June 10

Re: c# exe to managed?

Posted 22 June 2010 - 04:31 AM

Thank you for your answer, I've no idea how to make a MSI but I'll look around on google. I'll post if I fix it otherwise more solutions are happily accepted ^^
Was This Post Helpful? 0
  • +
  • -

#4 Adkins  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 66
  • View blog
  • Posts: 560
  • Joined: 27-October 09

Re: c# exe to managed?

Posted 22 June 2010 - 04:41 AM

for making MSI's (assuming you plan to do more than just one) I would recommend looking into WiX (Windows Installer XML). It is free, fairly easy to learn, and has some tools available. If you only plan on doing this one though, then try out the Visual Studio Setup Project (I am not sure what version of VS you need for that). Also just search for an MSI maker (or something along those lines) and you should be able to find a cheap tool that can do the trick.
Was This Post Helpful? 0
  • +
  • -

#5 Momerath  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 1012
  • View blog
  • Posts: 2,444
  • Joined: 04-October 09

Re: c# exe to managed?

Posted 22 June 2010 - 06:09 AM

Spoon Studio and Salamander both claim to create native exe that do not need the .NET CLR to execute.
Was This Post Helpful? 0
  • +
  • -

#6 Adkins  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 66
  • View blog
  • Posts: 560
  • Joined: 27-October 09

Re: c# exe to managed?

Posted 22 June 2010 - 06:24 AM

Do you have any experience with either one? They look interesting till I caught a glimpse of the price tag. Ouch!
Was This Post Helpful? 0
  • +
  • -

#7 xsharpedgex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 22-June 10

Re: c# exe to managed?

Posted 22 June 2010 - 07:03 AM

I don't, it would've been perfect if it was free xD. I think the easiest thing would be to create an MSI that also installs the CRL.
Also I'm having some trouble installing Wix 3.5 with visual studio express editions...

This post has been edited by xsharpedgex: 22 June 2010 - 07:05 AM

Was This Post Helpful? 0
  • +
  • -

#8 Adkins  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 66
  • View blog
  • Posts: 560
  • Joined: 27-October 09

Re: c# exe to managed?

Posted 22 June 2010 - 07:07 AM

what kind of problems. It went off without a hitch for me with Visual Studio C# 2008 Express. Anything in particular or just general issues?
Was This Post Helpful? 0
  • +
  • -

#9 xsharpedgex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 22-June 10

Re: c# exe to managed?

Posted 22 June 2010 - 07:22 AM

Maybe I'm just being dumb but heres what I did.
I went to www.wix.sourceforge.net, clicked on Version 3.5 (beta) under downloads and then 'weekly releases' I scrolled down and downloaded the latest one.
After the download I end up with a .msi file which I open and it starts installing. Then I get this message saying:

:this is the full message:
Votive, the WiX project and editor package for Visual Studio, cannot be installed because Visual Studio 2005, 2008 or 2010 Standard Edition or higher is not installed. However, the WiX schema files can be integrated into Visual studio express editions to enhance editing without project support.
:This message tells me nothing, thats pretty much the problem :P :

This post has been edited by xsharpedgex: 22 June 2010 - 07:25 AM

Was This Post Helpful? 0
  • +
  • -

#10 Adkins  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 66
  • View blog
  • Posts: 560
  • Joined: 27-October 09

Re: c# exe to managed?

Posted 22 June 2010 - 07:31 AM

okay. It is just saying that you won't be able to make Visual Studio WiX Projects and you won't be able to build the MSI's directly from VS, but you will get everything that you need to build and create them outside of VS. You will still be able to edit the WiX Source files in Visual Studio, but that is about it. I will have to check on my VS install at home when I get there. I don't usually build through VS anywho :P
Was This Post Helpful? 0
  • +
  • -

#11 xsharpedgex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 22-June 10

Re: c# exe to managed?

Posted 22 June 2010 - 08:21 AM

Been looking at WiX tutorials, it's really confusin. Do you know of any good tutorials showing how to do it outside of VS ? Been reading one really confusin. Can I just make it in a .txt file and save it as a .wxs file? The tutorials I've been reading doesn't mention that..

Thanks for answer.
Was This Post Helpful? 0
  • +
  • -

#12 Adkins  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 66
  • View blog
  • Posts: 560
  • Joined: 27-October 09

Re: c# exe to managed?

Posted 22 June 2010 - 12:05 PM

To be perfectly honest, I make most of my *.wxs for personal use in textpad and just save it as blah.wxs There is no problem with doing that. Below are a link to THE WiX tutorial (I found it really helpful if a little hard to navigate the first time), and the WiX documentation site. That last one is great if you just need a little more info on something, but you know what you are looking for.

WiX Tutorial

WiX Documentation Site: Use the search to save time and suffering ;)
Was This Post Helpful? 0
  • +
  • -

#13 xsharpedgex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 22-June 10

Re: c# exe to managed?

Posted 22 June 2010 - 01:21 PM

Thank you for all your help :) I shall look into this and see where I get :)
Was This Post Helpful? 0
  • +
  • -

#14 X@MPP  Icon User is offline

  • 僕わ馬鹿ですね?
  • member icon

Reputation: 36
  • View blog
  • Posts: 1,014
  • Joined: 20-February 09

Re: c# exe to managed?

Posted 22 June 2010 - 10:50 PM

I believe that Inno Can Create MSI's and its free. as for a bootstrapper i know of DotNetInstaller I hope theses Help
Was This Post Helpful? 0
  • +
  • -

#15 xsharpedgex  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 22-June 10

Re: c# exe to managed?

Posted 23 June 2010 - 01:00 AM

Yes I'll look into those thank you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1