Just contact C #, under the Linux do Habits C and C + +, in this machine run OK, get to other machines, incredibly run, your sister Ah, how the matter, no. NET Framework, originally similar to Java, the. NET Framework is equivalent to C # virtual machines. After the installation of the FW, or not run up, reported the following error
Damn, what a bird situation. Use Dumpbin-import xxx.exe to copy the required DLL to the past or not. Do you still have to pretend to be VS2010? The pit father's I take the vs2010 to install a half-day, installed 2010 after sure can run, this your sister's difficult to user installed development tools software, this is not right AH. Sure enough, there's a way--package deployment. In the process of packaging deployment, it was found that the interface with a VB control, the DLL of this control is not copied, the estimated number of copies of this copy is no problem, did not try. Pack first.
C # program Packaging steps:
STEP1: New Setup Project
Add a project to the Iapengi-win solution: Right-click Solution, add-new project-Other project type--visual Studio install--Setup project (or direct search for Setup project)
Before and after the solution: Iapengicore do not have to go to the tube, this is written in C data engine algorithm, made DLL to provide to the Iapengi-win call. C # Packaged deployment only cares: 1. Items to be packaged (Iapengi-win); 2. How to package or how to set up the installation project (IAPENGISETUP)
STEP2: Add the necessary files
1. Right-click on "Add--Project output-select Iapengi-win Project" in the "Application Folder"
2. Add the uninstaller, copy the Msiexec.exe in C:\Windows\System32, and in the "Application Folder" right click on "Add--file-Select the Msiexec.exe that you just copied"
3. In the "Application Folder " right-click "Add--FILE--Select your icon *.ico and your own DLL, program configuration table, etc."
STEP3: Create desktop and Uninstall shortcuts
1. Create the main output from the shortcut, rename to Iapengi-win, Properties--set ICO, drag to "User's Program Menu", create shortcut in the same way, drag to "user desktop"
2. Create the uninstaller shortcut, first note the project (Setup project) ProductCode, check the Setup project-view-Other Windows--Properties window--productcode similar: {8D 0930FF-63CD-4FBD-94FC-3467C38F579D}
3. Create an uninstall shortcut, which is the shortcut to Msiexec.exe, rename "Unload Iapengi-win", right-click the Properties window, find an item called arguments, first fill in the 2 ProductCode in the Paste on/x back. Add shortcut "Uninstall Iapengi-win" to "User's program menu"
STEP4: Packaging the. NET Framework
In Iapenginsetup, Project properties, select Prerequisites, choose "download prerequisites from the same location as my application" to determine
Build, a setup program on it, install to other machine run OK.
Add:
The program has two profiles, and the "Open file Location" in the properties of the desktop shortcut is grayed out. The following records the workaround:
(My shortcut points to Iapengi-win.exe)
1. Download Orca software: http://download.csdn.net/detail/leo9150285/5267426
2. Open the MSI file in the packager with Orca, Iapengisetup.msi, find the File option, locate the iapengi-win.exe that points to, copy the file value (Fileval), and the yellow highlight.
3. The list on the left finds the Shutcut option, finds the shortcut to change, modifies the target's defaultfeature to [#FileVal] here the Fileval is 2. In the copied values, note the brackets and # numbers before and after the---[# ...]
4. Re-uninstall, install, OK
2013-5-2 Day Supplement:
1. In order to make the installation of the current program, indeed, as I guess, the lack of VB component DLL files, this DLL is really difficult to find, not seen in depends, and later in the "Project-Properties-publish-application Files" found, the map is as follows
2. After the installation project, installation-run EXE program, found that the program is not running correctly, many components with E index algorithm is not properly executed, the same program, not made into the installation project and after the installation of the project, the results of the operation is inconsistent. My program calls the DLL as follows:
Iapengi-win.exe-----"IAPCore.dll-----" Xxx.dll,xxx.dll is the other system library.
It is estimated that when calling Xxx.dll, there is no call, but it is strange that the system does not have any error prompts to understand why.
The final solution is to compile the IAPCore.dll with the Compile option static (Project-property--c/c++--code Generation-the runtime changes to MT)
http://blog.csdn.net/leo9150285/article/details/8809454
How a program made in C # can be packaged for deployment and run on another PC