Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
akoeplinger opened this issue Feb 27, 2025 · 9 comments · Fixed by #11517
Closed

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

akoeplinger opened this issue Feb 27, 2025 · 9 comments · Fixed by #11517
Assignees
Labels
Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. Priority:0 Work that we can't release without

Comments

@akoeplinger
Copy link
Member

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/
@akoeplinger
Copy link
Member Author

akoeplinger commented Feb 27, 2025

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

@MichalPavlik
Copy link
Member

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

@MichalPavlik MichalPavlik self-assigned this Feb 27, 2025
@MichalPavlik MichalPavlik added Priority:0 Work that we can't release without Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. labels Feb 27, 2025
@MichalPavlik
Copy link
Member

I created hotfix and tested locally.

@rainersigwald
Copy link
Member

We should have a test that covers this.

@MichalPavlik
Copy link
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.

@captainsafia
Copy link
Member

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.

@baronfel
Copy link
Member

baronfel commented Mar 4, 2025

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

@baronfel
Copy link
Member

baronfel commented Mar 4, 2025

flow re-started here: dotnet/sdk#47263

@baronfel
Copy link
Member

baronfel commented Mar 5, 2025

@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
Labels
Area: Terminal Logger Problems with the livelogger/fancylogger/terminallogger -tl functionality. Priority:0 Work that we can't release without
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants