Problem redistributing C++/CLR App
-
Hi, i developed a C++/CLR App using Visual Studio 2008. The following are the settings 1. Developed using VS2008, Featurepack was installed but not used(april) (x86 machine Vista SP1) 2. /clr:pure, pure .NET, no native code. 3. Target framework set to 2.0 4. I used cliext STL/CLR in the project. 5. Release mode When i try to distribute the compiled exe on a Windows Xp SP2 PC, i tried the following and the program would not run. 1. I copied the exe to target machine 2. Installed .NET framework 2.0 3. Ran the app, and an error occurs - "The application failed to start because of configuration incorrect..." I then tried to install 4. Install VCredist 2008 5. Ran the app, the app launches but a new error occurs "System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualC.STLCLR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualC.STLCLR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ...." I then installed .NET framework 3.5 and the app finally runs perfectly. What i dont understand is, 1. Why do i need the VS2008 redist? I thought this was only for native code. I didnt use any native code in my assembly, in fact i compiled as /clr:pure! Checking the .exe using dependecywalker shows that the exe only depends on MSCOREE.DLL, no MFC,CRT etc. 2. Why did the compilation proceeded even in VS2008 when i selected the target framework to be 2.0. I used STL/CLR in my app, why didnt the compiler tell me that STL/CLR is part of .NET 3.5 and produce an error during compilation? 3. I was expecting it to run properly with .NET framework 2.0 installed only, just like any other C# code targetted for this framework. I didnt expect vcredist and .net 3.5 required.. Can anyone clarify this? Anyone had this problem, or my approach was incorrect? Thanks
-
Hi, i developed a C++/CLR App using Visual Studio 2008. The following are the settings 1. Developed using VS2008, Featurepack was installed but not used(april) (x86 machine Vista SP1) 2. /clr:pure, pure .NET, no native code. 3. Target framework set to 2.0 4. I used cliext STL/CLR in the project. 5. Release mode When i try to distribute the compiled exe on a Windows Xp SP2 PC, i tried the following and the program would not run. 1. I copied the exe to target machine 2. Installed .NET framework 2.0 3. Ran the app, and an error occurs - "The application failed to start because of configuration incorrect..." I then tried to install 4. Install VCredist 2008 5. Ran the app, the app launches but a new error occurs "System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualC.STLCLR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.VisualC.STLCLR, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ...." I then installed .NET framework 3.5 and the app finally runs perfectly. What i dont understand is, 1. Why do i need the VS2008 redist? I thought this was only for native code. I didnt use any native code in my assembly, in fact i compiled as /clr:pure! Checking the .exe using dependecywalker shows that the exe only depends on MSCOREE.DLL, no MFC,CRT etc. 2. Why did the compilation proceeded even in VS2008 when i selected the target framework to be 2.0. I used STL/CLR in my app, why didnt the compiler tell me that STL/CLR is part of .NET 3.5 and produce an error during compilation? 3. I was expecting it to run properly with .NET framework 2.0 installed only, just like any other C# code targetted for this framework. I didnt expect vcredist and .net 3.5 required.. Can anyone clarify this? Anyone had this problem, or my approach was incorrect? Thanks
Might it be the manifest file that is your issue ?
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )