How to create the inf file for a smart device cab project from command line?

青春壹個敷衍的年華 提交于 2019-12-21 04:30:21

问题


I am trying to get my continuous integration to create build the smart device cab project from within msbuild on the command line. Everything that I have found says to use the inf file (with cabwiz) created when you build the project from within visual studio. Is there a way to create the inf using the .vddproj file so that I can then use it with cabwiz.exe?


回答1:


Your best bet is either to run devenv.exe (or devenv.com) from the msbuild task, or to steal the INF that Visual Studio generates and use it to run cabwiz.exe from the msbuild task.

MVP Discussion: http://social.microsoft.com/Forums/en-US/csharpide/thread/a3caae81-fd79-45a9-ac38-f471e30e5b2a

CabWiz.exe: http://msdn.microsoft.com/en-us/library/aa924359.aspx

INF reference: http://msdn.microsoft.com/en-us/library/aa924371.aspx

Examples: http://blog.enterprisemobile.com/2008/07/automating-build-versioning-and-publishing-smart-device-projects-with-team-foundation-build/ http://blog.opennetcf.com/ctacke/2008/09/18/AutomatingCABFileGenerationWithMSBUILD.aspx http://guystarbuck.blogspot.com/2006/08/automate-build-of-windows-moble-cab.html




回答2:


How about adding a "Smart Device CAB Project" to your solution (available in Visual Studio 2005 and 2008)? These kind of projects build the .inf file from the output of the other projects in the solution and spawn "cabwiz.exe" to generate your final cab.

I personally use NAnt instead of MSBuild, and prefer to manually edit my inf file (doesn't change that often), but the CAB project seem to be the way to go for a solution that uses MSBuild.

PS: be careful if your cab needs to set a registry dword to -1 (0xffffffff): cabwiz is known to have a nasty bug when it comes to this.

PS2: also note this other post.




回答3:


Are you asking how to create the cab file or how to include it in your project? You could create the inf then add the command line to the post build event.



来源:https://stackoverflow.com/questions/364256/how-to-create-the-inf-file-for-a-smart-device-cab-project-from-command-line

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!