InvalidProjectFileException Class
This exception is thrown whenever there is a problem with the user's XML project file. The problem might be semantic or syntactical. The latter would be of a type typically caught by XSD validation (if it was performed by the project writer).
MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0.
Inheritance Hierarchy
System.Object
System.Exception
Microsoft.Build.Exceptions.InvalidProjectFileException
Namespace: Microsoft.Build.Exceptions
Assembly: Microsoft.Build (in Microsoft.Build.dll)
Syntax
'Declaration
<SerializableAttribute> _
Public NotInheritable Class InvalidProjectFileException _
Inherits Exception
[SerializableAttribute]
public sealed class InvalidProjectFileException : Exception
[SerializableAttribute]
public ref class InvalidProjectFileException sealed : public Exception
[<Sealed>]
[<SerializableAttribute>]
type InvalidProjectFileException =
class
inherit Exception
end
public final class InvalidProjectFileException extends Exception
The InvalidProjectFileException type exposes the following members.
Constructors
Name | Description | |
---|---|---|
InvalidProjectFileException() | Default constructor.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
InvalidProjectFileException(String) | Creates an instance of this exception using the specified error message.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
InvalidProjectFileException(String, Exception) | Creates an instance of this exception using the specified error message and inner exception.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
InvalidProjectFileException(String, Int32, Int32, Int32, Int32, String, String, String, String) | Creates an instance of this exception using rich error information.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. |
Top
Properties
Name | Description | |
---|---|---|
BaseMessage | Gets the exception message not including the project file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
ColumnNumber | Gets the invalid column number (if any) in the project.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
Data | (Inherited from Exception.) | |
EndColumnNumber | Gets the last column number (if any) of a range of invalid columns in the project.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
EndLineNumber | Gets the last line number (if any) of a range of invalid lines in the project.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
ErrorCode | Gets the error code (if any) associated with the exception message.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
ErrorSubcategory | Gets the error sub-category (if any) that describes the type of this error.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
HasBeenLogged | Gets a flag that determines whether the exception has already been logged. Allows the exception to be logged at the most appropriate location, but continue to be propagated.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
HelpKeyword | Gets the F1-help keyword (if any) associated with this error, for the host IDE.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
HelpLink | (Inherited from Exception.) | |
InnerException | (Inherited from Exception.) | |
LineNumber | Gets the invalid line number (if any) in the project.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
Message | Gets the exception message including the affected project file (if any).MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Overrides Exception.Message.) | |
ProjectFile | Gets the file (if any) associated with this exception. This may be an imported file.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. | |
Source | (Inherited from Exception.) | |
StackTrace | (Inherited from Exception.) | |
TargetSite | (Inherited from Exception.) |
Top
Methods
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
GetBaseException | (Inherited from Exception.) | |
GetHashCode | (Inherited from Object.) | |
GetObjectData | ISerializable method which we must override since Exception implements this interface If we ever add new members to this class, we'll need to update this.MSBuild is now included in Visual Studio instead of the .NET Framework. You can use MSBuild 12.0 side-by-side with versions previously deployed with the .NET Framework.For more information, see What's New in MSBuild 12.0. (Overrides Exception.GetObjectData(SerializationInfo, StreamingContext).) | |
GetType | (Inherited from Exception.) | |
ToString | (Inherited from Exception.) |
Top
Remarks
WARNING: marking a type [Serializable] without implementing ISerializable imposes a serialization contract -- it is a promise to never change the type's fields i.e. the type is immutable; adding new fields in the next version of the type without following certain special FX guidelines, can break both forward and backward compatibility
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.