Skip to content

[6.0] tvOS arm64 build graph failure: project file not loaded System.Composition.AttributedModel.csproj #84334

Closed

Description

@carlossanlop

Found in the 6.0 branding PR: #84315

/Users/runner/work/1/s/.dotnet/sdk/6.0.115/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.GraphBuilder.BuildGraph() [/Users/runner/work/1/s/Build.proj]
/Users/runner/work/1/s/.dotnet/sdk/6.0.115/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory, Int32 degreeOfParallelism, CancellationToken cancellationToken) [/Users/runner/work/1/s/Build.proj]
/Users/runner/work/1/s/.dotnet/sdk/6.0.115/NuGet.RestoreEx.targets(19,5): error :    at Microsoft.Build.Graph.ProjectGraph..ctor(IEnumerable`1 entryPoints, ProjectCollection projectCollection, ProjectInstanceFactoryFunc projectInstanceFactory) [/Users/runner/work/1/s/Build.proj]
/Users/runner/work/1/s/.dotnet/sdk/6.0.115/NuGet.RestoreEx.targets(19,5): error :    at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.LoadProjects(IEnumerable`1 entryProjects) [/Users/runner/work/1/s/Build.proj]
##[error].dotnet/sdk/6.0.115/NuGet.RestoreEx.targets(19,5): error : (NETCORE_ENGINEERING_TELEMETRY=Restore) The project file could not be loaded. Could not find a part of the path '/Users/runner/work/1/s/src/libraries/System.Composition/src/System.Composition.AttributedModel/src/System.Composition.AttributedModel.csproj'.  /Users/runner/work/1/s/src/libraries/System.Composition/src/System.Composition.AttributedModel/src/System.Composition.AttributedModel.csproj
   at Microsoft.Build.Shared.ProjectFileErrorUtilities.VerifyThrowInvalidProjectFile(Boolean condition, String errorSubCategoryResourceName, BuildEventFileInfo projectFile, Exception innerException, String resourceName, Object[] args)
   at Microsoft.Build.Shared.ProjectFileErrorUtilities.ThrowInvalidProjectFile(BuildEventFileInfo projectFile, Exception innerException, String resourceName, Object[] args)
   at Microsoft.Build.Construction.ProjectRootElement.LoadDocument(String fullPath, Boolean preserveFormatting, Boolean loadAsReadOnly)
   at Microsoft.Build.Construction.ProjectRootElement..ctor(String path, ProjectRootElementCacheBase projectRootElementCache, Boolean preserveFormatting)
   at Microsoft.Build.Construction.ProjectRootElement.CreateProjectFromPath(String projectFile, ProjectRootElementCacheBase projectRootElementCache, Boolean preserveFormatting)
   at Microsoft.Build.Evaluation.ProjectRootElementCache.Get(String projectFile, OpenProjectRootElement openProjectRootElement, Boolean isExplicitlyLoaded, Nullable`1 preserveFormatting)
   at Microsoft.Build.Construction.ProjectRootElement.OpenProjectOrSolution(String fullPath, IDictionary`2 globalProperties, String toolsVersion, ProjectRootElementCacheBase projectRootElementCache, Boolean isExplicitlyLoaded)
   at Microsoft.Build.Evaluation.Project.ProjectImpl..ctor(Project owner, String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project..ctor(String projectFile, IDictionary`2 globalProperties, String toolsVersion, String subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext)
   at Microsoft.Build.Evaluation.Project.FromFile(String file, ProjectOptions options)
   at NuGet.Build.Tasks.Console.MSBuildStaticGraphRestore.<>c__DisplayClass38_1.<LoadProjects>b__0(String path, Dictionary`2 properties, ProjectCollection collection)
   at Microsoft.Build.Graph.GraphBuilder.ParseProject(ConfigurationMetadata configurationMetadata)
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Microsoft.Build.Graph.ParallelWorkSet`2.ExecuteWorkItem()
   at Microsoft.Build.Graph.ParallelWorkSet`2.WaitForAllWorkAndComplete()
{
   "ErrorMessage" : "The project file could not be loaded. Could not find a part of the path",
   "BuildRetry": false,
   "ErrorPattern": "",
   "ExcludeConsoleLog": true
}

Report

Build Definition Step Name Console log Pull Request
2694589 dotnet-runtime Build product (linux_arm64) Log
1024922 dotnet/runtime Build Log #114812
1024770 dotnet/runtime Build Log #114812
1024635 dotnet/runtime Build Log #114812
1024511 dotnet/runtime Build Log #114812
1024366 dotnet/runtime Build Log #114812

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 6

Known issue validation

Build: 🔎
Result validation: ⚠️ Validation could not be done without an Azure DevOps build URL on the issue. Please add it to the "Build: 🔎" line.

Activity

  1. added this to the 6.0.x milestone on Apr 5, 2023
  2. ericstj commented on Apr 5, 2023

    @ericstj
    Member

    It seems to me that Static graph restore either having a hard time with the relative path, or has an invalid value for LibrariesProjectRoot.
    https://github.com/search?q=%22System.Composition.AttributedModel%22++repo%3Adotnet%2Fruntime+extension%3Acsproj&type=Code&ref=advsearch&l=&l=

    Given the specific failure It's probably the relative path.

    <ProjectReference Include="..\src\System.Composition.AttributedModel.csproj" />

    @jeffkl does this issue look familiar? Seems like it might be race condition where static graph gets confused about relative directory.

  3. jeffkl commented on Apr 6, 2023

    @jeffkl

    @ericstj I've seen this happen over the years with the MSBuild static graph API. For some reason a property does not have a value and the path gets mangled. At this point in restore, NuGet is loading projects via MSBuild so we're pretty confident something is wrong with static graph API. I'll ask around to see if anyone has figured out why this happens.

    Adding @dfederm who has seen this, were you able to figure out why it's happening?

  4. ericstj commented on Apr 6, 2023

    @ericstj
    Member

    It's also possible that this has been fixed in later SDKs, @carlossanlop noticed in our 6.0 branch which is using 6.0.115 SDK.

  5. removed this from the 6.0.x milestone on Nov 15, 2023
  6. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Nov 15, 2023
  7. added this to the 6.0.x milestone on Nov 24, 2023
  8. ghost removed
    untriagedNew issue has not been triaged by the area owner
    on Nov 24, 2023
  9. akoeplinger commented on May 16, 2025

    @akoeplinger
    Member

    Closing old 6.0 known issue, no recent hits.

  10. locked and limited conversation to collaborators on Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions