Project reference


(Birger Buhl Dinesen) #1

I have a solution from Visual Studio, that I have started coding in Water. Really nice and fast :slight_smile:

There seems to be a problem with project references. In the build log (Ebuild) it is not able to find the referenced project. Here is an example from the build log:

Project for reference '..\HDSMDB.Service\HDSMDB.Service.elements' was not found in the solution.
Project Reference '..\HDSMDB.Service\HDSMDB.Service.elements' was resolved to 'C:\SVN\Home\HD-SMDB\HDSMDB.Service\bin\Release\HDSMDB.Service.dll' via 'HintPath' for target 'Echoes'.

How should this work? I would think that it should build the referenced projects and copy local as required.
Now it seems to use the already compiled binaries from the HintPath - so it is hardcoded to Debug or Release folder.

Another thing: In the References section in the Water Project Tree the project reference is shown like this:

billede


(marc hoffman) #2

Glad to hear!

Project references should work like this:

  • if both projects are in the solution, the reference will get connected via the ID (and the build order will be set accordingly)
  • if the referenced project is not in the solution, EBuild will still pick up a valid HintPath

starting with the next build:

  • if the project is not in the solution and the hint path is invalid, but the project can be located fie the provided pat to the .elements, EBuild will implicitly load it into the solution (and build it in the right order, as if it had been in the .sln.

Is there any chance I could take a look at your solution (you can mail it, I’ll beep it confidential) to see what’s failing in your case? I take it both projects are in the .sln file?

thanx,
marc


(Birger Buhl Dinesen) #3

I just sent you an e-mail with the .sln file attached.

Both projects are in the file.


(marc hoffman) #4

Hm, no mail so far. where did you send it, mh@? support@?


(Birger Buhl Dinesen) #5

I sent it to mh@

I attach it here. No secrets :slight_smile:

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{656346D9-4656-40DA-A068-22D5425D4639}") = "HDSMDB.Test", "HDSMDB.Test\HDSMDB.Test.elements", "{9C611886-C30D-4B51-B523-42F82FF1968F}"
EndProject
Project("{656346D9-4656-40DA-A068-22D5425D4639}") = "HDSMDB.Service", "HDSMDB.Service\HDSMDB.Service.elements", "{C7BB8C7F-C158-4557-8A82-DCD1D4B7A850}"
EndProject
Project("{656346D9-4656-40DA-A068-22D5425D4639}") = "HDWSTRUST", "HDWSTRUST\HDWSTRUST.elements", "{7B2D5997-01E2-4AEF-8F4E-272D20345BB3}"
EndProject
Project("{656346D9-4656-40DA-A068-22D5425D4639}") = "HDSMDB.Common", "HDSMDB.Common\HDSMDB.Common.elements", "{5DA3B460-FA95-4E9F-9725-50FFF9BA7E95}"
EndProject
Project("{656346D9-4656-40DA-A068-22D5425D4639}") = "HDSMDB.Client", "HDSMDB.Client\HDSMDB.Client.elements", "{ACAC4FCA-C93E-491B-A2E8-ACE60550A279}"
EndProject
Global
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
		Debug|Default = Debug|Default
		Release|Default = Release|Default
	EndGlobalSection
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
		{9C611886-C30D-4B51-B523-42F82FF1968F}.Debug|Default.ActiveCfg = Debug
		{9C611886-C30D-4B51-B523-42F82FF1968F}.Debug|Default.Build.0 = Debug
		{9C611886-C30D-4B51-B523-42F82FF1968F}.Release|Default.ActiveCfg = Release
		{9C611886-C30D-4B51-B523-42F82FF1968F}.Release|Default.Build.0 = Release
		{C7BB8C7F-C158-4557-8A82-DCD1D4B7A850}.Debug|Default.ActiveCfg = Debug
		{C7BB8C7F-C158-4557-8A82-DCD1D4B7A850}.Debug|Default.Build.0 = Debug
		{C7BB8C7F-C158-4557-8A82-DCD1D4B7A850}.Release|Default.ActiveCfg = Release
		{C7BB8C7F-C158-4557-8A82-DCD1D4B7A850}.Release|Default.Build.0 = Release
		{7B2D5997-01E2-4AEF-8F4E-272D20345BB3}.Debug|Default.ActiveCfg = Debug
		{7B2D5997-01E2-4AEF-8F4E-272D20345BB3}.Debug|Default.Build.0 = Debug
		{7B2D5997-01E2-4AEF-8F4E-272D20345BB3}.Release|Default.ActiveCfg = Release
		{7B2D5997-01E2-4AEF-8F4E-272D20345BB3}.Release|Default.Build.0 = Release
		{5DA3B460-FA95-4E9F-9725-50FFF9BA7E95}.Debug|Default.ActiveCfg = Debug
		{5DA3B460-FA95-4E9F-9725-50FFF9BA7E95}.Debug|Default.Build.0 = Debug
		{5DA3B460-FA95-4E9F-9725-50FFF9BA7E95}.Release|Default.ActiveCfg = Release
		{5DA3B460-FA95-4E9F-9725-50FFF9BA7E95}.Release|Default.Build.0 = Release
		{ACAC4FCA-C93E-491B-A2E8-ACE60550A279}.Debug|Default.ActiveCfg = Debug
		{ACAC4FCA-C93E-491B-A2E8-ACE60550A279}.Debug|Default.Build.0 = Debug
		{ACAC4FCA-C93E-491B-A2E8-ACE60550A279}.Release|Default.ActiveCfg = Release
		{ACAC4FCA-C93E-491B-A2E8-ACE60550A279}.Release|Default.Build.0 = Release
	EndGlobalSection
	GlobalSection(SolutionProperties) = preSolution
		HideSolutionNode = FALSE
	EndGlobalSection
EndGlobal

(marc hoffman) #6

I’ll need the full thing to reproduce this, not just the contens of the .sln.


(Birger Buhl Dinesen) #7

Ahh ok.
I have sent a zip file now to mh@remobjects dot com


(marc hoffman) #8

Sorry, still nothing here. Checked the Spam folder too. :frowning:


(Birger Buhl Dinesen) #9

Hm. Must be blocked somewhere then.
I will upload it to our webserver and send a link.


(Birger Buhl Dinesen) #10

I will try and send a blank e-mail as well.


(Birger Buhl Dinesen) #11

Now I have sent you a download link to your e-mail


(marc hoffman) #12

got the download link now, AND the one with the attachment afterwards. )


