() Project Reference '...j' could not be resolved for target 'Echoes' (Echoes .NET anycpu)

Hello,
while testing new build [11.0.0.2653] via Visual Studio 2022 or CMD MSbuild im facing these issues:

  1. Compile Error: dont know why but ProjectReferences from .elements project to .csproj project are not resolved:
    In Error List:
    () Project Reference ‘…\Global\Source\TescoSW.Global.csproj’ could not be resolved for target ‘Echoes’ (Echoes .NET anycpu).
    I could not find any hints in diagnostict mbsuild log.
    Details from ResolveRefences Output pane:
 > Project 'TescoSW.Global.DataTypeUtils' referenced from 'TescoSW.OW.Delphi' is not enabled and has no cached final output. Falling back to hint path.
> D:          Cache file 'C:\Users\tumal\AppData\Local\RemObjects Software\EBuild\Obj\DFFF4343687D0CF9B43CF05068D5E24A3D207A25\Unknown\FinalOutput.xml' does not exist.
> D:          Hint path 'C:\Users\tumal\source\repos\TEAF\PortableLibs\TescoSW\Global\DataTypeUtils\bin\De$(Configuration)bug\netstandard2.0\TescoSW.Global.DataTypeUtils.dll' does not exist'.
> E:          Project Reference '..\..\..\PortableLibs\TescoSW\Global\DataTypeUtils\TescoSW.Global.DataTypeUtils.csproj' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
>             Project 'TescoSW.Global' referenced from 'TescoSW.OW.Delphi' is not enabled and has no cached final output. Falling back to hint path.
> D:          Cache file 'C:\Users\tumal\AppData\Local\RemObjects Software\EBuild\Obj\D3AC6162C795CCF3A70BE4F3894B4F605FCA5D94\Unknown\FinalOutput.xml' does not exist.
> D:          Hint path 'C:\Users\tumal\source\repos\TEAF\Server\TescoSW\Global\Source\bin\$(Configuration)\TescoSW.Global.dll' does not exist'.
> E:          Project Reference '..\Global\Source\TescoSW.Global.csproj' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
>             Project 'TescoSW.SMSSender' referenced from 'TescoSW.OW.Delphi' is not enabled and has no cached final output. Falling back to hint path.
> D:          Cache file 'C:\Users\tumal\AppData\Local\RemObjects Software\EBuild\Obj\17C84C660DABCA8062E654FEAD757DD693E8B0CB\Unknown\FinalOutput.xml' does not exist.
> D:          Hint path 'C:\Users\tumal\source\repos\TEAF\Server\TescoSW\Messaging\SMS\SMSSender\bin\$(Configuration)\TescoSW.SMSSender.dll' does not exist'.
> E:          Project Reference '..\Messaging\SMS\SMSSender\TescoSW.SMSSender.csproj' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
>             Project 'TescoSW.OW.Abstractions' referenced from 'TescoSW.OW.Delphi' is not enabled and has no cached final output. Falling back to hint path.
> D:          Cache file 'C:\Users\tumal\AppData\Local\RemObjects Software\EBuild\Obj\48B5A6EE3C6694660CC5275AC86E75E6752F9875\Unknown\FinalOutput.xml' does not exist.
> D:          Hint path 'C:\Users\tumal\source\repos\TEAF\Server\TescoSW\OW.Abstractions\bin\$(Configuration)\netstandard2.0\TescoSW.OW.Abstractions.dll' does not exist'.
> E:          Project Reference '..\OW.Abstractions\TescoSW.OW.Abstractions.csproj' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
>             Project 'TescoSW.OW' referenced from 'TescoSW.OW.Delphi' is not enabled and has no cached final output. Falling back to hint path.
> D:          Cache file 'C:\Users\tumal\AppData\Local\RemObjects Software\EBuild\Obj\3E8565E2ACA6AE6373AC149AB5D6BB1B006E58CE\Unknown\FinalOutput.xml' does not exist.
> D:          Hint path 'C:\Users\tumal\source\repos\TEAF\Server\TescoSW\OW\Source\bin\$(Configuration)\TescoSW.OW.dll' does not exist'.
> E:          Project Reference '..\OW\Source\TescoSW.OW.csproj' could not be resolved for target 'Echoes' (Echoes .NET anycpu).
  1. MSBUILD hangs after build failure
    I can still see the msbuild in the running procs after any build with elements projects fails. The hanging process utilizes 1 core fully. Dont know how to get a better information about this yet.

Could someone help me investigate this ?

The problem is rooted in migration to EBuild from Legacy.targets which i tried to do as well in the same step. In this mentioned failing project, we have project References like this:

    <ProjectReference Include="..\OW.Abstractions\TescoSW.OW.Abstractions.csproj">
      <Name>TescoSW.OW.Abstractions</Name>
      <Project>{495bb4d3-f5ae-4a2c-ad7e-7aad8a986065}</Project>
      <Private>True</Private>
<HintPath>..\OW.Abstractions\bin\$(Configuration)\netstandard2.0\TescoSW.OW.Abstractions.dll</HintPath>
    </ProjectReference>

Hintpath, where bin\$(Configuration)\netstandard2.0 doesnt work any more in Ebuild.

