我在Windows 7 Ultimate x64上使用VS2010。 我想在一個解決方案中自動構建多項目。VisualStudio - Q:如何在解決方案中構建多個項目之前執行過程
例如:) 解決方案StormSolution
包含4個項目。
1:Storm_Module1(輸出文件擴展名:DLL)
2:Storm_Module2(輸出文件擴展名:DLL)
3:CombineModule12(輸出文件擴展名:DAT)
4: ConvertModule2CFGFile(輸出文件擴展名:cfg)
第1,2步: Storm_Module1
和Storm_Module2
的結果是Standard Windows DLL
。
步驟3:的CombineModule12
結果是開放Storm_Module1.dll和Storm_Module2.dll使「combined.dat」文件,就像cmd.exe /c copy /b storm_module1.dll + storm_module2.dll combined.dat
命令。
步驟3-1:然後,讓combined.dat文件到encrypted_combined.dat文件,encryption_tool。
第4步:打開「encrypted_combined.dat」文件,並將其製作成自己指定的cfg
文件。
問題發生在步驟4。我無法自動構建解決方案風暴。 因爲我已經做「combined.dat」的Step3
結果爲「encrypted_combined.dat」與encryption_tool。
因此,如果我在沒有任何操作的情況下構建Storm解決方案,ConvertModule2CFGFile
項目無法打開最新更新encrypted_combined.dat。
我該如何執行加密工具Step4。
加密工具可以用參數執行。
ex :) cmd.exe /c "encryption tool.exe -mode_crypt combined.dat -output encrypted_combined.dat
。
在構建項目之前無法執行過程嗎?
使用def文件使用lib.exe實用程序爲相應的* .dll文件創建* .lib文件。 dll模塊不需要保存在解決方案中,因爲它們在編譯期間不需要。保持項目鏈接器設置爲共享模式。 – ark1974