(marc hoffman) #13

Hmm, your solution compiles fine for me, in EBuild:

Build order:

    1. HDSMDB.Service
    1. HDSMDB.Test
    1. HDWSTRUST
    1. HDSMDB.Common
    1. HDSMDB.Client

all fine projects build successfully:

                 -> Task RemObjects.EBuild.Elements.ElementsResolveEchoesReferencesForTarget started for HDSMDB.Client, Echoes.
                     Reference 'mscorlib' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.5.2/mscorlib.dll' for target 'Echoes'.
                     Reference 'RemObjects.DataAbstract' was resolved to '/Users/mh/bin/RemObjects Data Abstract - Mac Zip Distro - master-20180321-155100 - 9.4.107.1363/Echoes/RemObjects.DataAbstract.dll' via XML for target 'Echoes'.
                     Reference 'RemObjects.DataAbstract.Server' was resolved to '/Users/mh/bin/RemObjects Data Abstract - Mac Zip Distro - master-20180321-155100 - 9.4.107.1363/Echoes/RemObjects.DataAbstract.Server.dll' via XML for target 'Echoes'.
                     Reference 'System' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.5.2/System.dll' for target 'Echoes'.
                     Reference 'System.Data' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.5.2/System.Data.dll' for target 'Echoes'.
                     Reference 'System.Xml' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.5.2/System.Xml.dll' for target 'Echoes'.
                     Reference 'System.Core' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.5.2/System.Core.dll' for target 'Echoes'.
                     Reference 'System.Xml.Linq' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.5.2/System.Xml.Linq.dll' for target 'Echoes'.
                     Reference 'System.Data.DataSetExtensions' was resolved to '/Users/mh/Code/Fire Support/_NETFramework/v4.5.2/System.Data.DataSetExtensions.dll' for target 'Echoes'.
D:                   Using target Echoes of project reference HDSMDB.Common
D:                   Using target Echoes of project reference HDSMDB.Service
                  <- Task RemObjects.EBuild.Elements.ElementsResolveEchoesReferencesForTarget finished for HDSMDB.Client, Echoes, took 0.0364s (0.0392s).

(marc hoffman) #14

(I can confirm that the resolved reference shows twice nested in the tree-view; I’ll investigate why that happens, tomorrow, but that’s purely cosmetic…)


(marc hoffman) #15

that one’s fixed;


(Birger Buhl Dinesen) #16

