Unable to build Solution that contains multi-targeted projects and using ArtifactsPath with IncludeProjectNameInArtifactsPaths set to false
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Description
I am trying to utilize the newest feature Simplified Artifacts Output. I want to exclude the project name from the path as to make it a more simplified structure. The issue is that when I do so and my solution contains a project that is multi-targeted it fails to add Multi-Targeted project frameworks to `project.assets.json`.
### Error
`
src\Artifacts\obj\project.assets.json' doesn't have a target for 'netstandard2.0'. Ensure that restore has run and that you have included 'netstandard2.0' in the TargetFrameworks for your project.
`
### `obj` folder structure

https://learn.microsoft.com/en-us/dotnet/core/sdk/artifacts-output
### Reproduction Steps
- Solution that contains .NET 8 projects and at least one project that is multi-target. For example NET 8 and netstandard2.0
- Add the following to `Directory.Build.props`
```
$(SolutionDir)Artifacts\
false
```
- Attempt to build project
### Configuration
- Solution is .NET 8.0
- A couple projects are .NET 8 - Windows
- A couple projects are multi-targeted (.NET 8 and netstandard2.0)
- Architecture is x64
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.