Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Gets the project or project item for the configuration.
Namespace: EnvDTE
Assembly: EnvDTE (in EnvDTE.dll)
Syntax
'Declaration
ReadOnly Property Owner As Object
'Usage
Dim instance As Configuration
Dim value As Object
value = instance.Owner
Object Owner { get; }
property Object^ Owner {
Object^ get ();
}
function get Owner () : Object
Property Value
Type: System.Object
A Project object.
Examples
public void CodeExample(DTE2 dte, AddIn addin)
{ // Make sure you have a solution loaded into Visual Studio
// before running the following example.
try
{
Project prj;
Configuration config;
OutputGroups outPGs;
Properties props;
if (dte.Solution.Projects.Count > 0)
{
prj = dte.Solution.Projects.Item(1);
config = prj.ConfigurationManager.ActiveConfiguration;
// Return a collection of OutputGroup objects that contain
// the names of files that are outputs for the project.
outPGs = config.OutputGroups;
MessageBox.Show(outPGs.Count.ToString());
// Returns the project for the config.
MessageBox.Show(((Project)config.Owner).Name);
// Returning the platform name for the Configuration.
MessageBox.Show(config.PlatformName);
// Returning all properties for Configuration object.
props = config.Properties;
string p = "";
foreach (Property prop in props)
{
p = p + prop.Name + "\n";
}
MessageBox.Show(p);
}
}
catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
}
.NET Framework Security
- 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.