Should I send the complete build log so you compare.
I use the latest Water release to build.


(Birger Buhl Dinesen) #17
   -> Task RemObjects.EBuild.Elements.ElementsCheckForTargetlessReferences started.
   <- Task RemObjects.EBuild.Elements.ElementsCheckForTargetlessReferences finished, took 0,0000s (0,0000s).
   -> Task RemObjects.EBuild.Elements.ElementsResolveReferences started.
      -> Target Echoes started.
         -> Task RemObjects.EBuild.Elements.ElementsProcessNuGetReferences started, Echoes.
         <- Task RemObjects.EBuild.Elements.ElementsProcessNuGetReferences finished, Echoes, took 0,0000s (0,0000s).
         -> Task RemObjects.EBuild.Elements.ElementsResolveEchoesReferencesForTarget started, Echoes.
            Reference 'mscorlib' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\mscorlib.dll' for target 'Echoes'.
            Reference 'RemObjects.DataAbstract' was resolved to 'C:\Program Files (x86)\RemObjects Software\Data Abstract for .NET\Bin\RemObjects.DataAbstract.dll' via 'HintPath' for target 'Echoes'.
            Reference 'RemObjects.DataAbstract.Async' was resolved to 'C:\Program Files (x86)\RemObjects Software\Data Abstract for .NET\Bin\RemObjects.DataAbstract.Async.dll' via 'HintPath' for target 'Echoes'.
            Reference 'RemObjects.DataAbstract.Server' was resolved to 'C:\Program Files (x86)\RemObjects Software\Data Abstract for .NET\Bin\RemObjects.DataAbstract.Server.dll' via 'HintPath' for target 'Echoes'.
            Reference 'RemObjects.SDK' was resolved to 'C:\Program Files (x86)\RemObjects Software\Data Abstract for .NET\Bin\RemObjects.SDK.dll' via 'HintPath' for target 'Echoes'.
            Reference 'RemObjects.SDK.Server' was resolved to 'C:\Program Files (x86)\RemObjects Software\RemObjects SDK for .NET\Bin\RemObjects.SDK.Server.dll' via 'HintPath' for target 'Echoes'.
            Reference 'RemObjects.SDK.ZLib' was resolved to 'C:\Program Files (x86)\RemObjects Software\Data Abstract for .NET\Bin\RemObjects.SDK.ZLib.dll' via 'HintPath' for target 'Echoes'.
            Reference 'System' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.dll' for target 'Echoes'.
            Reference 'System.Data' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Data.dll' for target 'Echoes'.
            Reference 'System.Runtime.Serialization' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Runtime.Serialization.dll' for target 'Echoes'.
            Reference 'System.Security' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Security.dll' for target 'Echoes'.
            Reference 'System.Xml' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Xml.dll' for target 'Echoes'.
            Reference 'System.Core' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Core.dll' for target 'Echoes'.
            Reference 'System.Xml.Linq' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Xml.Linq.dll' for target 'Echoes'.
            Reference 'System.Data.DataSetExtensions' was resolved to 'C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5.1\System.Data.DataSetExtensions.dll' for target 'Echoes'.
            Project for reference '..\HDSMDB.Service\HDSMDB.Service.elements' was not found in the solution.
            Project Reference '..\HDSMDB.Service\HDSMDB.Service.elements' was resolved to 'C:\SVN\Home\HD-SMDB\HDSMDB.Service\bin\Release\HDSMDB.Service.dll' via 'HintPath' for target 'Echoes'.
         <- Task RemObjects.EBuild.Elements.ElementsResolveEchoesReferencesForTarget finished, Echoes, took 0,0180s (0,0180s).
      <- Target Echoes finished.
   <- Task RemObjects.EBuild.Elements.ElementsResolveReferences finished, took 0,0200s (0,0200s).

(Birger Buhl Dinesen) #18

Hi Marc,

As you see from my previous post, when I press the References node in the project tree (in Water), it writes that it cannot find the project in the solution.
This is different from when you build in Fire, if I look at your log.
Should it not work like in Fire?

So it uses the hint path which is fine, except it is hard coded to either the debug or build path.


(marc hoffman) #19

Is this one still relevant? if so:

it should be the same; yes. it looks like not can’t see the project at all. Can I see (a) the full build log (the top lists all projects) and also see what the <ProjectReference now looks like?


(Birger Buhl Dinesen) #20

Maybe this has already been solved. Let me just check it…