Click to See Complete Forum and Search --> : Give a VC++/CLR-Applicartion to friends
martho
December 13th, 2006, 10:58 AM
Hello! I wrote a small application in managed VC++. I want to give it to some friends without creating an installer. I told my friends to install the .net 2.0 framework. But the application still only runs on my computer with the Visual Studio installed: When running the .exe on another computer, it just crashes ("Problems with ....exe, should I report to Microsoft?").
What could be wrong?
wildfrog
December 13th, 2006, 11:21 AM
What could be wrong?Anything. What about adding some logging/tracing functionality to your application to determine 'how far' your application gets, and what piece of code that makes your application crash?
- petter
martho
December 13th, 2006, 11:47 AM
Thanks for your reply. Sorry, I think I didn't make this clear enough: The program runs in release-mode on every computer on which visual-studio is installed. With no visual-studio installed, the programm crashes right bevor doing anything (I put some tracing-routines in it).
So I assume some general installation-files for the .net-application are missing.
darwen
December 13th, 2006, 05:41 PM
You've probably got MFC or ATL linked as dynamic instead of static. In a managed application you shouldn't have either.
These are in the project settings, general pane.
Try changing both to 'static' linking. Or not being used at all...
How did you create your project i.e. which wizard did you use, what settings...
Also if you're using managed VC++ this really should be run against .NET 1.1 and not .NET 2.0. It should still work with .NET 2.0, but this might be an issue too because there are differences.
Darwen.
TheCPUWizard
December 13th, 2006, 06:09 PM
Darwen,
Why do you say...
Also if you're using managed VC++ this really should be run against .NET 1.1 and not .NET 2.0. It
Managed C++ is available for both runtimes. By default VS-2003 compiles for 1.1 and VS-2005 compiles for 2.0.
darwen
December 13th, 2006, 07:54 PM
That's true CPUWiz, but under 2005 you have to change compiler syntax from C++/CLI to managed C++ using a setting in the project options which is off by default i.e. you have to use syntax C++/CLI by default.
That's why I tend to think of managed C++ as 2003 and C++/CLI as 2005.
However thanks for correcting me.
Maybe I should have asked which version of DevStudio they were using, since it says VC++/CLR in the heading and managed C++ in the text of the post...
Darwen.
martho
December 14th, 2006, 03:43 AM
Hi and thanks for your replys. It's Visual Studio 2005. I don't use MFC.
I created an installer now, and it added 2 files:
Microsoft_VC80_CRT_x86.msn
policy_8_0_microsoft_vc80_crt_x86.msn
I think I should copy them somewhere on the target-machine.
Charu0306
December 16th, 2006, 07:17 PM
Its the deployment files that .NEt gives. Doesnt it give a small Setup too with it? I do not know VC++, but it did give me that in C#.
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.