Setup. On a clean up to date master I did build -clean, build -allconfigurations so everything Is clean and restored, no errors so baseline is good. From this point trying to build an individual project, example build src\System.Data.SqlClient or src\System.Data.Common (I have tried others, all the same) I get the error.
E:\Programming\csharp7\corefx\.dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(234,5): error NETSDK1004: Assets file 'E:\Programming\csharp7\corefx\artifacts\obj\System.Data.Common.Tests\project.assets.json' not found. Run a NuGet package restore to generate this file. [E:\Programming\csharp7\corefx\src\System.Data.Common\tests\System.Data.Common.Tests.csproj]
I've also seen this error in both visual studio and the corefx build output at various points.
NU1105 Unable to find project information for 'E:\Programming\csharp7\corefx\src\Common\tests\CoreFx.Private.TestUtilities\CoreFx.Private.TestUtilities.csproj'. Inside Visual Studio, this may be because the project is unloaded or not part of current solution so please run a restore from command-line. Otherwise the project file may be invalid or missing targets required for restore. System.Data.SqlClient.ManualTesting.Tests E:\Programming\csharp7\corefx\src\System.Data.SqlClient\tests\ManualTests\System.Data.SqlClient.ManualTesting.Tests.csproj
In visual studio 2019 latest stable I also get a number of other errors, this might not be supported but it points at the sdk again so I thought it worth including.
NETSDK1042 Could not load PlatformManifest from 'E:\Programming\csharp7\corefx\artifacts\bin\testhost\netcoreapp-Windows_NT-Debug-x64\shared\Microsoft.NETCore.App\5.0.0\PlatformManifest.txt' because it did not exist. Address C:\Program Files\dotnet\sdk\3.0.100-preview7-012821\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.ConflictResolution.targets
This means that the only way to iterate an individual library is to do a full rebuild which is undesirable and slow.
/cc @ViktorHofer for test project nuget restore issue, not sure who'd look at the rest.
cc: @ViktorHofer, @ericstj
These are all related to test restore.
@Wraith2 are you trying to build source projects or tests? You mentioned source projects but then the errors list test projects.
Do you happen to have DotNetBuildFromSource set in your environment? That would cause these errors. Otherwise we'd probably need to look at some logs to understand what's going on.
Test projects aren't being restored when specifying allconfigurations. That's the reason. We could probably add the restore target when building leaf projects from root. That should be easy to do.
I'm trying to work on a specific source project but I know not to try and use outdated dependencies so when I update my master I always clean and rebuild. The full rebuild works but building a single src folder does not. It looks like Viktor knows the issue, would building a single target update the dependencies then? so build -allconfigurations followed by build -c Release?
To solve your specific issue you can either do a build -restore or wait for me to make a change in the build scripts
I never use 'build' once I build from the root.
I used to use 'msbuild' for individual projects. Now I use 'dotnet msbuild'. It works fine. Here is an example of building the product source for System.Data.SqlClient:

And building and running tests works also with 'dotnet msbuild':

...

Right that scenario always works but @Wraith2's concern is that the root lead project build is broken.
That is a concern but if I have a workaround that lets me build and run tests on the project I'm working with then it unblocks me. What is the preferred/suggested method of working on a single project currently? dotnet msbuild or build?
Probably most of us use dotnet msbuild. The advantage of build from root is that you don't need to have a global sdk installed.
Having the same kind of problem while attempting to build via VS2019 16.3 P2:
NETSDK1042 Could not load PlatformManifest from 'C:\Users\gotos\source\repos\corefx\artifacts\bintesthost\netcoreapp-Windows_NT-Debug-x86\shared\Microsoft.NETCore.App\5.0.0\PlatformManifest.txt' because it did not exist.
It seems that the workaround is to use dotnet msbuild in the test directory to build/run individual projects, however this isn't an option for me since this happens when I try to use the test explorer as well, thus preventing me from using the explorer; is there any workarounds? I've done build & build -buildtests -test previously, then launched VS via build -vs System.Data.Common.
I can confirm same issue as @Gnbrkm41 using most current master branch; unable to run tests within VS.
It's defaulting to x86 instead of x64 for the folder location.
It might be this https://github.com/dotnet/sdk/pull/3543 in which case specifying a rid might fix it.
Maybe it's worth opening a new issue?