61 references to Constants
Microsoft.Build.Tasks.Core (59)
GenerateApplicationManifest.cs (18)
54if (Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) < 0) 104if (Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) < 0) 173if (manifest.EntryPoint == null && Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) < 0) 190if (HostInBrowser && Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion30) < 0) 300AssemblyReference clrPlatformAssembly = manifest.AssemblyReferences.Find(Constants.CLRPlatformAssemblyName); 306clrPlatformAssembly.AssemblyIdentity = new AssemblyIdentity(Constants.CLRPlatformAssemblyName, ClrVersion); 309if (Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion30) == 0) 311EnsureAssemblyReferenceExists(manifest, CreateAssemblyIdentity(Constants.NET30AssemblyIdentity)); 313else if (Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) == 0) 315EnsureAssemblyReferenceExists(manifest, CreateAssemblyIdentity(Constants.NET30AssemblyIdentity)); 316EnsureAssemblyReferenceExists(manifest, CreateAssemblyIdentity(Constants.NET35AssemblyIdentity)); 318if ((!String.IsNullOrEmpty(TargetFrameworkSubset) && TargetFrameworkSubset.Equals(Constants.ClientFrameworkSubset, StringComparison.OrdinalIgnoreCase)) || 319(!String.IsNullOrEmpty(TargetFrameworkProfile) && TargetFrameworkProfile.Equals(Constants.ClientFrameworkSubset, StringComparison.OrdinalIgnoreCase))) 321EnsureAssemblyReferenceExists(manifest, CreateAssemblyIdentity(Constants.NET35ClientAssemblyIdentity)); 325EnsureAssemblyReferenceExists(manifest, CreateAssemblyIdentity(Constants.NET35SP1AssemblyIdentity)); 367if (!Util.IsValidFrameworkVersion(TargetFrameworkVersion) || Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion20) < 0) 375if (GetRequestedExecutionLevel(out string requestedExecutionLevel) && String.CompareOrdinal(requestedExecutionLevel, Constants.UACAsInvoker) != 0) 443requestedExecutionLevel = Constants.UACAsInvoker; // For backwards compatibility we assume asInvoker to begin with.
GenerateDeploymentManifest.cs (3)
41if (Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) < 0) 62if (Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) < 0) 93if (Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) < 0)
GenerateLauncher.cs (2)
72if ((entryPointFileName.Equals(Constants.AppHostExe, StringComparison.InvariantCultureIgnoreCase) || 73entryPointFileName.Equals(Constants.SingleFileHostExe, StringComparison.InvariantCultureIgnoreCase)) &&
GenerateManifestBase.cs (3)
37private string _targetFrameworkVersion = Constants.TargetFrameworkVersion20; 75return Constants.TargetFrameworkVersion35; 546if (Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) >= 0)
ManifestUtil\ApplicationManifest.cs (10)
121AssemblyReference CLRPlatformAssembly = AssemblyReferences.Find(Constants.CLRPlatformAssemblyName); 129CLRPlatformAssembly.AssemblyIdentity = new AssemblyIdentity(Constants.CLRPlatformAssemblyName, Util.GetClrVersion(_targetFrameworkVersion)); 237OSVersion = !WinXPRequired ? Constants.OSVersion_Win9X : Constants.OSVersion_WinXP; 561if (FileAssociations.Count > Constants.MaxFileAssociationsCount) 563OutputMessages.AddErrorMessage("GenerateManifest.FileAssociationsCountExceedsMaximum", Constants.MaxFileAssociationsCount.ToString(CultureInfo.CurrentUICulture)); 582if (fileAssociation.Extension.Length > Constants.MaxFileAssociationExtensionLength) 584OutputMessages.AddErrorMessage("GenerateManifest.FileAssociationExtensionTooLong", fileAssociation.Extension, Constants.MaxFileAssociationExtensionLength.ToString(CultureInfo.CurrentUICulture)); 734if (Util.CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) <= 0) 744if (assembly.AssemblyIdentity?.IsInFramework(Constants.DotNetFrameworkIdentifier, TargetFrameworkVersion) == true)
ManifestUtil\AssemblyReference.cs (1)
93if (String.Equals(AssemblyIdentity.Name, Constants.CLRPlatformAssemblyName, StringComparison.OrdinalIgnoreCase))
ManifestUtil\BaseReference.cs (2)
49if (path.EndsWith(Constants.DeployFileExtension, StringComparison.OrdinalIgnoreCase)) 51path = path.Substring(0, path.Length - Constants.DeployFileExtension.Length);
ManifestUtil\Manifest.cs (1)
515fileName.Equals(Constants.AppHostExe, StringComparison.InvariantCultureIgnoreCase))
ManifestUtil\ManifestWriter.cs (1)
106if (string.IsNullOrEmpty(targetframeWorkVersion) || Util.CompareFrameworkVersions(targetframeWorkVersion, Constants.TargetFrameworkVersion40) <= 0)
ManifestUtil\SecurityUtil.cs (2)
583targetFrameworkIdentifier.Equals(Constants.DotNetFrameworkIdentifier, StringComparison.InvariantCultureIgnoreCase)) 588else if (targetFrameworkIdentifier.Equals(Constants.DotNetCoreAppIdentifier, StringComparison.InvariantCultureIgnoreCase))
ManifestUtil\TrustInfo.cs (2)
241executionLevelString = Constants.UACAsInvoker; 242executionUIAccessString = Constants.UACUIAccess;
ManifestUtil\Util.cs (1)
246if (string.IsNullOrEmpty(targetFrameWorkVersion) || CompareFrameworkVersions(targetFrameWorkVersion, Constants.TargetFrameworkVersion40) <= 0)
RequiresFramework35SP1Assembly.cs (5)
19private string _targetFrameworkVersion = Constants.TargetFrameworkVersion20; 34return Constants.TargetFrameworkVersion35; 49if (CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) < 0) 154|| string.Equals(candidateFile.ItemSpec, Constants.NET35SP1AssemblyIdentity[0], StringComparison.OrdinalIgnoreCase) 155|| string.Equals(candidateFile.ItemSpec, Constants.NET35ClientAssemblyIdentity[0], StringComparison.OrdinalIgnoreCase)))
ResolveManifestFiles.cs (7)
138return Constants.TargetFrameworkVersion35; 151return Constants.DotNetFrameworkIdentifier; 169bool is35Project = (CompareFrameworkVersions(TargetFrameworkVersion, Constants.TargetFrameworkVersion35) >= 0); 291targetPath.Equals(Constants.AppHostExe, StringComparison.InvariantCultureIgnoreCase) && 739bool isDotNetCore = String.Equals(TargetFrameworkIdentifier, Constants.DotNetCoreAppIdentifier, StringComparison.InvariantCultureIgnoreCase); 767if (identity?.IsInFramework(Constants.DotNetCoreIdentifier, null) == true) 772else if (identity?.IsInFramework(Constants.DotNetFrameworkIdentifier, TargetFrameworkVersion) == true)
SignFile.cs (1)
37public string TargetFrameworkIdentifier { get; set; } = Constants.DotNetFrameworkIdentifier;
Microsoft.Build.Tasks.UnitTests (2)
SecurityUtil_Tests.cs (2)
25[InlineData("v4.5", Constants.DotNetFrameworkIdentifier)] 26[InlineData("v4.5", Constants.DotNetCoreAppIdentifier)]