Archive for April 13th, 2007
VS2005打包问题终于搞定
参考:
http://msdn2.microsoft.com/en-us/library/ms235291(VS.80).aspx
Deploying Visual C++ library DLLs as private assemblies
In this scenario, the application is deployed by just copying a folder from the development computer to the target computer, and installing dependent assemblies as private side-by-side assemblies. To deploy Visual C++ libraries as private assemblies, perform the following steps:
Steps
- Create a folder structure on the development computer that matches the folder structure to be used on the target computer. For this example, create a \bin folder and copy myapplication.exe there. Then create a \bin\mylibrary folder and copy MyLibrary.dll there.
- On the development computer, from %PROGDIR%\Microsoft Visual Studio 8\VC\Redist\x86, copy Microsoft.VC80.CRT and Microsoft.VC80.MFC to \bin and to \bin\MyLibrary.
NoteVisual C++ Express does not create %PROGDIR%\Microsoft Visual Studio 8\VC\Redist\ during installation on the development computer. To redistribute Visual C++ libraries with applications built with Visual C++ Express, please use Visual C++ Redistributable Packages (VCRedist_*.exe). See section “Deploying Visual C++ library DLLs as shared assemblies” above for more information.
NoteFor deploying 64-bit applications to 64-bit operating systems, use \vc\redist\amd64 or \vc\redist\ia64. - Copy the \bin folder to the target computer. On a target computer with manifest-based binding support (Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Vista) no further preparation is necessary. On a computer without such support (Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows 2000), Microsoft.VC80.CRT and Microsoft.VC80.MFC must be on the path.
NoteFor debug applications, use debug DLLs from \vc\redist\debug_nonredist\. However, remote debugging may not work for an application that deploys debug versions of Visual C++ libraries as private assemblies. For more information, see Preparing a Test Machine To Run a Debug Executable.
NoteIf you want to do remote debugging on the target machine, you must copy over the debug DLLs or follow the procedure to install debug DLLs in Preparing a Test Machine To Run a Debug Executable.
再也不用VS2005的Setup Project了,麻烦,并且要求目标机器安装Windows Installer,搜遍了半个地球,最后才在上面的文章中找到问题所在,上面的写的很复杂,其实就是几句话:
1:Copy X:\Program Files\Microsoft Visual Studio 8\VC\redist\x86下目录Microsoft.VC80.CRT和目录Microsoft.VC80.MFC中的所有文件到你的程序的路径下
2:没有2,完了。