9.0.1 - csproj now getting several new duplicate entries

Bug reports.
dhale
Posts: 34
Joined: Thu Feb 27, 2014 7:33 pm

9.0.1 - csproj now getting several new duplicate entries

Post by dhale » Tue Apr 23, 2019 10:07 pm

Anyone else seeing this kind of an issue?
Any ideas why the duplicate entries are being created?
Before 9.0.1 upgrade this is what my 8.3 csproj looked like:

<PropertyGroup>
<ProjectGuid>{07F903E1-8631-442C-B239-1FEDF5A27F2A}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<RootNamespace>Rx.RxCommon</RootNamespace>
<AssemblyName>Rx.RxCommon</AssemblyName>
<RanorexVersion>8.3</RanorexVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkProfile />
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<RanorexTargetsPath>$(MSBuildProgramFiles32)\MSBuild\Ranorex$(RanorexVersion)\Ranorex.MSBuild.Targets</RanorexTargetsPath>
</PropertyGroup>


After I upgraded to 9.0.1 several of my csproj files now contain the following, and its growing
<PropertyGroup>
<ProjectGuid>{07F903E1-8631-442C-B239-1FEDF5A27F2A}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputType>Library</OutputType>
<RootNamespace>Rx.RxCommon</RootNamespace>
<AssemblyName>Rx.RxCommon</AssemblyName>
<RanorexVersion>9.0</RanorexVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkProfile />
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<RANOREX_BIN_PATH Condition=" '$(RANOREX_BIN_PATH)' == '' ">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Ranorex\Studio', 'InstallDir', null, RegistryView.Registry64, RegistryView.Registry32))\Bin</RANOREX_BIN_PATH>
<RanorexTargetsPath>$(RANOREX_BIN_PATH)\Ranorex.MSBuild.Targets</RanorexTargetsPath>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
</PropertyGroup>

User avatar
RobinHood42
Posts: 294
Joined: Fri Jan 09, 2015 3:24 pm

Re: 9.0.1 - csproj now getting several new duplicate entries

Post by RobinHood42 » Wed Apr 24, 2019 12:12 pm

Did you already re-install (+re-boot) Ranorex? Sounds like an installation mess.

dhale
Posts: 34
Joined: Thu Feb 27, 2014 7:33 pm

Re: 9.0.1 - csproj now getting several new duplicate entries

Post by dhale » Wed Apr 24, 2019 4:30 pm

Reinstalled, rebooted and still having an issue.

When I clean, then build within Ranorex Studio, the entries are being added.
Subsequent Clean/Rebuild didn't add new entries until I shut down and restarted Ranorex studio.

After opening Ranorex studio again, selecting the sln from the "Recent solutions" area created one entry in one of the csproj files.
cleaning then caused the other two to get new entries.

So in a nutshell: Closing down Studio and reopening Studio followed by a clean and build continues to add new entries to the included csproj files.

I'll email Support and see what they have to say about whats going on.

Bytex
Posts: 8
Joined: Wed Mar 13, 2019 11:56 am

Re: 9.0.1 - csproj now getting several new duplicate entries

Post by Bytex » Thu Apr 25, 2019 12:54 pm

We had the same problem,... I try to remember what we did.

Open your solution and go to Build -> Set Platform -> ?
What platform is set for the solution.

We have x86 and when I remeber correct and you have the same platform set, then:
1) Make a backup copy of your csproj
2) Delete every <Platform Condition=" '$(Platform)' == '' ">x86</Platform> in you csproj.
3) Instead of the first: <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> with the AnyCPU, set this one to <Platform Condition=" '$(Platform)' == '' ">x86</Platform>

Your file should look then like this:

<PropertyGroup>
<ProjectGuid>{07F903E1-8631-442C-B239-1FEDF5A27F2A}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<OutputType>Library</OutputType>
<RootNamespace>Rx.RxCommon</RootNamespace>
<AssemblyName>Rx.RxCommon</AssemblyName>
<RanorexVersion>9.0</RanorexVersion>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkProfile />
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<RANOREX_BIN_PATH Condition=" '$(RANOREX_BIN_PATH)' == '' ">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Ranorex\Studio', 'InstallDir', null, RegistryView.Registry64, RegistryView.Registry32))\Bin</RANOREX_BIN_PATH>
<RanorexTargetsPath>$(RANOREX_BIN_PATH)\Ranorex.MSBuild.Targets</RanorexTargetsPath>
</PropertyGroup>



I hope that I remembered correct that having two platforms in the csproj was the problem, then this will solve your little mess with the growing csproj :)

dhale
Posts: 34
Joined: Thu Feb 27, 2014 7:33 pm

Re: 9.0.1 - csproj now getting several new duplicate entries

Post by dhale » Thu Apr 25, 2019 8:32 pm

Thanks for the info, I'll take a peek at it and see if it works.
Support did confirm this as a known issue that will be patched in a future release.

Bytex
Posts: 8
Joined: Wed Mar 13, 2019 11:56 am

Re: 9.0.1 - csproj now getting several new duplicate entries

Post by Bytex » Fri May 10, 2019 12:20 pm

dhale wrote:
Thu Apr 25, 2019 8:32 pm
Thanks for the info, I'll take a peek at it and see if it works.
Support did confirm this as a known issue that will be patched in a future release.
You are welcome, I hope it worked for you too!
Would be nice if you can confirm this workaround helped or mention that it didn't worked for you, whatever the case is.
It helps other users, if you confirm this worked for you too, so they can relate to this workaround if they encounter the same problem.