I tried to readd references from scratch, but this leads me to the third problem where a window with
Object reference not set to an instance of an object appears( with no more details), when i try to add a Project reference in visual studio 2022 Solution explorer. And this happens also with brand new projects freshly created, when adding references event with the VS 2019.

Removing the hint path doesnt work as well, the only working way appears to be with the Hint path, that exactly matches the ouput file(so it does project type in VS 2019), which i thing is crazy, because it forces me to set different ProjectReferences for each build $(Configuration) under conditional group.
Is this the right way, you want me to do ?

Not unexpected, that’s not something we support right now. I can add support for this for Friday’s build.

Fixed. Workaround: you can just use “Debug” or “Release” there; ebuild will automatically adjust that, if it detects that the last path component is a configuration name.

Thanks. One more question about the message

Project ‘TescoSW.Global.DataTypeUtils’ referenced from ‘TescoSW.OW.Delphi’ is not enabled and has no cached final output. Falling back to hint path.

What is the meaning of: is not enabled and has no cached final output. Falling back to hint path. ? is there any tweak i could do to get rid of that hint path ?

EBuild projects on MSBuild are a bit of a hack, each project gets build on its own, called int EBuild by MSBuild, and to EBuild it looks like its standalone, in a solution without all the other projects.

Now, EBuild does a n to of tricks to resolve project references, even when bad (it looks for the project by ID in the solution (that’ll fail here), or by filename and will find the “cached ouput” .xml file that would have been generated if that project had been built before (that fails in this case, because the project in question VC#) — so all thats left is to look at the hint path.

Which it will automatically swizzle between Debug/Release (or any other configuration name known in your project), toi find there best matching version.

The only part missing was that it didn’t resolve variables in the HintPath, and thats fixed for today’s build.

One more issu with moving from Legacy.targets to non legacy:
Is the Clean target supposed to be working ? Here it looks like it doesnt clean bin dirs nor EBuild cache.

And hopefully last thing is a weird circular dependecy detection:
Two of our projects are throwing circular dependency error but for sure, there is no circular dependecy between them, build works with legacy targets.
Need to find out.
From the ouput it appears like the project has a direct reference to itself.

Projekt D:\Ypsilon\JadroTest\Hodnotova_analyza\Hodnotova_analyza.elements v uzlu 1 (počet cílů: 
Rebuild:
     Reference 'TescoSW.OW.Abstractions' was resolved to 'D:\Ypsilon\JadroTest\References\TescoSW.OW.Abstractions.dll' via 'HintPath' for target 'Echoes'.
     Reference 'TescoSW.Sys_jadro' was resolved to 'D:\Ypsilon\JadroTest\References\TescoSW.Sys_jadro.dll' via 'HintPath' for target 'Echoes'.
     Reference 'mscorlib' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll' for target 'Echoes'.
     Reference 'System' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll' for target 'Echoes'.
     Reference 'System.Data' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Data.dll' for target 'Echoes'.
     Reference 'System.Xml' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Xml.dll' for target 'Echoes'.
     Reference 'system.messaging' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\system.messaging.dll' for target 'Echoes'.
     Reference 'TescoSW.OW' was resolved to 'D:\Ypsilon\JadroTest\References\TescoSW.OW.dll' via 'HintPath' for target 'Echoes'.
     Reference 'TescoSW.Web' was resolved to 'D:\Ypsilon\JadroTest\References\TescoSW.Web.dll' via 'HintPath' for target 'Echoes'.
     Reference 'TescoSW.Web.Reports' was resolved to 'D:\Ypsilon\JadroTest\References\TescoSW.Web.Reports.dll' via 'HintPath' for target 'Echoes'.
     Reference 'Tools' was resolved to 'D:\Ypsilon\JadroTest\References\Tools.dll' via 'HintPath' for target 'Echoes'.
     Reference 'TescoSW.Global' was resolved to 'D:\Ypsilon\JadroTest\References\TescoSW.Global.dll' via 'HintPath' for target 'Echoes'.
     Reference 'TescoSW.OW.Delphi' was resolved to 'D:\Ypsilon\JadroTest\References\TescoSW.OW.Delphi.dll' via 'HintPath' for target 'Echoes'.
     Reference 'TescoSW.Reporting' was resolved to 'D:\Ypsilon\JadroTest\References\TescoSW.Reporting.dll' via 'HintPath' for target 'Echoes'.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\RemObjects Software\Elements\RemObjects.Elements.Echoes.targets(70,3): EBuild  error : Project 'Hodnotova_analyza' referenced from 'Hodnotova_analyza' was not built yet (circular dependency?). [D:\Ypsilon\JadroTest\Hodnotova_analyza\Hodnotova_analyza.elements]
     Reference 'System.Core' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.Core.dll' for target 'Echoes'.
Sestavení projektu D:\Ypsilon\JadroTest\Hodnotova_analyza\Hodnotova_analyza.elements (počet cílů: Rebuild) bylo dokončeno: CHYBA.

C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\RemObjects Software\Elements\RemObjects.Elements.Echoes.targets(70,3): EBuild error : Project ‘Hodnotova_analyza’ referenced from ‘Hodnotova_analyza’ was not built yet (circular dependency?).

It should, yes…

Could I see the .sln and the project files involved (I don’t need the code files & rest)

FWIW< its probably not a circular dependency, as I recently added explicit checks for those, but something else. I’ll tweak that error message once I found the real issue.