Compartilhar via


VSProject.Refresh Method

Refreshes the appearance of the project in Solution Explorer, refreshes the references, and gets the latest compiled versions of the files.

Namespace:  VSLangProj
Assembly:  VSLangProj (in VSLangProj.dll)

Syntax

'Declaration
Sub Refresh
void Refresh()
void Refresh()
abstract Refresh : unit -> unit
function Refresh()

Remarks

This method updates the appearance of the project, including the files and folders, and gets the latest versions of all compilable files and the project file. It also refreshes all references.

Examples

[Visual Basic]

' Macro Editor
Imports VSLangProj
Sub RefreshExample()
   ' This example assumes that the first project in the solution is 
   ' either a Visual Basic or C# project.
   Dim aVSProject As VSProject = _
      CType(DTE.Solution.Projects.Item(1).Object, VSProject)
   aVSProject.Refresh()
End Sub

.NET Framework Security

See Also

Reference

VSProject Interface

VSLangProj Namespace