VS BuildTools Version: Master\30403.137
NuGet Build Tools SKU Version: Dev\5.8.0.6761
\\ddfiles\Drops\NuGet\Drops\CI\NuGet.Client\Dev\5.8.0.6761\artifacts\VS15\Microsoft.VisualStudio.NuGet.BuildTools.vsixC:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\Common7\IDE\CommonExtensions\Microsoft\NuGetContents\Common7\IDE\CommonExtensions\Microsoft\NuGet\C:\Program Files (x86)\ Microsoft Visual Studio\2019\Preview\Common7\IDE\CommonExtensions\Microsoft\NuGetmsbuild /t:restore.msbuild /t:build /restore.All of these should succeed without any error.
Error NETSDK1005 occurred when running command msbuild /t:build /restore as below screenshot.

"C:\Test\ConsoleNetCore\ConsoleNetCore\ConsoleNetCore.csproj" (build target) (1:7) ->
(ResolvePackageAssets target) ->
C:\Program Files\dotnet\sdk\5.0.100-preview.7.20366.6\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResol
ution.targets(241,5): error NETSDK1005: Assets file 'C:\Test\ConsoleNetCore\ConsoleNetCore\obj\project.assets.json' doe
sn't have a target for '.NETCoreApp,Version=v5.0'. Ensure that restore has run and that you have included 'net5.0' in t
he TargetFrameworks for your project. [C:\Test\ConsoleNetCore\ConsoleNetCore\ConsoleNetCore.csproj]
It start to repro from NuGet Build Tools Vsix Dev\5.8.0.6761. Not repro on NuGet Build Tools Vsix Dev\5.8.0.6760.
Hi @zkat , is this related to NET5 changes is 6761?
@aortiz-msft
Based on the commits, I think it's https://github.com/NuGet/NuGet.Client/commit/280abd3f8a7f2656246450d91fb33fc7262e6de0. It's my change 👋
However, this is also likely by design based on The issue doesn’t repro when using a .NET Core project with Target Framework is net3.1..
The problem is that the dotnet SDK is reporting a TPI for P7, but it's something they fixed in P8.
I'll have to verify that first, but pretty confident the answer here is just waiting it out.
It might be good for @v-luzh to add this test case in NET5 SDK P8 and later, but I'll confirm that later today.
Cool, thanks for the info! In that case, I will continue the insertion of 6761 unless you tell me otherwise based on your findings.
@aortiz-msft
I think it'll be nice to not insert just this change.
The reading of Target framework props is a multi part change shared across the 3 of us.
I would be scared to have 1 be merged without the other 3.
So I'd recommend either inserting with the build prior to this chnage, or wait for today and for us to merge the 3 new PRs.
Update: We're going to wait until the 3 PRs are merged in order to proceed with the insertion. We'll check that they do indeed fix the issue at that point.
@v-luzh these changes should be in by now. Do you mind re-testing with the latest dotnet master? (this one's urgent, please)
Specifically, we need to test the following scenario:
You can refer to our debugging guide on how to patch dotnet.exe for testing, and I'm available by email or Teams if you need any help getting all this set up.
@zkat Hi, Kat, the issue still repro on latest VS build tools Master\30412.164 + NuGet Build Tools Vsix Dev\5.8.0.6776, but doesn't repro when do not Install the latest NuGet Build Tools SKU vsix Dev\5.8.0.6776 (skip Installation steps 3).
@zkat Hi, Kat, Verified on VS Build Tools Main\30417.28 + NuGet Build Tools Vsix Dev\5.8.0.6777 today, the issue has been fixed.
Most helpful comment
@zkat Hi, Kat, Verified on VS Build Tools Main\30417.28 + NuGet Build Tools Vsix Dev\5.8.0.6777 today, the issue has been fixed.