-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build: individual project build failures #30501
Comments
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 |
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 |
To solve your specific issue you can either do a build -restore or wait for me to make a change in the build scripts |
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? |
Probably most of us use |
Having the same kind of problem while attempting to build via VS2019 16.3 P2:
It seems that the workaround is to use |
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 dotnet/sdk#3543 in which case specifying a rid might fix it. |
Maybe it's worth opening a new issue? |
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, examplebuild src\System.Data.SqlClient
orsrc\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.
The text was updated successfully, but these errors were encountered: