Project reference has no matching target


(tescosw) #1

Hello,
in our solution we have many delphi projects with various level of interconnection. The problem is when we try to build a single project which doesn’t have a reference to any other project in the solution, the build completes just fine. But when we try to build a project with a reference to another project then we get error (’() Projects Reference ‘nameOfProject’ has no matching target (Echoes .NET)

Do we have a mistake somewhere or is this some kind of bug?

Thank you for your help,
David


(marc hoffman) #2

By Delphi project I assume you mean Oxygene, right?

Most likely it’s a malformed project reference (or the referenced project actually is not a .NET project?), but it’s hard to say without more details or being the solution in question. Can you start by posting a full rebuild log created with log verbosity set to Diagnostic"?

you can do this most easily by passing the .sln to ebuild on the command line:

ebuild Your.sln --rebuild --debug

thanx,
marc


(tescosw) #3

Yes, sorry I meant Oxygen.

Diagnostic info:

Missing dependent project '..\Sys_jadro\Sys_jadro.elements' referenced from 'Synchronizace_AD', but project path 'C:\OmniTool - Workspaces\JadroTest1401\JadroTest1401\Sys_jadro\Sys_jadro.elements' is valid.
   -> Task RemObjects.EBuild.BuildSolution started.
      -> Project Synchronizace_AD started.
         -> Task RemObjects.EBuild.Elements.ElementsBuildProject started for Synchronizace_AD.
            -> Task RemObjects.EBuild.Elements.ElementsSanityCheck started for Synchronizace_AD, Echoes.
            <- Task RemObjects.EBuild.Elements.ElementsSanityCheck finished for Synchronizace_AD, Echoes, took 0,0030s (0,0030s).
            -> Task RemObjects.EBuild.Elements.ElementsApplyLegacySettings started for Synchronizace_AD, Echoes.
               Mapping UseXmlDoc=False to XmlDoc
               Mapping DefineConstants=DEBUG;TRACE;AGGREGATION; to ConditionalDefines
               Mapping AssemblyName=Synchronizace_AD to BinaryName
               Mapping CpuType=anycpu to Architecture
            <- Task RemObjects.EBuild.Elements.ElementsApplyLegacySettings finished for Synchronizace_AD, Echoes, took 0,0160s (0,0170s).
            -> Task RemObjects.EBuild.Elements.ElementsPreparePlatforms started for Synchronizace_AD.
               Preparing target 'Echoes' (platform 'Echoes').
D:             Target-specific Settings, before prepare
D:               - <Architecture = anycpu [Target: Echoes]>
D:               - <BinaryName = Synchronizace_AD [Target: Echoes]>
D:               - <ConditionalDefines = DEBUG;TRACE;AGGREGATION; [Target: Echoes]>
D:               - <Mode = Echoes [Target: Echoes]>
D:               - <XmlDoc = False [Target: Echoes]>
               -> Task RemObjects.EBuild.Elements.ElementsPreflightEchoes started for Synchronizace_AD.
                  Reference Assemblies base path is 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework',
               <- Task RemObjects.EBuild.Elements.ElementsPreflightEchoes finished for Synchronizace_AD, took 0,0010s (0,0020s).
               -> Task RemObjects.EBuild.Elements.ElementsPrepareEchoesPlatform started for Synchronizace_AD, Echoes.
                  Reference Assemblies path for .NET is 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework',
               <- Task RemObjects.EBuild.Elements.ElementsPrepareEchoesPlatform finished for Synchronizace_AD, Echoes, took 0,0251s (0,0271s).
D:             Target-specific Settings, after prepare
D:               - <Architecture = anycpu [Target: Echoes]>
D:               - <BinaryName = Synchronizace_AD [Target: Echoes]>
D:               - <ConditionalDefines = DEBUG;TRACE;AGGREGATION; [Target: Echoes]>
D:               - <IDE:TargetInfo = .NET4.7.1 (compatible with netstandard2.0) [Target: Echoes]>
D:               - <Mode = Echoes [Target: Echoes]>
D:               - <NETStandardVersion = 2.0 [Target: Echoes]>
D:               - <NuGetCacheFolder = C:\Users\KolarD\AppData\Local\RemObjects Software\EBuild\Packages\NuGet [Target: Echoes]>
D:               - <NuGetPlatformName = net [Target: Echoes]>
D:               - <NuGetPlatformVersion = 4.7.1 [Target: Echoes]>
D:               - <SubMode = .NET [Target: Echoes]>
D:               - <TargetFrameworkName = .NET [Target: Echoes]>
D:               - <TargetFrameworkNameLong = .NET,Version=v4.7.1 [Target: Echoes]>
D:               - <TargetFrameworkReferenceAssembliesBasePath = C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework [Target: Echoes]>
D:               - <TargetFrameworkReferenceAssembliesPath = C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1 [Target: Echoes]>
D:               - <TargetFrameworkVersion = 4.7.1 [Target: Echoes]>
D:               - <XmlDoc = False [Target: Echoes]>
            <- Task RemObjects.EBuild.Elements.ElementsPreparePlatforms finished for Synchronizace_AD, took 0,0391s (0,0672s).
            -- Task RemObjects.EBuild.Elements.ElementsPreparePlatforms skipped for Synchronizace_AD, already ran.
            -> Task RemObjects.EBuild.Elements.ElementsCheckForTargetlessReferences started for Synchronizace_AD.
            <- Task RemObjects.EBuild.Elements.ElementsCheckForTargetlessReferences finished for Synchronizace_AD, took 0,0040s (0,0055s).
            -> Task RemObjects.EBuild.Elements.ElementsResolveReferences started for Synchronizace_AD.
               -> Target Echoes started.
                  -> Task RemObjects.EBuild.Elements.ElementsProcessNuGetReferences started for Synchronizace_AD, Echoes.
                  <- Task RemObjects.EBuild.Elements.ElementsProcessNuGetReferences finished for Synchronizace_AD, Echoes, took 0,0020s (0,0030s).
                  -> Task RemObjects.EBuild.Elements.ElementsResolveEchoesReferencesForTarget started for Synchronizace_AD, Echoes.
                     Reference 'Elements' was resolved to 'C:\Program Files (x86)\RemObjects Software\Elements\Echoes\Reference Assemblies\NET\Elements.dll' via XML for target 'Echoes'.
                     Reference 'mscorlib' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\mscorlib.dll' for target 'Echoes'.
                     Reference 'System' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.dll' for target 'Echoes'.
                     Reference 'System.Data' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.Data.dll' for target 'Echoes'.
                     Reference 'System.Xml' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.Xml.dll' for target 'Echoes'.
                     Reference 'system.messaging' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\system.messaging.dll' for target 'Echoes'.
                     Reference 'TescoSW.OW' was resolved to 'C:\OmniTool - Workspaces\JadroTest1401\JadroTest1401\References\TescoSW.OW.dll' via 'HintPath' for target 'Echoes'.
                     Reference 'TescoSW.Web' was resolved to 'C:\OmniTool - Workspaces\JadroTest1401\JadroTest1401\References\TescoSW.Web.dll' via 'HintPath' for target 'Echoes'.
                     Reference 'TescoSW.Web.Reports' was resolved to 'C:\OmniTool - Workspaces\JadroTest1401\JadroTest1401\References\TescoSW.Web.Reports.dll' via 'HintPath' for target 'Echoes'.
                     Reference 'Tools' was resolved to 'C:\OmniTool - Workspaces\JadroTest1401\JadroTest1401\References\Tools.dll' via 'HintPath' for target 'Echoes'.
                     Reference 'TescoSW.Global' was resolved to 'C:\OmniTool - Workspaces\JadroTest1401\JadroTest1401\References\TescoSW.Global.dll' via 'HintPath' for target 'Echoes'.
                     Reference 'TescoSW.OW.Delphi' was resolved to 'C:\OmniTool - Workspaces\JadroTest1401\JadroTest1401\References\TescoSW.OW.Delphi.dll' via 'HintPath' for target 'Echoes'.
                     Project 'Sys_jadro' referenced from 'Synchronizace_AD' is not enabled, reusing cached final output.
E:                   Project Reference 'Sys_jadro' has no matching target (Echoes .NET)
                     Reference 'System.Core' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.Core.dll' for target 'Echoes'.
                     Added implicit reference to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.1\System.Core.dll'
                     Reference 'Echoes' was resolved to 'C:\Program Files (x86)\RemObjects Software\Elements\Echoes\Reference Assemblies\NET\Echoes.dll' via XML for target 'Echoes'.
                     Added implicit reference to 'C:\Program Files (x86)\RemObjects Software\Elements\Echoes\Reference Assemblies\NET\Echoes.dll'
                  <- Task RemObjects.EBuild.Elements.ElementsResolveEchoesReferencesForTarget failed for Synchronizace_AD, Echoes, took 0,0926s (0,0976s).
               <- Target Echoes failed.
            <- Task RemObjects.EBuild.Elements.ElementsResolveReferences failed for Synchronizace_AD, took 0,1187s (0,1252s).
         <- Task RemObjects.EBuild.Elements.ElementsBuildProject failed for Synchronizace_AD, took 0,0000s (0,2000s).
      <- Project Synchronizace_AD failed, took 0,2019s.
      Project 'Synchronizace_AD' failed to build.
      Solution 'Synchronizace_AD' failed to build all projects.
   <- Task RemObjects.EBuild.BuildSolution failed for Synchronizace_AD, took 0,2080s (0,2099s).

How references look:


(marc hoffman) #4

This looks to be it:

Missing dependent project '..\Sys_jadro\Sys_jadro.elements' referenced from 'Synchronizace_AD', but project path 'C:\OmniTool - Workspaces\JadroTest1401\JadroTest1401\Sys_jadro\Sys_jadro.elements' is valid.

when a project is not in the solution, it will not be build. but given that the path is valid, EBuild will try to gather details from the last time it was built, and use try to use that as a reference.

that part seems to fail.:

                    Project 'Sys_jadro' referenced from 'Synchronizace_AD' is not enabled, reusing cached final output.
E:                   Project Reference 'Sys_jadro' has no matching target (Echoes .NET)

let me look at the code to see if I can guess what scenarios could cause this exact combination of messages (and improve that for vNext, too)…

(Side note: I don’t have that exact message in my code anymore, is this an old Elements build? Can you retry with .2363, just too be sure?

But from the message can tell that it did manage to load the FinalOutput.xml file was was created when Sys_jadro was last built, but that .xml file does not seem to have the details its looking for.

Do you know if this Sys_jadro project was recently built? Can you

  • a grab the FinalOutput.xml for it and post it here
  • rebuild that project
  • see if t=your solution then builds ok?

(tescosw) #5

I’ve tried again with version .2363 (even with last stable version) and it works! :smile: Project is now correctly building.

Thank you for your help! :slight_smile:


(marc hoffman) #6

Cool, glad to hear!