public sealed class VisualBasicProjectFileManager
Public NotInheritable Class VisualBasicProjectFileManager
Dim instance As VisualBasicProjectFileManager
public ref class VisualBasicProjectFileManager sealed
[<SealedAttribute>]
type VisualBasicProjectFileManager = class end
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
Dim vbproj As New VisualBasicProjectFileManager("C:\MyProject.vbproj")
' Set some properties.
With vbproj
.ProjectGuid = Guid.NewGuid()
.AutoGenerateBindingRedirects = True
.OptionExplicitEnabled = True
.OptionStrictEnabled = True
.OptionInferEnabled = False
End With
' Add References (or clear them).
Dim referencedAssemblies As SortedDictionary(Of String, String) = vbproj.ReferencedAssemblies
With referencedAssemblies
.Add("System.Net", Nothing) ' Assemblies stored in GAC directory doesnt's require a hint path.
.Add("DevCase.Application", "..\..\DevCase\DevCase.Application.dll") ' Relative path.
.Add("DevCase.Core", "C:\DevCase\DevCase.Core.dll") ' Absolute path.
End With
vbproj.ReferencedAssemblies = referencedAssemblies
' Add Imports (or clear them).
Dim importedNamespaces As SortedSet(Of String) = vbproj.ImportedNamespaces
With importedNamespaces
.Add("System.Net")
.Add("DevCase.Application")
.Add("DevCase.Core")
End With
vbproj.ImportedNamespaces = importedNamespaces
' Save the changes we made, to a new file.
' Note that the "vbproj" instance just serves as a visual representation, changes are not saved in the original file,
' so we need to save any changes using the "vbproj.Document.Save()" method (we can replace the original file if we like).
vbproj.Document.Save("C:\modified.vbproj", SaveOptions.None)
Process.Start("notepad.exe", "C:\modified.vbproj")
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
VisualBasicProjectFileManager(FileInfo) | Initializes a new instance of the VisualBasicProjectFileManager class. |
VisualBasicProjectFileManager(String) | Initializes a new instance of the VisualBasicProjectFileManager class. |
AssemblyName | Gets or sets the project's assembly name. |
AutoGenerateBindingRedirects | Gets or sets a value that indicates whether binding redirects may be automatically added to the app configuration file to override assembly unification. |
Configuration | Gets or sets the project's configuration mode. |
Document | Gets the Xml document representation. |
File | Gets the project file. |
FileAlignment | Gets or sets the project's file alignment. |
ImportedNamespaces | Gets or sets the imported namespaces. |
ItemGroupNodes | Gets a collection of the <ItemGroup> nodes. |
OptionExplicitEnabled | Gets or sets a value that determines whether OptionExplicit is enabled by default in the project. |
OptionInferEnabled | Gets or sets a value that determines whether OptionInfer is enabled by default in the project. |
OptionStrictEnabled | Gets or sets a value that determines whether OptionStrict is enabled by default in the project. |
OutputType | Gets or sets the project's output type. |
Platform | Gets or sets the project's target platform. |
ProjectGuid | Gets or sets the project GUID. |
PropertyGroupNodes | Gets a collection of the <PropertyGroup> nodes. |
ReferencedAssemblies | Gets or sets the referenced assemblies. |
RootNamespace | Gets or sets the project's root namespace. |
StartupObject | Gets or sets the project's startup object. |
TargetFrameworkVersion | Gets or sets the target framework version. |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
ToString | Returns a string that represents the current object. (Inherited from Object) |
CanConvertTo |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
CanConvertToT |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions) |
IsDisposable |
Determines whether the specified object is a disposable type
(i.e., it implements IDisposable interface).
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
ThrowIfNullTException |
Throws the specified exception if the source object is null.
(Defined by ObjectExtensions) |