Table of Contents

Class DotNetProject

Namespace
Alternet.Common.Projects.DotNet
Assembly
Alternet.Common.v10.dll

Represents properties and methods used to store and manipulate Visual Studio project content.

public class DotNetProject : Project
Inheritance
DotNetProject
Derived
Extension Methods

Properties

AssemblyName

Gets or sets's project's Assembly name.

AssemblyResources

Gets the list of the assembly (with Generator option) resources embedded into the project.

AutoReferences

Gets a list of assemblies that are automatically added to the project.

DefaultExtension

Gets a default extension of the project's code files.

Folders

Gets list of folders used in the project.

FrameworkReferences

Gets a list of frameworks used in the project.

ImplicitUsings

Gets a boolean value indicating whether implicit global using directives are enabled in this project.

ImportedNamespaces

Gets list of imported namespaces used in the project.

IsMaui

Gets a value indicating whether this is Maui project or not.

IsSdkStyle

Gets a value indicating whether this is SDK-style.

IsWindowsForms

Gets a value indicating whether this is WinForms project or not.

IsWpf

Gets a value indicating whether this is WPF project or not.

LanguageVersion

Gets project's language version.

MyType

Gets or sets string value that specifies MyType for VB project.

Parent

Gets or sets a Project that is a parent of this project.

ProjectDependencies

Gets or sets a list of project's dependencies.

ProjectExtension

Gets an extension of the this project.

ProjectGuid

Gets or sets's project's GUID.

ProjectHostGuid

Gets or sets's project's host GUID.

ProjectReferences

Gets list of assemblies used in the project.

References

Gets list of assemblies used in the project.

RelativePath

Gets or sets a relative file path of this project.

RootNamespace

Gets project's root namespace.

SolutionItems

Gets or sets a list of project's solution items.

SolutionSettings

Gets a ProjectSolutionSettings for this project.

TargetFramework

Gets or sets a project's target framework.

TargetFrameworks

Gets or sets a project's target framework.

Methods

AddFile(string)

Adds specified code or resource file to the project.

AddFile(string, BuildAction, CopyLocal)

Adds specified code or resource file to the project with given attributes.

AddNuGetReference(string, string)

Adds specified NUGET reference to the project.

AddProjectFolder(string)

Adds specified folder to the project.

AddReference(string, string?)

Adds specified reference to the project.

AddSolutionFile(string, string)

Add the specified file to the project's solution item list.

AllFiles(bool)

Gets list of files included in the project.

GetFileAttribute(string)

Retrieves the file attribute of the specified file.

GetFileBuildAction(string)

Retrieves the build action of the specified file.

IsProjectFile(string)
IsXamlFile(string)
Load(string)

Loads project from specified source.

ProjectContentUpdated(string, bool, bool)
RemoveFile(string)

Removes specified file from the project.

RemoveFolder(string)

Removes specified folder from the project.

RemoveProjectFolder(string, bool)

Removes specified project folder from the project.

RemoveProjectReference(ProjectReference)

Removes specified reference from the project.

RemoveReference(string)

Removes specified reference from the project.

RemoveSolutionFile(string, string)

Removes the specified file from the project's solution item list.

ReplaceProjectFolder(string, string, ref string)

Changes name of the project's folder.

Reset()

Resets Project to the default state.

ResolveFolder(string, out string)
SetFileAttribute(string, BuildAction)

Sets the given attribute to the specific file.

SetFileAttribute(string, CopyLocal)

Sets the given attribute to the specific file.

TryResolveAbsolutePath(string)

Try to find real reference name matches the given name.

TryResolveAbsolutePaths(IList<string>)

Try to find real references name matches the given names.