When a reference to com is added to the project, InterOP is automatically generated. *. DLL, but the dll version is always 1.0. if you use InstallShield to create an installation package and modify the installation package, the DLL will not be updated because the version is always 1.0.
If you want to modify the version number, you can use tlbimp.exe to re-export a DLL without finding a convenient method. This tool can include the version number.
Tlbimp.exe (Type Library import program) References http://msdn.microsoft.com/zh-cn/site/tt0cf3sx
- Compile the original project to ensure normal operation. The release directory contains an InterOP. *. dll file. The version number of this file is 1.0.
- Find this file first. My machine file is in c: \ Program Files \ microsoft sdks \ windows \ v7.0a \ bin \
- Copy to a specific directory, or do not copy rows. Use the full path when writing bat.
- Execute bat with the following code:
"tlbimp.exe" ../player/release/MyCom.tlb /out:release/Interop.WebCameraATLFrameLib.dll /asmversion:2.1.1101.15007 /namespace:WebCameraATLFrameLib
Note:
"Tlbimp.exe":If it is not in this directory, write the full path.
../Player/release/mycom. TLB:The TLB file generated by COM, usually in the release directory
/Out: Release/InterOP. mycom. dll:Output file path
/Asmversion: 2.1.1101.15007:Version number of the output file
/Namespace: mycom:The namespace in the project must be the same as the namespace in the project. Be sure to confirm the case.
Make sure that the relative path above is normal.
Check the DLL in the release directory. The version number is available and runs properly.
You can also put the bat command in the subsequent operations of.
Can refer to this brother's approach: http://www.cnblogs.com/linlf03/archive/2011/11/18/2253760.html
If anyone finds a simpler method, please let us know. Thank you!