Frage

mögliche Duplikat:
Visual Studio bauen hält alles mit

Ich habe ein Projekt, das eine IDL-Datei enthält, die eine .c-Datei generiert, die in einer anderen Datei desselben Projekts enthalten ist.

Ich baue dieses Projekt und alles ist in Ordnung, ich versuche dann, das Projekt auszuführen, und ich bin mir gesagt, dass das Projekt veraltet ist und ich möchte es bauen.Wenn ich Ja auswähle, um es aufzubauen, wird die IDL wieder kompiliert.

Gibt es eine Möglichkeit, dies anzuhalten, ohne die VS-Projekteinstellung einzustellen, um mich niemals für einen Build aufzufragen?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top