IGLib
1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
|
This class allows loading information about configurations and assemblies in a Visual Studio project file and inspecting them. Only the most common project types are supported and an exception is thrown if an attempt is made to load an invalid file or one of an unknown type. More...
Classes | |
class | ProjectConfig |
Public Member Functions | |
VSProject (string projectPath) | |
TestPackage | GetTestPackage () |
Gets a test package for the primary or active configuration within the project. The package includes all the assemblies and any settings specified in the project format. More... | |
TestPackage | GetTestPackage (string configName) |
Gets a TestPackage for a specific configuration within the project. The package includes all the assemblies and any settings specified in the project format. More... | |
Static Public Member Functions | |
static bool | IsProjectFile (string path) |
static bool | IsSolutionFile (string path) |
Properties | |
string | ProjectPath [get, private set] |
The path to the project More... | |
string | ActiveConfigName [get] |
Gets the active configuration, as defined by the particular project. For a VS project, we use the first config found. More... | |
IList< string > | ConfigNames [get] |
string | Name [get] |
The name of the project. More... | |
![]() | |
string | ProjectPath [get] |
Gets the path to the file storing this project, if any. If the project has not been saved, this is null. More... | |
string | ActiveConfigName [get] |
Gets the active configuration, as defined by the particular project. More... | |
IList< string > | ConfigNames [get] |
Gets a list of the configs for this project More... | |
Private Member Functions | |
void | Load () |
Load a project in various ways, depending on the extension. More... | |
bool | TryLoadLegacyProject () |
Load a project in the legacy VS2003 format. Note that this method is not called for C++ projects using the same format, because the details differ. More... | |
void | LoadMSBuildProject () |
Load a non-C++ project in the MsBuild format introduced with VS2005 More... | |
void | LoadLegacyCppProject () |
Load a C++ project in the legacy format, which was used for C++ much longer than it was used for the other languages supported. More... | |
void | ThrowInvalidFileType (string projectPath) |
void | ThrowInvalidFormat (string projectPath, Exception e) |
string | SafeAttributeValue (XmlNode node, string attrName) |
string | RequiredAttributeValue (XmlNode node, string name) |
Static Private Member Functions | |
static string | GetConfigNameFromCondition (XmlElement configNode) |
Private Attributes | |
const string | SOLUTION_EXTENSION = ".sln" |
VS Solution extension More... | |
XmlDocument | _doc |
The XML representation of the project More... | |
IDictionary< string, ProjectConfig > | _configs = new Dictionary<string, ProjectConfig>() |
The list of all our configs More... | |
Static Private Attributes | |
static readonly string[] | PROJECT_EXTENSIONS = { ".csproj", ".vbproj", ".vjsproj", ".vcproj", ".fsproj" } |
VS Project extentions More... | |
This class allows loading information about configurations and assemblies in a Visual Studio project file and inspecting them. Only the most common project types are supported and an exception is thrown if an attempt is made to load an invalid file or one of an unknown type.
|
inline |
|
inline |
Gets a test package for the primary or active configuration within the project. The package includes all the assemblies and any settings specified in the project format.
Implements NUnit.Engine.Extensibility.IProject.
|
inline |
Gets a TestPackage for a specific configuration within the project. The package includes all the assemblies and any settings specified in the project format.
configName | The name of the config to use |
Implements NUnit.Engine.Extensibility.IProject.
References NUnit.Engine.TestPackage.AddSubPackage().
|
inlinestatic |
Referenced by NUnit.Engine.Services.ProjectLoaders.VisualStudioProjectLoader.CanLoadFrom(), NUnit.Engine.Services.ProjectLoaders.VSSolution.Load(), NUnit.Engine.Services.ProjectLoaders.VisualStudioProjectLoader.LoadFrom(), and NUnit.Engine.Services.ProjectLoaders.Tests.VSProjectTests.NotWebProject().
|
inlinestatic |
|
inlineprivate |
Load a project in various ways, depending on the extension.
|
inlineprivate |
Load a project in the legacy VS2003 format. Note that this method is not called for C++ projects using the same format, because the details differ.
|
inlineprivate |
Load a non-C++ project in the MsBuild format introduced with VS2005
|
inlineprivate |
Load a C++ project in the legacy format, which was used for C++ much longer than it was used for the other languages supported.
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlineprivate |
|
inlinestaticprivate |
|
staticprivate |
VS Project extentions
|
private |
VS Solution extension
|
private |
The XML representation of the project
|
private |
The list of all our configs
|
getprivate set |
The path to the project
|
get |
Gets the active configuration, as defined by the particular project. For a VS project, we use the first config found.
|
get |
|
get |
The name of the project.