Pretty minor issue, but MissingRestorePropertyError isn't a thing, so we shouldn't pretend we can throw it. We should make it a thing.
Some nice error message about how /rp is missing a parameter.
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: Missing resource 'MissingRestorePropertyError'
at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Object[] args)
at Microsoft.Build.Shared.ErrorUtilities.VerifyThrow(Boolean condition, String unformattedMessage, Object arg0)
at Microsoft.Build.Shared.AssemblyResources.GetString(String name)
at Microsoft.Build.Shared.ResourceUtilities.FormatResourceStringStripCodeAndKeyword(String& code, String& helpKeyword, String resourceName, Object[] args)
at Microsoft.Build.Shared.ResourceUtilities.FormatResourceStringStripCodeAndKeyword(String resourceName, Object[] args)
at Microsoft.Build.CommandLine.CommandLineSwitchException.Throw(String messageResourceName, String commandLineArg, String[] messageArgs)
at Microsoft.Build.CommandLine.CommandLineSwitchException.Throw(String messageResourceName, String commandLineArg)
at Microsoft.Build.CommandLine.CommandLineSwitches.ThrowErrors()
at Microsoft.Build.CommandLine.MSBuildApp.ProcessCommandLineSwitches(CommandLineSwitches switchesFromAutoResponseFile, CommandLineSwitches switchesNotFromAutoResponseFile, String& projectFile, String[]& targets, String& toolsVersion, Dictionary`2& globalProperties, ILogger[]& loggers, LoggerVerbosity& verbosity, List`1& distributedLoggerRecords, Int32& cpuCount, Boolean& enableNodeReuse, TextWriter& preprocessWriter, TextWriter& targetsWriter, Boolean& detailedSummary, ISet`1& warningsAsErrors, ISet`1& warningsAsMessages, Boolean& enableRestore, Boolean& interactive, ProfilerLogger& profilerLogger, Boolean& enableProfiler, Dictionary`2& restoreProperties, Boolean& isolateProjects, GraphBuildOptions& graphBuild, String[]& inputResultsCaches, String& outputResultsCache, Boolean& lowPriority, Boolean recursing)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
Unhandled exception: Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: Missing resource 'MissingRestorePropertyError'
at Microsoft.Build.Shared.ErrorUtilities.ThrowInternalError(String message, Object[] args)
at Microsoft.Build.Shared.ErrorUtilities.VerifyThrow(Boolean condition, String unformattedMessage, Object arg0)
at Microsoft.Build.Shared.AssemblyResources.GetString(String name)
at Microsoft.Build.Shared.ResourceUtilities.FormatResourceStringStripCodeAndKeyword(String& code, String& helpKeyword, String resourceName, Object[] args)
at Microsoft.Build.Shared.ResourceUtilities.FormatResourceStringStripCodeAndKeyword(String resourceName, Object[] args)
at Microsoft.Build.CommandLine.CommandLineSwitchException.Throw(String messageResourceName, String commandLineArg, String[] messageArgs)
at Microsoft.Build.CommandLine.CommandLineSwitchException.Throw(String messageResourceName, String commandLineArg)
at Microsoft.Build.CommandLine.CommandLineSwitches.ThrowErrors()
at Microsoft.Build.CommandLine.MSBuildApp.ProcessCommandLineSwitches(CommandLineSwitches switchesFromAutoResponseFile, CommandLineSwitches switchesNotFromAutoResponseFile, String& projectFile, String[]& targets, String& toolsVersion, Dictionary`2& globalProperties, ILogger[]& loggers, LoggerVerbosity& verbosity, List`1& distributedLoggerRecords, Int32& cpuCount, Boolean& enableNodeReuse, TextWriter& preprocessWriter, TextWriter& targetsWriter, Boolean& detailedSummary, ISet`1& warningsAsErrors, ISet`1& warningsAsMessages, Boolean& enableRestore, Boolean& interactive, ProfilerLogger& profilerLogger, Boolean& enableProfiler, Dictionary`2& restoreProperties, Boolean& isolateProjects, GraphBuildOptions& graphBuild, String[]& inputResultsCaches, String& outputResultsCache, Boolean& lowPriority, Boolean recursing)
at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
at Microsoft.Build.CommandLine.MSBuildApp.Main(String[] args)
at Microsoft.DotNet.Cli.Utils.MSBuildForwardingAppWithoutLogging.ExecuteInProc(String[] arguments)
We probably just need to add text for the MissingRestorePropertyError, and everything will be good.
Issue Description
Pretty minor issue, but MissingRestorePropertyError isn't a thing, so we shouldn't pretend we can throw it. We should make it a thing.
Steps to Reproduce
dotnet build /rp:on anything.Expected Behavior
Some nice error message about how /rp is missing a parameter.
Actual Behavior
Analysis
We probably just need to add text for the MissingRestorePropertyError, and everything will be good.
Versions & Configurations
Attach a binlog