VS2008 C ++コンパイラはプロジェクトを構築しようとしています[重複]

StackOverflow https://stackoverflow.com/questions/5018319

質問

可能な重複:
Visual Studioはすべてを構築する

私は、同じプロジェクトの別のファイルに含まれている.cファイルを生成するIDLファイルを含むプロジェクトを持っています。

私はこのプロジェクトを構築していて、すべて問題ありません、そして私はプロジェクトを実行しようとしています、そして私はプロジェクトが時代遅れであると言われ、それを構築するのが好きです。IDLを構築するには[はい]を選択した場合は、再度コンパイルされます。

ビルドのために促さないようにVSプロジェクト設定を設定せずにこれを停止する方法はありますか?

役に立ちましたか?

解決

Once you've built the .idl file once, open it's properties and enable "Exclude from Build".

If you update the file, you can build it manually by selecting the file in Solution Explorer and choosing "Compile" (the shortcut is Ctrl+F7 on my setup, but this may vary).

If you don't include the generated files in your version control system, a fresh checkout will also need to manually rebuild the .idl file. This case in particular can cause a lot of confusion - it may be worth including the generated files under version control.

Another option is to create a custom build tool (or pre-build event), which would compare the last modified date/time of the .idl file with the last modified date/time of the output files and then call MIDL if required. This is the behaviour that VS uses to determine whether or not to run CL, but it is not used for MIDL and, as far as I know, cannot be enabled in VC++ 2008 project files.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top