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

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

Open
carlossanlop opened this issue Apr 5, 2023 · 4 comments
Labels
arch-arm64 area-Infrastructure-mono Known Build Error Use this to report build issues in the .NET Helix tab os-tvos Apple tvOS
Milestone

Comments

@carlossanlop
Copy link
Member

carlossanlop commented Apr 5, 2023

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

Summary

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

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.

@carlossanlop carlossanlop added arch-arm64 area-Infrastructure-mono os-tvos Apple tvOS Known Build Error Use this to report build issues in the .NET Helix tab labels Apr 5, 2023
@carlossanlop carlossanlop added this to the 6.0.x milestone Apr 5, 2023
@ghost
Copy link

ghost commented Apr 5, 2023

Tagging subscribers to 'os-tvos': @steveisok, @akoeplinger
See info in area-owners.md if you want to be subscribed.

Issue Details

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
}
Author: carlossanlop
Assignees: -
Labels:

arch-arm64, area-Infrastructure-mono, os-tvos, Known Build Error

Milestone: 6.0.x

@ericstj
Copy link
Member

ericstj commented Apr 5, 2023

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.

@jeffkl
Copy link

jeffkl commented Apr 6, 2023

@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?

@ericstj
Copy link
Member

ericstj commented Apr 6, 2023

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.

@build-analysis build-analysis bot removed this from the 6.0.x milestone Nov 15, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Nov 15, 2023
@akoeplinger akoeplinger added this to the 6.0.x milestone Nov 24, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-arm64 area-Infrastructure-mono Known Build Error Use this to report build issues in the .NET Helix tab os-tvos Apple tvOS
Projects
None yet
Development

No branches or pull requests

4 participants