Method | Description | |
---|---|---|
AddImportWindowsDesktopTargets ( ProjectPropertyGroupElement propGroup ) : void |
Adds the ImportWindowsDesktopTargets=true property to ensure builds targeting .NET Framework will succeed.
|
|
AddUseWPF ( ProjectPropertyGroupElement propGroup ) : void |
Adds the UseWPF=true property to the top-level project property group.
|
|
AddUseWinForms ( ProjectPropertyGroupElement propGroup ) : void |
Adds the UseWindowsForms=True property to the top-level project property group.
|
|
AddUseWinUI ( ProjectPropertyGroupElement propGroup ) : void |
Adds the UseWinUI=true property to the top-level project property group.
|
|
ConditionToDimensionValues ( string condition, ImmutableDictionary &dimensionalValues ) : bool |
Tries to parse an MSBuild condition to a dimensional vector only matches standard pattern: '$(DimensionName1)|$(DimensionName2)|...|$(DimensionNameN)'=='DimensionValue1|...|DimensionValueN'.
|
|
FrameworkHasAValueTuple ( string tfm ) : bool |
Given a TFM string, determines if that TFM has an explicit System.ValueTuple reference.
|
|
GetAllProjectTypeGuids ( IProjectRootElement root ) : IEnumerable |
Gets a flat list of all project type guids.
|
|
GetConfigurationName ( ImmutableDictionary dimensionValues ) : string |
Returns a name of a configuration like Debug|AnyCPU.
|
|
GetConfigurationName ( string condition ) : string |
Returns a name of a configuration like Debug|AnyCPU.
|
|
GetOrCreatePackageReferencesItemGroup ( IProjectRootElement rootElement ) : ProjectItemGroupElement |
Finds the item group where PackageReferences are specified. Usually there is only one.
|
|
GetOrCreateTopLevelPropertyGroup ( BaselineProject baselineProject, IProjectRootElement projectRootElement ) : ProjectPropertyGroupElement |
Gets the top-level property group, and if it doesn't exist, creates it.
|
|
GetOrCreateTopLevelPropertyGroupWithTFM ( IProjectRootElement rootElement ) : ProjectPropertyGroupElement |
Finds the property group with the TFM specified, which is normally the top-level property group.
|
|
GetPackagesConfigItem ( ProjectItemGroupElement packagesConfigItemGroup ) : ProjectItemElement |
Finds the packages.config item in its containing item group.
|
|
GetPackagesConfigItemGroup ( IProjectRootElement root ) : ProjectItemGroupElement? |
Finds the item group where a packages.config is included. Assumes only one.
|
|
HasProjectTypeGuidsNode ( IProjectRootElement root ) : bool |
Checks if a root has a project type guids node.
|
|
HasWPFOrWinForms ( ProjectPropertyGroupElement propGroup ) : bool | ||
IsAspNetCore ( IProjectRootElement projectRoot, string tfm ) : bool |
Determines if a project should be treated as an ASP.NET Core project (as opposed to classic ASP.NET). Returns true if the project is a web app (since there's no good way to build an ASP.NET app with an SDK-style project except to upgrade to ASP.NET Core) or the project has web dependencies and will target .NET/.NET Core.
|
|
IsDesktop ( IProjectRootElement projectRoot ) : bool |
Determines if a given project references Desktop assemblies.
|
|
IsNETFrameworkMSTestProject ( IProjectRootElement projectRoot ) : bool |
Determines if a project is a .NET Framework MSTest project by looking at its references.
|
|
IsNotNetFramework ( string tfm ) : bool |
Checks if a given TFM is not .NET Framework.
|
|
IsTargetFromNuGetPackage ( ProjectImportElement import ) : bool |
Checks if an import is a target that comes from the packages directory (which would mean it's probably brought in via a NuGet package).
|
|
IsUwp ( IProjectRootElement projectRoot ) : bool |
Determines if a given project is UWP.
|
|
IsValidMetadataForConversionPurposes ( IProjectMetadata projectMetadata ) : bool |
Checks if a metadata item can stay or if it needs to be converted.
|
|
IsWPF ( IProjectRootElement projectRoot ) : bool |
Determines if a given project is a WPF project by looking at its references.
|
|
IsWeb ( IProjectRootElement projectRoot ) : bool |
Determines if a given project references ASP.NET assemblies.
|
|
IsWebApp ( IProjectRootElement projectRoot ) : bool |
Determines if a given project uses ASP.NET web app project type guid.
|
|
IsWinForms ( IProjectRootElement projectRoot ) : bool |
Determines if a given project is a WinForms project by looking at its references.
|
|
IsWindows ( string tfm ) : bool |
Checks if a given TFM include -windows.
|
Method | Description | |
---|---|---|
DimensionalValuePairsToCondition ( ImmutableDictionary dimensionalValues ) : string |
Converts configuration dimensional value vector to a msbuild condition Use the standard format of '$(DimensionName1)|$(DimensionName2)|...|$(DimensionNameN)'=='DimensionValue1|...|DimensionValueN'.
|
|
GetPackageReferences ( ProjectItemGroupElement itemGroup ) : IEnumerable |
Gets all PackageReference items from a given item group.
|
|
GetReferences ( ProjectItemGroupElement itemGroup ) : IEnumerable |
Gets all Reference items from a given item group.
|
public static AddImportWindowsDesktopTargets ( ProjectPropertyGroupElement propGroup ) : void | ||
propGroup | ProjectPropertyGroupElement | |
return | void |
public static AddUseWPF ( ProjectPropertyGroupElement propGroup ) : void | ||
propGroup | ProjectPropertyGroupElement | |
return | void |
public static AddUseWinForms ( ProjectPropertyGroupElement propGroup ) : void | ||
propGroup | ProjectPropertyGroupElement | |
return | void |
public static AddUseWinUI ( ProjectPropertyGroupElement propGroup ) : void | ||
propGroup | ProjectPropertyGroupElement | |
return | void |
public static ConditionToDimensionValues ( string condition, ImmutableDictionary &dimensionalValues ) : bool | ||
condition | string | msbuild condition string. |
dimensionalValues | ImmutableDictionary | configuration dimensions vector (output). |
return | bool |
public static FrameworkHasAValueTuple ( string tfm ) : bool | ||
tfm | string | |
return | bool |
public static GetAllProjectTypeGuids ( IProjectRootElement root ) : IEnumerable |
||
root | IProjectRootElement | |
return | IEnumerable |
public static GetConfigurationName ( ImmutableDictionary dimensionValues ) : string | ||
dimensionValues | ImmutableDictionary | |
return | string |
public static GetConfigurationName ( string condition ) : string | ||
condition | string | |
return | string |
public static GetOrCreatePackageReferencesItemGroup ( IProjectRootElement rootElement ) : ProjectItemGroupElement | ||
rootElement | IProjectRootElement | |
return | ProjectItemGroupElement |
public static GetOrCreateTopLevelPropertyGroup ( BaselineProject baselineProject, IProjectRootElement projectRootElement ) : ProjectPropertyGroupElement | ||
baselineProject | BaselineProject | |
projectRootElement | IProjectRootElement | |
return | ProjectPropertyGroupElement |
public static GetOrCreateTopLevelPropertyGroupWithTFM ( IProjectRootElement rootElement ) : ProjectPropertyGroupElement | ||
rootElement | IProjectRootElement | |
return | ProjectPropertyGroupElement |
public static GetPackagesConfigItem ( ProjectItemGroupElement packagesConfigItemGroup ) : ProjectItemElement | ||
packagesConfigItemGroup | ProjectItemGroupElement | |
return | ProjectItemElement |
public static GetPackagesConfigItemGroup ( IProjectRootElement root ) : ProjectItemGroupElement? | ||
root | IProjectRootElement | |
return | ProjectItemGroupElement? |
public static HasProjectTypeGuidsNode ( IProjectRootElement root ) : bool | ||
root | IProjectRootElement | |
return | bool |
public static HasWPFOrWinForms ( ProjectPropertyGroupElement propGroup ) : bool | ||
propGroup | ProjectPropertyGroupElement | |
return | bool |
public static IsAspNetCore ( IProjectRootElement projectRoot, string tfm ) : bool | ||
projectRoot | IProjectRootElement | |
tfm | string | |
return | bool |
public static IsDesktop ( IProjectRootElement projectRoot ) : bool | ||
projectRoot | IProjectRootElement | |
return | bool |
public static IsNETFrameworkMSTestProject ( IProjectRootElement projectRoot ) : bool | ||
projectRoot | IProjectRootElement | |
return | bool |
public static IsNotNetFramework ( string tfm ) : bool | ||
tfm | string | |
return | bool |
public static IsTargetFromNuGetPackage ( ProjectImportElement import ) : bool | ||
import | ProjectImportElement | |
return | bool |
public static IsUwp ( IProjectRootElement projectRoot ) : bool | ||
projectRoot | IProjectRootElement | |
return | bool |
public static IsValidMetadataForConversionPurposes ( IProjectMetadata projectMetadata ) : bool | ||
projectMetadata | IProjectMetadata | |
return | bool |
public static IsWPF ( IProjectRootElement projectRoot ) : bool | ||
projectRoot | IProjectRootElement | |
return | bool |
public static IsWeb ( IProjectRootElement projectRoot ) : bool | ||
projectRoot | IProjectRootElement | |
return | bool |
public static IsWebApp ( IProjectRootElement projectRoot ) : bool | ||
projectRoot | IProjectRootElement | |
return | bool |
public static IsWinForms ( IProjectRootElement projectRoot ) : bool | ||
projectRoot | IProjectRootElement | |
return | bool |
public static IsWindows ( string tfm ) : bool | ||
tfm | string | |
return | bool |