2012-08-30 3 views
2

응용 프로그램을 빌드하기 시작하면 Msbuild에서 예외가 발생합니다. 어느 누구라도이 오류에 대해 알고 있다면 알려주십시오.Msbuild가 "주어진 키가 사전에 없습니다."라는 오류 메시지와 함께 실패합니다.

Unhandled Exception: Microsoft.Build.Shared.InternalErrorException: MSB0001: Internal MSBuild Error: The given key was not present in the dictionary. 
============= 
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. 
at System.Collections.Generic.Dictionary`2.get_Item(TKey key) 
at Microsoft.Build.Construction.SolutionProjectGenerator.AddMetaprojectReferenceItems(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project) 
at Microsoft.Build.Construction.SolutionProjectGenerator.CreateMetaproject(ProjectInstance traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration) 
at Microsoft.Build.Construction.SolutionProjectGenerator.EvaluateAndAddProjects(List`1 projectsInOrder, List`1 projectInstances, ProjectInstance traversalInstance, String selectedSolutionConfiguration) 
at Microsoft.Build.Construction.SolutionProjectGenerator.CreateSolutionProject(String wrapperProjectToolsVersion, Boolean explicitToolsVersionSpecified) 
at Microsoft.Build.Construction.SolutionProjectGenerator.Generate() 
at Microsoft.Build.Execution.ProjectInstance.GenerateSolutionWrapper(String projectFile, IDictionary`2 globalProperties, String toolsVersion, ILoggingService loggingService, BuildEventContext projectBuildEventContext) 
at Microsoft.Build.Execution.ProjectInstance.LoadSolutionForBuild(String projectFile, PropertyDictionary`1 globalPropertiesInstances, String toolsVersion, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext projectBuildEventContext) 
at Microsoft.Build.Execution.BuildManager.LoadSolutionIntoConfiguration(BuildRequestConfiguration config, BuildEventContext buildEventContext) 
at Microsoft.Build.Execution.BuildManager.HandleNewRequest(Int32 node, BuildRequestBlocker blocker) 
at Microsoft.Build.Execution.BuildManager.Microsoft.Build.BackEnd.INodePacketHandler.PacketReceived(Int32 node, INodePacket packet) 
at Microsoft.Build.BackEnd.NodeManager.RoutePacket(Int32 nodeId, INodePacket packet) 
at Microsoft.Build.BackEnd.NodeProviderInProc.RoutePacket(Int32 nodeId, INodePacket packet) 
at Microsoft.Build.BackEnd.NodeEndpointInProc.SendData(INodePacket packet) 
at Microsoft.Build.BackEnd.InProcNode.OnNewRequest(BuildRequestBlocker blocker) 
at Microsoft.Build.BackEnd.BuildRequestEngine.RaiseRequestBlocked(BuildRequestBlocker blocker) 
at Microsoft.Build.BackEnd.BuildRequestEngine.IssueBuildRequest(BuildRequestBlocker blocker) 
at Microsoft.Build.BackEnd.BuildRequestEngine.ReportConfigurationResponse(BuildRequestConfigurationResponse response) 
at Microsoft.Build.BackEnd.InProcNode.HandlePacket(INodePacket packet) 
at Microsoft.Build.BackEnd.InProcNode.Run(Exception& shutdownException) 

---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. 
at System.Collections.Generic.Dictionary`2.get_Item(TKey key) 
at Microsoft.Build.Construction.SolutionProjectGenerator.AddMetaprojectReferenceItems(ProjectInstance traversalProject, ProjectInstance metaprojectInstance, ProjectInSolution project) 
at Microsoft.Build.Construction.SolutionProjectGenerator.CreateMetaproject(ProjectInstance traversalProject, ProjectInSolution project, ProjectConfigurationInSolution projectConfiguration) 
at Microsoft.Build.Construction.SolutionProjectGenerator.EvaluateAndAddProjects(List`1 projectsInOrder, List`1 projectInstances, ProjectInstance traversalInstance, String selectedSolutionConfiguration) 
at Microsoft.Build.Construction.SolutionProjectGenerator.CreateSolutionProject(String wrapperProjectToolsVersion, Boolean explicitToolsVersionSpecified) 
at Microsoft.Build.Construction.SolutionProjectGenerator.Generate() 
at Microsoft.Build.Execution.ProjectInstance.GenerateSolutionWrapper(String projectFile, IDictionary`2 globalProperties, String toolsVersion, ILoggingService loggingService, BuildEventContext projectBuildEventContext) 
at Microsoft.Build.Execution.ProjectInstance.LoadSolutionForBuild(String projectFile, PropertyDictionary`1 globalPropertiesInstances, String toolsVersion, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext projectBuildEventContext) 

감사합니다.

답변

0

이것은 내부 오류입니다. 오류 유형 (MSB0001)뿐만 아니라 예외 유형으로도 알 수 있습니다. 이는 특정 MSBuild 버전에서만 발생하며 일부 특정 프로젝트 파일에서만 발생할 수 있음을 의미합니다.

VS2010에서 비슷한 오류가 발생하여 이후 버전에서 수정 된 경우를 확인했습니다. VS2013에 나타나지 않고 VS2015 또는 VS2017 (모든 버전을 확인하지 못함)으로 도입 된 사례를 보았습니다. 그러한 경우는 관련이 없었을 가능성이 큽니다.

일부 프로젝트 파일 변경 (또는 소스 파일 변경)으로이 문제를 켜고 끄기 전까지 프로젝트를 수정 (간소화)하기 위해 필요한 내부 도구 문제에 대해 적절한 질문을하려면 어떤 도구 버전으로.

관련 문제