Unknown namespace error when referencing executable in elements 10


(Gert Hermans) #1

This error popped up when upgrading to elements 10. This was not an issue for element 9.3.
In some projects a unittest project is referencing an executable. In elements 10 the software does not recognize the namespace of the referenced project. Strangely intellisense still shows the specific namespace.
I’ve attached a dummy project that shows the issue. When building it you’ll get an error stating “Unknown namespace “ReferenceThis.ViewModels” in uses list”.
ReferenceThisWithExtraClassLibrary.zip (170.8 KB)

(marc hoffman) #2

could it be you are missing a Reference? where is ReferenceThis.ViewModels supposed to be defined?

(Gert Hermans) #3

FakeUnitTests is referencing Reference this. The namespace ReferenceThis.ViewModels is the namespace in RefViewmodel.pas in the ViewModels folder of the ReferenceThis project.
You get the same issue if change ‘uses ReferenceThis.ViewModels’ to ‘uses ReferenceThis’ in Class1 in FakeUnitTests

(Gert Hermans) #4

Looks like it has something to do with the new build system. If I change the build path in FakeUnitTests.elements to RemObjects.Elements.Echoes.Legacy.targets the bug is gone.

(RemObjects) #5

Thanks, logged as bugs://81432

(marc hoffman) #6

Hmm, yes, curious:

                  -> Task RemObjects.EBuild.Elements.ElementsResolveEchoesReferencesForTarget started for FakeUnitTests, Echoes.
                     Reference 'mscorlib' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.6/mscorlib.dll' for target 'Echoes'.
                     Reference 'System' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.6/System.dll' for target 'Echoes'.
                     Reference 'System.Data' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.6/System.Data.dll' for target 'Echoes'.
                     Reference 'System.Xml' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.6/System.Xml.dll' for target 'Echoes'.
                     Reference 'System.Core' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.6/System.Core.dll' for target 'Echoes'.
                     Reference 'System.Xml.Linq' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.6/System.Xml.Linq.dll' for target 'Echoes'.
                     Reference 'System.Data.DataSetExtensions' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.6/System.Data.DataSetExtensions.dll' for target 'Echoes'.
D:                   Project Reference 'ReferenceClass' will resolve using target 'Echoes'.
                     Project Reference 'ReferenceClass' was resolved to '/Users/mh/Library/Application Support/RemObjects Software/EBuild/Obj/ReferenceClass-18648C4062BC58790B162C88B0E3537AE7FA0238/Debug/Echoes/ReferenceClass.dll' via target 'Echoes'.
D:                   Project Reference 'ReferenceThis' will resolve using target 'Echoes'.
                  <- Task RemObjects.EBuild.Elements.ElementsResolveEchoesReferencesForTarget finished for FakeUnitTests, Echoes, took 0.0230s (0.0231s).

the ReferenceThis project reference resolves, but adds no .dlls. ReferenceClass is fine. I’ll investigate.

(marc hoffman) #7

Ah, yes. EBuild currently does not handle references to .exes properly. Fixed for today’s upcoming build .2345.

(RemObjects) #8

bugs://81432 got closed with status fixed.