Skip to content

MissingRestorePropertyError doesn't exist #7218

@Forgind

Description

@Forgind

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

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)

Analysis

We probably just need to add text for the MissingRestorePropertyError, and everything will be good.

Versions & Configurations

Attach a binlog

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueSelf-contained issues good for first-time contributors.bughelp wantedIssues that the core team doesn't plan to work on, but would accept a PR for. Comment to claim.triaged

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions