Vistual studio 2008 executaable cannot run on target system without .net frame work
i have crated application in VS 2008 using VC console project. i execute this executable to target system which does not have VS i got error "The system cannot execute the specified programe." i have al开发者_如何转开发so installed vcredist_x86.exe on target system but no success. i have the following test programe
#include "stdafx.h"
#include"iostream"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
cout<<"hello ";
return 0;
}
please help me what i am missing
Don't try to run the Debug build of your program on another machine, only deploy the Release build.
For small programs like these, you don't have any need for the shared CRT dlls. Right-click your project in the Solution Explorer window, Properties, C/C++, Code Generation. Be sure the Release configuration is selected (upper left combo). Change Runtime Library to /MT.
Anything program you create with .NET NEEDS .NET framework to be installed onto target machine.
Every single DLL that you refer to in ypur program is either to be found within the .NET GAC (global assembly cache) of the target machine, either installed together with your software. But DO NOT try to embed the entire .NET in your app, they are worth gigabytes...
Besides, MS provides for .NET lookup, download and installation within VS install process (like clickOnce etc.)
Alternatively, you could try Mono, provided you are patient... Mono mimicks .NET features, but stays several monthes (years) behind .NET! Anyway, Mono must be installed on target machine as well, and .NET is free for Windows users, so...
精彩评论