Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

project.assets.json not found - and the solution doesn't override BaseIntermediateOutputPath
dylanbeattie
#1 Posted : Tuesday, February 20, 2024 7:54:38 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/20/2012(UTC)
Posts: 12
Location: London

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
I'm trying to get NCrunch to run the tests which ship with EF Core (https://github.com/dotnet/efcore)

I've set the TargetFramework = net8.0 custom build property for all the projects, but now every project build fails with:

Quote:

System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> nCrunch.Common.UserException: Errors occurred while trying to load the project file:
Assets file 'D:\Projects\github\dylanbeattie\efcore\artifacts\obj\nCrunchTemp_fd77ce7d-d83c-44de-ad24-59161fbb704f\project.assets.json' not found. Run a NuGet package restore to generate this file.
at nCrunch.Compiler.ComponentAnalysisContext.()
at nCrunch.Compiler.ComponentAnalysisContext.AnalyseComponentBuild()
at nCrunch.Compiler.RemoteBuildRunner.AnalyseComponentBuild(ComponentLoadParameters parameters)
--- End of inner exception stack trace ---


I've found a previous issue (https://forum.ncrunch.net/Default.aspx?g=posts&t=2590&) referencing this error, but I can't find any reference to BaseIntermediateOutputPath anywhere in the EF Core source code, other than in a Powershell script which I'm pretty sure doesn't affect the NCrunch build process.

Is there another property or build setting I should be looking for? It sounds like exactly the same issue as previously but with a different underlying cause.
Remco
#2 Posted : Tuesday, February 20, 2024 9:51:42 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi, thanks for posting.

This particular solution seems to use an interesting override somewhere that forces the projects to share a common output directory based on the name of the project file. We don't have a way to directly handle this override in NCrunch, so the override will need to be modified to use the ProjectName property instead of the MSBuild project name property.

I'm having some trouble finding the specific override that's responsible for this behaviour. As is normal for many of the big public MS projects, there are a lot of build customisations in here... None of which would have been engineered around NCrunch's constraints.

How serious are you about getting NCrunch working on this solution? I think it's unlikely that the tests within will have been designed with our constraints in mind. It's likely to take quite an investment of time to get this up and running.
1 user thanked Remco for this useful post.
dylanbeattie on 2/21/2024(UTC)
dylanbeattie
#3 Posted : Wednesday, February 21, 2024 9:09:46 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/20/2012(UTC)
Posts: 12
Location: London

Thanks: 3 times
Was thanked: 2 time(s) in 2 post(s)
I had a feeling the answer might be something like that.

Don't worry about it, I'll keep playing around. I'm looking to add one very small feature, and EF Core is a very big project, so probably not worth spending the time on it. I just really miss the little coloured dots next to every line of the code...

Thanks!
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.032 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download