Upgrading Ranorex and VS2010 references

Ask general questions here.
User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Upgrading Ranorex and VS2010 references

Post by Aracknid » Mon Jul 04, 2011 7:11 pm

I've been using Ranorex 3.0.1 API with VS2010. I've got a solution in VS2010 which is made up of my framework DLL project (which consists of many modules/class, etc..) and this has various references to Ranorex DLL's. In my solution I also currently have only 2 console apps (the scripts that use the framework DLL).

When I shut down VS2010 and installed Ranorex 3.0.3 on the system, then started VS2010, all my references were messed up. I had to remove and re-add the Ranorex DLL's for every project in my solution and rebuild the solution. Is this typical when upgrading? Is there a smarter way to do this? I'm just thinking about the future when I'll have 100's or 1000's of console app projects in this solution and a newer version comes out...

Thanks,

Aracknid

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: Upgrading Ranorex and VS2010 references

Post by Aracknid » Tue Jul 05, 2011 3:11 pm

I also just wanted to add something, although it is not related to references but is related to upgrading.

When I installed 3.0.3 I noticed that the installer wanted to install some Microsoft Visual Studio runtime package (or something like this). I don't know if this was really necessary or not, since I believe it would have installed it when I did the 3.0.1 install, but regardless this seemed to blow away some of my Visual Studio settings. OK, I'm assumming this was what did it, unless there is something else that would mess with the VS2010 settings.

For example, I've set up Visual Studio to be optimized for Visual Basic programming. This means that F8 and Shift+F8 will step into or step over code when debugging. After the install, it reset it back to the default (so F11 key I believe). Also, some other settings were changed.

Not sure if it is possible, but if you could not install the Microsoft package if it is already installed and not required, or somehow tell it to leave my settings as is if it must be installed. I know that some Microsoft installers have no way of knowing if they are already on the system and just overwrite everything already there, even if they are the same.

Aracknid.

User avatar
sdaly
Posts: 238
Joined: Mon May 10, 2010 11:04 am
Location: Dundee, Scotland

Re: Upgrading Ranorex and VS2010 references

Post by sdaly » Tue Jul 05, 2011 4:15 pm

When you say messed up, what do you mean? We use SharpDevelop + Ranorex and never have any reference issues when upgrading... On each reference do you have "use specific version" set to false? If not, then try it!

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: Upgrading Ranorex and VS2010 references

Post by Aracknid » Tue Jul 05, 2011 4:35 pm

I don't see a place in the VS2010 environment were I can specify to NOT use a specific version.

Below (attached) is what I see for one of my projects in my solution right now (after I've fixed it). You can see it specifies the version of the Ranorex DLL and the location. Before upgrading, it was version 3.0.1.xxxx and in the same location. After upgrade, when I came in here to figure out why it wasn't working, the version either was 0.0.0.0 or the old version (I had different problems with different projects, cannot remember which). That's what I meant by messed up.
references.jpg
References screen in VS2010
references.jpg (74.86 KiB) Viewed 862 times
Anyway, I had to remove it and then add it back to resolve. Like I said, not such a big deal for my currently small solution, but eventually a big problem with a bigger solution.

Aracknid

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: Upgrading Ranorex and VS2010 references

Post by Aracknid » Tue Jul 05, 2011 4:40 pm

Ah, I did find it after all. I have to show the properties window while looking at these references, and it turns out that there is a "Specific Version" property and it was set to True. I changed it to false. I hope that's all there is to that. Thanks for the help.

Aracknid.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Upgrading Ranorex and VS2010 references

Post by Support Team » Tue Jul 05, 2011 5:49 pm

Aracknid wrote:Ah, I did find it after all. I have to show the properties window while looking at these references, and it turns out that there is a "Specific Version" property and it was set to True. I changed it to false.
This is not a Ranorex specific problem, but just the way Visual Studio handles references to different versions of assemblies. If you set the "Use Specific Version" property of a reference to "true", Visual Studio needs exactly that version of the assembly to be available when building. Settings that property to "false" will automatically use the most recent version of the assembly.
Aracknid wrote:When I installed 3.0.3 I noticed that the installer wanted to install some Microsoft Visual Studio runtime package (or something like this). I don't know if this was really necessary or not, since I believe it would have installed it when I did the 3.0.1 install, but regardless this seemed to blow away some of my Visual Studio settings.
The installer for the "Microsoft Visual C++ Runtime" does already check if it is already installed. However, Ranorex 3.0.3 uses a newer version of that runtime package than 3.0.1, since there were a few security fixes issued by Microsoft in the meantime. That's we it is installed again.
Aracknid wrote:but regardless this seemed to blow away some of my Visual Studio settings.
Hmmm, weird, no one else reported such an issue so far. And I really doubt that the "Microsoft Visual C++ Runtime" installer has anything to do with that, since despite its name that runtime package has nothing to do with Visual Studio itself, it only installs the DLLs required to execute C++ applications (into the Windows\WinSXS directory). However, one can never be sure with Microsoft installers, right? :wink:

Regards,
Alex
Ranorex Team
.
Image