Compiles the selected file or reference.
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
If forceBuild is set to true, compilation does not occur unless the project is out of date. When you initiate a compilation in the user interface (UI) by right-clicking a project, it is the same as if forceBuildis true and waitOnBuildis false. If you depend on the build for output, you should set waitOnBuild to true.
' Compiles the first project in the solution. ' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have ' a Visual C++ project loaded before running this example. Imports EnvDTE Imports Microsoft.VisualStudio.VCProjectEngine Public Module Module1 Sub Test() Dim file As VCFile Dim col As IVCCollection Dim fileconfig As VCFileConfiguration Dim prj As VCProject prj = DTE.Solution.Projects.Item(1).Object col = prj.Files file = col.Item(1) col = file.FileConfigurations fileconfig = col.Item("Debug|Win32") fileconfig.Compile(False, True) End Sub
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.