This is probably an easy question, but I just can't seem to figure it out.
I have Visual Studio .NET at work, and Visual Studio 2005 at home, and a C# windows application I wrote that compiles and runs on either. When I build it at home, though, and then try to run the .exe at work, it gives an error message (something about needing some Visual Studio resource, I can't remember exactly).
Isn't there a way to build the project so that the .exe will run on any computer (any windows computer, that is), even one that doesn't have Visual Studio at all? I've tried looking in the project settings, but the only thing I can think of to try is building in release mode instead of debug mode, which doesn't seem to make a difference.
I'll try building it at work and then running it at home tonight, but even if it works, I'm still curious why it wouldn't work the other way.
Posts
It says .NET Framework 1.0
I think that's what's so annoying. That should work, and it feels like it should, but I don't know for sure that it does. It just seems like I should be able to build an app that can run on a computer without visual studio.
I've had this happen with a game I made when I didn't include a .dll in the install that is on computers with Studio and I hadn't tested it on any non development machines. I'm not sure how to compile everything into one .exe, but perhaps someone else here or someone on google groups does.
The only other advice I can give you if none of the above help is to make sure that your target platform is Any CPU in the build options.
"Read twice, post once. It's almost like 'measure twice, cut once' only with reading." - MetaverseNomad
Good call, I didn't notice that before, but I'll have to try that, thanks.
Installed on which computer?
You need the .NET 2.0 Framework installed on the computer that does not have Visual Studio 2005.
It is an optional download on the Windows Update site. FYI.
If you want to write a program that doesn't require the framework, you need to use C++ in VS 2003 or 2005. If you use VS 6 and earlier, you can write a VB app that will also run on any Windows system. No C# in those old versions though, obviously.
http://www.thelostworlds.net/