I was getting this issue trying a build command in .NET 9 for a Blazor web application and then after trying a few unsuccessful things, for me using the rebuild command instead of build resolved it although there are the same number of files in the bin\Debug\net9.0
` folder as there were before this but it fixed it at least for whatever reason so may be worth a try before amending the project or repairing VS.