You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified locally that dotnet/format tests start failing between roslyn 4.9.0-1.23524.1 and 4.9.0-1.23524.12 where the difference is just that PR
[xUnit.net 00:00:15.80] Microsoft.CodeAnalysis.Tools.Tests.MSBuild.MSBuildWorkspaceLoaderTests.CSharpTemplateProject_LoadWithNoDiagnostics(templateName: "xunit") [FAIL]
[xUnit.net 00:00:15.80] Microsoft.Build.Framework.LoggerException : Failed to write to log file "D:\a\1\s\tests\projects\for_workspace_loader\csharp_xunit_project\csharp_xunit_project.binlog". The process cannot access the file 'D:\a\1\s\tests\projects\for_workspace_loader\csharp_xunit_project\csharp_xunit_project.binlog' because it is being used by another process.
[xUnit.net 00:00:15.80] ---- System.IO.IOException : The process cannot access the file 'D:\a\1\s\tests\projects\for_workspace_loader\csharp_xunit_project\csharp_xunit_project.binlog' because it is being used by another process.
[xUnit.net 00:00:15.80] Stack Trace:
[xUnit.net 00:00:15.81] at Microsoft.Build.Logging.BinaryLogger.Initialize(IEventSource eventSource)
[xUnit.net 00:00:15.81] at Microsoft.Build.BackEnd.Logging.LoggingService.InitializeLogger(ILogger logger, IEventSource sourceForLogger)
[xUnit.net 00:00:15.81] at Microsoft.Build.BackEnd.Logging.LoggingService.RegisterDistributedLogger(ILogger centralLogger, LoggerDescription forwardingLogger)
[xUnit.net 00:00:15.81] at Microsoft.Build.BackEnd.Logging.LoggingService.RegisterLogger(ILogger logger)
[xUnit.net 00:00:15.81] at Microsoft.Build.Execution.BuildManager.CreateLoggingService(IEnumerable`1 loggers, IEnumerable`1 forwardingLoggers, ISet`1 warningsAsErrors, ISet`1 warningsNotAsErrors, ISet`1 warningsAsMessages)
[xUnit.net 00:00:15.81] at Microsoft.Build.Execution.BuildManager.<BeginBuild>g__InitializeLoggingService|64_0()
[xUnit.net 00:00:15.81] at Microsoft.Build.Execution.BuildManager.BeginBuild(BuildParameters parameters)
[xUnit.net 00:00:15.81] at Microsoft.CodeAnalysis.MSBuild.Build.ProjectBuildManager.StartBatchBuild(IDictionary`2 globalProperties)
[xUnit.net 00:00:15.81] at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.Worker.LoadAsync(CancellationToken cancellationToken)
[xUnit.net 00:00:15.81] at Microsoft.CodeAnalysis.MSBuild.MSBuildProjectLoader.LoadProjectInfoAsync(String projectFilePath, ProjectMap projectMap, IProgress`1 progress, ILogger msbuildLogger, CancellationToken cancellationToken)
[xUnit.net 00:00:15.81] at Microsoft.CodeAnalysis.MSBuild.MSBuildWorkspace.OpenProjectAsync(String projectFilePath, ILogger msbuildLogger, IProgress`1 progress, CancellationToken cancellationToken)
[xUnit.net 00:00:15.81] /_/src/Workspaces/MSBuildWorkspaceLoader.cs(54,0): at Microsoft.CodeAnalysis.Tools.Workspaces.MSBuildWorkspaceLoader.LoadAsync(String solutionOrProjectPath, WorkspaceType workspaceType, String binaryLogPath, Boolean logWorkspaceWarnings, ILogger logger, CancellationToken cancellationToken)
[xUnit.net 00:00:15.81] /_/tests/MSBuild/MSBuildWorkspaceLoaderTests.cs(142,0): at Microsoft.CodeAnalysis.Tools.Tests.MSBuild.MSBuildWorkspaceLoaderTests.AssertProjectLoadsCleanlyAsync(String projectFilePath, ILogger logger, String[] ignoredDiagnostics)
[xUnit.net 00:00:15.81] /_/tests/MSBuild/MSBuildWorkspaceLoaderTests.cs(114,0): at Microsoft.CodeAnalysis.Tools.Tests.MSBuild.MSBuildWorkspaceLoaderTests.AssertTemplateProjectLoadsCleanlyAsync(String templateName, String languageName, String[] ignoredDiagnostics)
[xUnit.net 00:00:15.81] /_/tests/MSBuild/MSBuildWorkspaceLoaderTests.cs(78,0): at Microsoft.CodeAnalysis.Tools.Tests.MSBuild.MSBuildWorkspaceLoaderTests.CSharpTemplateProject_LoadWithNoDiagnostics(String templateName)
[xUnit.net 00:00:15.81] --- End of stack trace from previous location ---
[xUnit.net 00:00:15.81] ----- Inner Stack Trace -----
[xUnit.net 00:00:15.81] at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
[xUnit.net 00:00:15.81] at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
[xUnit.net 00:00:15.81] at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
[xUnit.net 00:00:15.81] at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
[xUnit.net 00:00:15.81] at System.IO.FileStream..ctor(String path, FileMode mode)
[xUnit.net 00:00:15.81] at Microsoft.Build.Logging.BinaryLogger.Initialize(IEventSource eventSource)
The text was updated successfully, but these errors were encountered:
@jasonmalinowski You're right, it's not happening anymore. I don't know if the issue has been fixed or it stopped happening for an unrelated reason. Feel free to close this issue.
it's not happening anymore. I don't know if the issue has been fixed or it stopped happening for an unrelated reason.
When using roslyn 4.9.0-2.final or later.
It seems that the logger' argument is silently ignored. When calling OpenSolutionAsync' or `OpenProjectAsync' with the logger argument.
This behaviour change was introduced in #70469.
And currently there seems to be no way to create a binlog with MSBuildWorkspace API.
I've created a discussion relating to this issue. (#71950)
The text was updated successfully, but these errors were encountered: