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
When I try to pack my project, an exception was thrown.
Project: https://github.com/ZjzMisaka/PowerThreadPool
Command: dotnet pack PowerThreadPool/PowerThreadPool.csproj -c Release /p:Version=4.14.0
Steps to Reproduce
run dotnet pack PowerThreadPool/PowerThreadPool.csproj -c Release /p:Version=4.14.0 on PowerThreadPool's root path
Actual Behavior
Every time I run the command, the behavior is different.
PS D:\Coding\PowerThreadPool> dotnet pack PowerThreadPool/PowerThreadPool.csproj -c Release /p:Version=4.14.0
Restore complete(0.7)
PowerThreadPool net6.0 failed, 1 error appeared (0.0)
MSBUILD : error :
This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled.
System.TypeInitializationException: The type initializer for 'Microsoft.Build.Collections.CopyOnWritePropertyDictionary`1' threw an exception.
---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Collections.Immutable.ImmutableDictionary.Create[TKey,TValue](IEqualityComparer`1 keyComparer)
at Microsoft.Build.Collections.CopyOnWritePropertyDictionary`1..cctor()
--- End of inner exception stack trace ---
at Microsoft.Build.Execution.ProjectItemDefinitionInstance.Microsoft.Build.Evaluation.IItemDefinition<Microsoft.Build.Execution.ProjectMetadataInstance>.SetMetadata(ProjectMetadataEleme
nt xml, String evaluatedValue, ProjectMetadataInstance predecessor)
at Microsoft.Build.Evaluation.Evaluator`4.EvaluateItemDefinitionElement(ProjectItemDefinitionElement itemDefinitionElement)
at Microsoft.Build.Evaluation.Evaluator`4.EvaluateItemDefinitionGroupElement(ProjectItemDefinitionGroupElement itemDefinitionGroupElement)
at Microsoft.Build.Evaluation.Evaluator`4.Evaluate()
at Microsoft.Build.Evaluation.Evaluator`4.Evaluate(IEvaluatorData`4 data, Project project, ProjectRootElement root, ProjectLoadSettings loadSettings, Int32 maxNodeCount, PropertyDiction
ary`1 environmentProperties, ILoggingService loggingService, IItemFactory`2 itemFactory, IToolsetProvider toolsetProvider, IDirectoryCacheFactory directoryCacheFactory, ProjectRootElementC
acheBase projectRootElementCache, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, EvaluationContext evaluationContext, Boolean interactive)
at Microsoft.Build.Execution.ProjectInstance.Initialize(ProjectRootElement xml, IDictionary`2 globalProperties, String explicitToolsVersion, String explicitSubToolsetVersion, Int32 visu
alStudioVersionFromSolution, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionI
d, Nullable`1 projectLoadSettings, EvaluationContext evaluationContext, IDirectoryCacheFactory directoryCacheFactory)
at Microsoft.Build.Execution.ProjectInstance..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, BuildParameters buildParameters, ILoggingService loggingServi
ce, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, Int32 submissionId, Nullable`1 projectLoadSettings)
at Microsoft.Build.BackEnd.BuildRequestConfiguration.<>c__DisplayClass61_0.<LoadProjectIntoConfiguration>b__0()
at Microsoft.Build.BackEnd.BuildRequestConfiguration.InitializeProject(BuildParameters buildParameters, Func`1 loadProjectFromFile)
at Microsoft.Build.BackEnd.RequestBuilder.BuildProject()
at Microsoft.Build.BackEnd.RequestBuilder.RequestThreadProc(Boolean setThreadParameters)
PowerThreadPool net5.0 CoreCompile (0.4s)
PowerThreadPool net481 failed, 1 error appeared (0.2)
MSBUILD : error :
This is an unhandled exception in MSBuild -- PLEASE UPVOTE AN EXISTING ISSUE OR FILE A NEW ONE AT https://aka.ms/msbuild/unhandled.
System.TypeInitializationException: The type initializer for 'Microsoft.Build.Collections.CopyOnWritePropertyDictionary`1' threw an exception.
---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at System.Collections.Immutable.ImmutableDictionary.Create
Issue Description
When I try to pack my project, an exception was thrown.
Project: https://github.com/ZjzMisaka/PowerThreadPool
Command: dotnet pack PowerThreadPool/PowerThreadPool.csproj -c Release /p:Version=4.14.0
Steps to Reproduce
run
dotnet pack PowerThreadPool/PowerThreadPool.csproj -c Release /p:Version=4.14.0
on PowerThreadPool's root pathActual Behavior
Every time I run the command, the behavior is different.
OR
OR
Analysis
I don't think it was caused by insufficient computer memory, because there was still a lot of free memory at the time.
Versions & Configurations
msbuild:
v17.12.6.51805
OS:
Windows10 22H2
Visual Studio:
Microsoft Visual Studio Community 2022 (64 bit) - Current
version 17.12.1
The text was updated successfully, but these errors were encountered: