Project 'MDFTextAccessibility' has the same Project ID as project 'MDFTextAccessibility'

I have a repo with all my framework import. Some of the projects reference other projects in the solution. For example MaterialComponentsBeta references MaterialComponents.
When I try and build the solution I get these errors

E: Project ‘MDFTextAccessibility’ has the same Project ID as project ‘MDFTextAccessibility’. [/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Packages/EBuild/]
E: Project ‘MaterialComponents’ has the same Project ID as project ‘MaterialComponents’. [/Users/JohnMoshakis/Library/Application Support/RemObjects Software/EBuild/Packages/EBuild/]

I also noticed that the projects raising the error appear twice in the build order

Build order:

    1. AppAuth
    1. BEMCheckBox
    1. MDFTextAccessibility
    1. MDFTextAccessibility
    1. MaterialComponents
    1. MaterialComponents
    1. MaterialComponentsBeta
    1. PureLayout
    1. Realm

I changed the project references to RemoteProjectReferences, is that ok ? Or would it be better to stick with a local references.

Other actual projects that reference the individual framework don’t seem to have this build issue but ImportSolution does.



Most likely reason is thtya you actually have two copies of these projects in the solution. Aside form the errors, do you get any “project ID does not match” warnings or the like?

If that’s not the case, I’d appreicate a concrete test case that show this that I an investigate.

I don’t think I have 2 projects in the solution. The test case is the the repo in the post, I can zip it up and attach it to the thread ?

I get

/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono /Users/mh/Code/Elements/Bin/EBuild.exe /Users/mh/Code/Others/ImportSolution/ImportSolution.sln --logger:fire --configuration:Debug --skip-projects:{3CBB9015-B228-4165-9591-5F0CF4716D8F} --setting:3EA6B98C-332B-4242-99F0-1CCED696AE02,Simulator=False --setting:3EA6B98C-332B-4242-99F0-1CCED696AE02,Device=True --setting:F3D42005-1938-4410-BF2D-A7C7C21DE5DE,Simulator=False --setting:F3D42005-1938-4410-BF2D-A7C7C21DE5DE,Device=True --setting:E5AC4600-2135-4E8C-B629-A24D503DE2F9,Simulator=False --setting:E5AC4600-2135-4E8C-B629-A24D503DE2F9,Device=True --setting:27BBBD62-B2EF-4D57-B82A-DFEFCE99D967,Simulator=False --setting:27BBBD62-B2EF-4D57-B82A-DFEFCE99D967,Device=True --setting:B97E5BB2-965F-468F-9C3D-3F1F52C0E90E,Simulator=False --setting:B97E5BB2-965F-468F-9C3D-3F1F52C0E90E,Device=True --setting:3F70B500-83BE-4A5E-99B5-EC9FFDB343C8,Simulator=False --setting:3F70B500-83BE-4A5E-99B5-EC9FFDB343C8,Device=True --debug --statistics --verbosity:diagnostic --xml:/var/folders/55/b23q1f4n7pl7mcbc70d00bwm0000gn/T/ --build --setting:TreatFixableErrorsAsWarnings=True
RemObjects EBuild. An open source build engine for Elements and beyond.
Copyright RemObjects Software 2016-2019. All Rights Reserved. Created by marc hoffman.
Version (develop) built on talax, 20190923-141247. Commit 0205cbc.

   Pulling to /Users/mh/Library/Application Support/RemObjects Software/EBuild/Packages/EBuild/
   > git: error: pathspec 'master' did not match any file(s) known to git
E: Invalid package '*' referenced from 'MaterialComponents': project at '' does not exist.

Ok, that seems to have been a one-time fluke, reproached now, will investigate.

   Build order:
   - 1. AppAuth
   - 2. BEMCheckBox
   - 3. MDFTextAccessibility
   - 4. MDFTextAccessibility
   - 5. MaterialComponents
   - 6. MaterialComponentsBeta
   - 7. PureLayout
   - 8. Realm

Actually, this kinda makes perfect sense. You already have MDFTextAccessibility in the solution, as a plain, local project. Then MaterialComponents pulls it in as remote package reference, which fetches and clones the repository elsewhere and references the project from there. So now you have two copies of the sam e project, from different folders, in the solution.

Now, I can try and detect this and, if a remote project matches one already in the solution, discard the new clone and just reference the one that’s there. Which I will do now.

But I’d still argue that this is a misconfigured solution. Of the project you need top reference is part of the same repo and solution, you should not reference it as remote project reference, but as regular one…

Changed my mind; I;m making this an error.

E: Remote project '*' referenced from 'MaterialComponents' is already part of the solution as a different file.
   | Existing project is at   '/Users/mh/Code/Others/ImportSolution/MDFTextAccessibility.elements'.
   | New reference would be at /Users/mh/Library/Application Support/RemObjects Software/EBuild/Packages/EBuild/'.

Unrelated, I fixed a separate (and maybe your original) issue where when two projects in a .sln pulled in the same remote project reference, it would also add a dupe and fail. That part should now be handled correctly (both check-outs will end up using the same clone, so it becomes a single new project in the solution).

20190926-204618-elements-develop has that fix.

1 Like