Skip to content

Internal MSBuild Error: Missing resource 'RestoreComplete' on latest nightly sdk #11515

Closed

Description

@akoeplinger

Issue Description

Probably related to recent TerminalLogger changes /cc @MichalPavlik

Steps to Reproduce

dotnet new console
dotnet restore

Expected Behavior

No error

Actual Behavior

alexander:~/dev/test/msbuildbug$ dotnet new console
The template "Console App" was created successfully.

Processing post-creation actions...
Restoring /Users/alexander/dev/test/msbuildbug/msbuildbug.csproj:
Restore succeeded.

alexander:~/dev/test/msbuildbug$ dotnet restore
MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
Microsoft.Build.Framework.InternalErrorException: MSB0001: Internal MSBuild Error: Missing resource 'RestoreComplete'
   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.GetStringFromEngineResources(String name)
   at Microsoft.Build.Logging.TerminalLogger.ProjectFinished(Object sender, ProjectFinishedEventArgs e)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseEvent[TArgs](TArgs buildEvent, ArgsHandler`1 handler, ArgsHandler`1 followUpHandler)
   at Microsoft.Build.BackEnd.Logging.EventSourceSink.RaiseEvent[TArgs](TArgs buildEvent, ArgsHandler`1 handler, ArgsHandler`1 followUpHandler)
   at Microsoft.Build.BackEnd.Logging.LoggingService.RouteBuildEvent(BuildEventArgs eventArg)
   at Microsoft.Build.BackEnd.Logging.LoggingService.RouteBuildEvent(Object loggingEvent)
   at Microsoft.Build.BackEnd.Logging.LoggingService.LoggingEventProcessor(Object loggingEvent)
--- End of stack trace from previous location ---
   at Microsoft.Build.Execution.BuildManager.EndBuild()
   at Microsoft.Build.Execution.BuildManager.EndBuild()
   at Microsoft.Build.Execution.BuildManager.EndBuild()
   at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary`2 globalProperties, Dictionary`2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, TextWriter targetsWriter, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsNotAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, ProjectIsolationMode isolateProjects, GraphBuildOptions graphBuildOptions, Boolean lowPriority, Boolean question, Boolean isBuildCheckEnabled, String[] inputResultsCaches, String outputResultsCache, Boolean saveProjectResult, BuildResult& result, String[] commandLine)
   at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary`2 globalProperties, Dictionary`2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, TextWriter targetsWriter, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsNotAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, ProjectIsolationMode isolateProjects, GraphBuildOptions graphBuildOptions, Boolean lowPriority, Boolean question, Boolean isBuildCheckEnabled, String[] inputResultsCaches, String outputResultsCache, Boolean saveProjectResult, BuildResult& result, String[] commandLine)

MSBUILD : error MSB1025: An internal failure occurred while running MSBuild.
Microsoft.Build.Framework.InternalErrorException: MSB0001: Internal MSBuild Error: Missing resource 'RestoreComplete'
   at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary`2 globalProperties, Dictionary`2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, TextWriter targetsWriter, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsNotAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, ProjectIsolationMode isolateProjects, GraphBuildOptions graphBuildOptions, Boolean lowPriority, Boolean question, Boolean isBuildCheckEnabled, String[] inputResultsCaches, String outputResultsCache, Boolean saveProjectResult, BuildResult& result, String[] commandLine)
   at Microsoft.Build.CommandLine.MSBuildApp.Execute(String[] commandLine)
Unhandled exception: Microsoft.Build.Framework.InternalErrorException: MSB0001: Internal MSBuild Error: Missing resource 'RestoreComplete'
   at Microsoft.Build.CommandLine.MSBuildApp.BuildProject(String projectFile, String[] targets, String toolsVersion, Dictionary`2 globalProperties, Dictionary`2 restoreProperties, ILogger[] loggers, LoggerVerbosity verbosity, DistributedLoggerRecord[] distributedLoggerRecords, Int32 cpuCount, Boolean enableNodeReuse, TextWriter preprocessWriter, TextWriter targetsWriter, Boolean detailedSummary, ISet`1 warningsAsErrors, ISet`1 warningsNotAsErrors, ISet`1 warningsAsMessages, Boolean enableRestore, ProfilerLogger profilerLogger, Boolean enableProfiler, Boolean interactive, ProjectIsolationMode isolateProjects, GraphBuildOptions graphBuildOptions, Boolean lowPriority, Boolean question, Boolean isBuildCheckEnabled, String[] inputResultsCaches, String outputResultsCache, Boolean saveProjectResult, BuildResult& result, String[] commandLine)
   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

No response

Versions & Configurations

dotnet --info
.NET SDK:
 Version:           10.0.100-preview.3.25126.23
 Commit:            a34f1ca179
 Workload version:  10.0.100-manifests.e50ffea1
 MSBuild version:   17.14.0-preview-25124-03+63aefc3dc

Runtime Environment:
 OS Name:     Mac OS X
 OS Version:  13.7
 OS Platform: Darwin
 RID:         osx-x64
 Base Path:   /usr/local/share/dotnet/sdk/10.0.100-preview.3.25126.23/

Activity

  1. added theissue type on Feb 27, 2025
  2. akoeplinger commented on Feb 27, 2025

    @akoeplinger
    MemberAuthor

    yeah this is because 63aefc3 moved the terminal logger from MSBuild.dll into Microsoft.Build.dll but the resource is still in the old assembly only.

    probably gets fixed once #11514 lands

  3. MichalPavlik commented on Feb 27, 2025

    @MichalPavlik
    Member

    I will take a look. The previous PR shouldn't be breaking :(

  4. self-assigned this
    on Feb 27, 2025
  5. added
    Priority:0Work that we can't release without
    Area: Terminal LoggerProblems with the livelogger/fancylogger/terminallogger -tl functionality.
    on Feb 27, 2025
  6. MichalPavlik commented on Feb 27, 2025

    @MichalPavlik
    Member

    I created hotfix and tested locally.

  7. rainersigwald commented on Feb 27, 2025

    @rainersigwald
    Member

    We should have a test that covers this.

  8. MichalPavlik commented on Feb 28, 2025

    @MichalPavlik
    Member

    We should have tests that cover all resources and detect any missing ones. I'm also not convinced that we should throw an exception when we are unable to find a resource. Let's discuss this offline; I have some ideas.

    I apologize to everyone who encountered this issue.

  9. captainsafia commented on Mar 4, 2025

    @captainsafia
    Contributor

    It seems like this issue is occuring in preview2. Codeflow with this bug fix didn't make it through in dotnet/sdk#47190. Do we have a plan for ingesting this in preview2?

    @mikekistler and our CTI testing team have ran into issues related to this.

  10. baronfel commented on Mar 4, 2025

    @baronfel
    Member

    we're pinging the p2 work chat now - will push for making that codeflow happen.

  11. baronfel commented on Mar 4, 2025

    @baronfel
    Member

    flow re-started here: dotnet/sdk#47263

  12. baronfel commented on Mar 5, 2025

    @baronfel
    Member

    @captainsafia the latest p2 nightly build (10.0.100-preview.2.25155.2) no longer has this crash. Thanks for raising the alarm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Area: Terminal LoggerProblems with the livelogger/fancylogger/terminallogger -tl functionality.Priority:0Work that we can't release without

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions