56 references to ThrowInvalidProject
Microsoft.Build (56)
BackEnd\BuildManager\MultiThreadedStrictModeScope.cs (2)
263
ProjectErrorUtilities.
ThrowInvalidProject
(location,
293
ProjectErrorUtilities.
ThrowInvalidProject
(location,
BackEnd\Components\RequestBuilder\BatchingEngine.cs (1)
420
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation,
BackEnd\Components\RequestBuilder\TargetEntry.cs (1)
348
ProjectErrorUtilities.
ThrowInvalidProject
(_target.ConditionLocation, "TargetConditionHasInvalidMetadataReference", _target.Name, _target.Condition);
BackEnd\Components\RequestBuilder\TaskBuilder.cs (2)
774
ProjectErrorUtilities.
ThrowInvalidProject
(_taskNode.ContinueOnErrorLocation, "InvalidContinueOnErrorAttribute", _taskNode.Name, e.Message);
805
ProjectErrorUtilities.
ThrowInvalidProject
(_targetChildInstance.Location, "TaskParametersError", _taskNode.Name, String.Empty);
BackEnd\Components\SdkResolution\SdkResolverLoader.cs (2)
208
ProjectErrorUtilities.
ThrowInvalidProject
(location, "SdkResolverDllInManifestMissing", pathToManifest, string.Empty);
219
ProjectErrorUtilities.
ThrowInvalidProject
(location, "SdkResolverDllInManifestMissing", pathToManifest, manifest.Path);
BackEnd\Components\SdkResolution\SdkResolverService.cs (1)
293
ProjectErrorUtilities.
ThrowInvalidProject
(
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
1530
ProjectErrorUtilities.
ThrowInvalidProject
(
Construction\ProjectMetadataElement.cs (1)
154
ProjectErrorUtilities.
ThrowInvalidProject
(parentLocation, "InvalidMetadataAsAttribute", name, parentName);
Definition\Project.cs (1)
4201
ProjectErrorUtilities.
ThrowInvalidProject
(toolsVersionLocation, "UnrecognizedToolsVersion", toolsVersionToUse, toolsVersionList);
Evaluation\Conditionals\FunctionCallExpressionNode.cs (1)
96
ProjectErrorUtilities.
ThrowInvalidProject
(
Evaluation\Conditionals\GenericExpressionNode.cs (1)
65
ProjectErrorUtilities.
ThrowInvalidProject
(
Evaluation\Conditionals\Parser.cs (2)
288
ProjectErrorUtilities.
ThrowInvalidProject
(_elementLocation, "UnexpectedTokenInCondition", _lexer.IsNextString(), errorPosition);
394
ProjectErrorUtilities.
ThrowInvalidProject
(_elementLocation, _lexer.GetErrorResource(), expression, errorPosition);
Evaluation\Evaluator.cs (2)
2306
ProjectErrorUtilities.
ThrowInvalidProject
(importLocationInProject, "ImportIntroducesCircularity", importFileUnescaped, importedBy);
2494
ProjectErrorUtilities.
ThrowInvalidProject
(importLocationInProject, "InvalidImportedProjectFile",
Evaluation\Expander.cs (2)
618
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionPropertyExpression", expressionFunction, AssemblyResources.GetString("InvalidFunctionPropertyExpressionDetailMismatchedParenthesis"));
633
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionPropertyExpression", expressionFunction, AssemblyResources.GetString("InvalidFunctionPropertyExpressionDetailMismatchedQuote"));
Evaluation\Expander.Function.cs (13)
246
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionStaticMethodSyntax", expressionFunction, String.Empty);
260
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionStaticMethodSyntax", expressionFunction, String.Empty);
271
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionTypeUnavailable", expressionFunction, typeName);
282
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionPropertyExpression", expressionFunction, AssemblyResources.GetString("InvalidFunctionPropertyExpressionDetailMismatchedSquareBrackets"));
313
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionPropertyExpression", expressionFunction, String.Empty);
381
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionMethodUnavailable", _methodMethodName, _receiverType.FullName);
391
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionMethodUnavailable", _methodMethodName, _receiverType.FullName);
527
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionPropertyExpression", partiallyEvaluated, ex.Message.Replace("\r\n", " "));
598
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionPropertyExpression", partiallyEvaluated, ex.InnerException.Message.Replace("\r\n", " "));
609
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionStaticMethodSyntax", _expression, ex.Message.Replace("Microsoft.Build.Evaluation.IntrinsicFunctions.", "[MSBuild]::"));
615
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionPropertyExpression", partiallyEvaluated, ex.Message);
921
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionPropertyExpression", expressionFunction, AssemblyResources.GetString("InvalidFunctionPropertyExpressionDetailMismatchedParenthesis"));
992
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "InvalidFunctionPropertyExpression", expressionFunction, String.Empty);
Evaluation\Expander.ItemExpander.Transforms.cs (7)
417
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "CannotEvaluateItemMetadata", metadataName, ex.Message);
723
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "QualifiedMetadataInTransformNotAllowed", matchValue, name);
894
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "CannotEvaluateItemMetadata", metadataName, ex.Message);
934
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "CannotEvaluateItemMetadata", metadataName, ex.Message);
972
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "CannotEvaluateItemMetadata", metadataName, ex.Message);
1013
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "CannotEvaluateItemMetadata", metadataName, ex.Message);
1085
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "CannotEvaluateItemMetadata", match.Name, ex.Message);
Evaluation\Expander.MetadataExpander.cs (1)
88
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "CannotExpandItemMetadata", expression, ex.Message);
Evaluation\Expander.PropertyExpander.cs (4)
428
ProjectErrorUtilities.
ThrowInvalidProject
(_elementLocation, "InvalidFunctionPropertyExpression", propertyBody, String.Empty);
439
ProjectErrorUtilities.
ThrowInvalidProject
(_elementLocation, "InvalidFunctionPropertyExpression", propertyBody, AssemblyResources.GetString("InvalidFunctionPropertyExpressionDetailMismatchedSquareBrackets"));
454
ProjectErrorUtilities.
ThrowInvalidProject
(_elementLocation, "InvalidFunctionPropertyExpression", propertyBody, string.Empty);
752
ProjectErrorUtilities.
ThrowInvalidProject
(_elementLocation, "InvalidRegistryPropertyExpression", $"$({registryExpression})", ex.Message);
Evaluation\ProjectParser.cs (4)
448
ProjectErrorUtilities.
ThrowInvalidProject
(
606
ProjectErrorUtilities.
ThrowInvalidProject
(element.GetAttributeLocation(XMakeAttributes.name), "NameInvalid", targetName, targetName[indexOfSpecialCharacter]);
658
ProjectErrorUtilities.
ThrowInvalidProject
(childElement.Location, "PropertyOutsidePropertyGroupInTarget", childElement.Name, childElement.ParentNode.Name);
698
ProjectErrorUtilities.
ThrowInvalidProject
(childElement.Location, "UnrecognizedChildElement", childElement.Name, task.Name);
Instance\ProjectInstance.cs (1)
3303
ProjectErrorUtilities.
ThrowInvalidProject
(toolsVersionLocation, "UnrecognizedToolsVersion", toolsVersionToUse, toolsVersionList);
Instance\TaskRegistry.cs (1)
1258
ProjectErrorUtilities.
ThrowInvalidProject
(elementLocation, "CouldNotFindFactory", TaskFactoryAttributeName, taskFactoryLoadInfo.AssemblyLocation);
Utilities\XmlUtilities.cs (2)
97
ProjectErrorUtilities.
ThrowInvalidProject
(location, "NameInvalid", name, name[firstInvalidCharLocation]);
115
ProjectErrorUtilities.
ThrowInvalidProject
(element.Location, "NameInvalid", name, name[firstInvalidCharLocation]);
Xml\ProjectXmlUtilities.cs (3)
73
ProjectErrorUtilities.
ThrowInvalidProject
(child.Location, "InvalidChildElementDueToDuplication", child.Name, child.ParentNode.Name);
210
ProjectErrorUtilities.
ThrowInvalidProject
(location, "UnrecognizedChildElement", name, parentName);
219
ProjectErrorUtilities.
ThrowInvalidProject
(attribute.Location, "UnrecognizedAttribute", attribute.Name, attribute.OwnerElement.Name);