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
While updating to .NET 9 I encountered the following issue:
When activating artifacts path layout via Directory.build.props and disabling it in a project down the folder structure inside a csproj file. The system reacts to any build related command with:
MSBUILD : warning MSB5029: The value "/**" of the "Exclude" attribute in element <ItemGroup> in file "C:\Program Files\dotnet\sdk\9.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.props (36,62)" is a wildcard that results in enumerating all files on the drive, which was likely not intended. Check that referenced properties are always defined and that the project and current working directory are not at the drive root.
FitnesseRunner failed with 1 error(s) (0.0s)
C:\Program Files\dotnet\sdk\9.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.props(36,62): error MSB5029: The value "/**" of the "Exclude" attribute in element <ItemGroup> in file "C:\Program Files\dotnet\sdk\9.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.Sdk.DefaultItems.props (36,62)" is a wildcard that results in enumerating all files on the drive, which was likely not intended. Check that referenced properties are always defined and that the project and current working directory are not at the drive root.
Either using .NET 8 SDK or removing artifacts layout from Directory.build.props solves the issue.
I worked around it by placing an empty Directory.build.props file beside the project. This does not work when invoking commands on the project from somewhere else than the projects folder itself.
<Project>
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->
<PropertyGroup>
<ArtifactsPath>$(MSBuildThisFileDirectory)artifacts</ArtifactsPath>
</PropertyGroup>
</Project>
Issue Description
Repository with Reproduction
While updating to .NET 9 I encountered the following issue:
When activating artifacts path layout via Directory.build.props and disabling it in a project down the folder structure inside a csproj file. The system reacts to any build related command with:
Either using .NET 8 SDK or removing artifacts layout from Directory.build.props solves the issue.
I worked around it by placing an empty Directory.build.props file beside the project. This does not work when invoking commands on the project from somewhere else than the projects folder itself.
Steps to Reproduce
Example Command:
dotnet restore ConsoleApp
Folder Structure:
Directory.build.props
ConsoleApp.csproj
global.json
Expected Behavior
Restoring the packages.
Actual Behavior
error MSB5029
Analysis
No response
Versions & Configurations
Dotnet SDK 9.0.101
The text was updated successfully, but these errors were encountered: