How to fix an error in .sln file regarding 2 Solution items

Best practices, code snippets for common functionality, examples, and guidelines.
User avatar
_KK_
Posts: 24
Joined: Tue Nov 21, 2017 12:51 pm

How to fix an error in .sln file regarding 2 Solution items

Post by _KK_ » Wed Jan 03, 2018 3:14 pm

Hi Forum,

using Rx 8.0.0

by error I added a dll into the Rx Project and the dll was placed in a second Solution Items area just below the Ranorex.rxsettings.

The Rx compilation works fine and hence I checked it into TFS.
There is a TFS Job which has as Trigger a Change of code and tries to compile the latest Rx sources, based on the .sln file.

The build Fails due to
..... The solution file has two projects named "Solution items". ---

I deleted the bad one in Rx, compile it with Rx and checked all in.
But still there is a compile error on TFS when using the .sln file (same error message).

Next step I stopped Rx, renamed the .sln and sln for 2010 and started again the Studio.
It has generated new files, checked them in. but the error is still occurring.

Pls. notice the attachment (renamed to .txt due to upload restrictions)

How to fix this?

Is it a good idea to Change manually the Content of the .sln to remove the wrong entries?

Thanks in advance for any help or hint.

BR

Klaus
Attachments
yyy - Kopie.sln.txt
Content of .sln file (used for compiling it with MSbuild.exe via TFS Job)
(1.48 KiB) Downloaded 9 times

McTurtle
Posts: 191
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: How to fix an error in .sln file regarding 2 Solution items

Post by McTurtle » Thu Jan 04, 2018 2:25 pm

Hello _KK_,

Have you already tried right-clicking on the "Solution Items" folder and removing it?
This should make another button visible which recreates the solution settings:
CreateSolutionSettings.png
CreateSolutionSettings.png (4.25 KiB) Viewed 382 times
You could try uploading without the solution settings first and then again when you have recreated them.

Regards,
McTurtle

User avatar
_KK_
Posts: 24
Joined: Tue Nov 21, 2017 12:51 pm

Re: How to fix an error in .sln file regarding 2 Solution items

Post by _KK_ » Mon Jan 08, 2018 9:01 am

Hi McTurtle,

thanks for the hint.

I have already solved the issue.
One reason was: when you start to add an item at the wrong entry Point (e.g. root, not within Solution Items), you will have two Folders with Solution Items.
MSbuild.exe will complain and do not compile.

Second reason was:
When deleting the "bad" Folder in Rx and doing a check-in to TFS, it can happen (in my case obviously) that TFS doesnt persist this Change (although the changeset tell about the Change).
When comparing the files it came out, that the locally Version of .sln did not have the double entry, but on the TFS they were still in.

With your hint now I a know a Little bit more about some "hidden" Buttons and how they can be made visible to fix (or new generate) something important.

BR

KK

McTurtle
Posts: 191
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: How to fix an error in .sln file regarding 2 Solution items

Post by McTurtle » Mon Jan 08, 2018 12:37 pm

Hello KK,

I'm glad to hear that you were able to resolve your issue.
I'm also glad to hear that my suggestion was not entirely useless ;)

Regards,
McTurtle