Possible to create classic C# Code?

Best practices, code snippets for common functionality, examples, and guidelines.
User avatar
Andymann
Posts: 43
Joined: Wed Jul 27, 2016 12:22 pm
Location: Hamburg
Contact:

Possible to create classic C# Code?

Post by Andymann » Wed Nov 21, 2018 12:17 pm

Hi everybody,

I just came across the need to build myself a little tool. This merely consists of a Winform with a textfield. I already built it within a Ranorex CodeModule. Thing is: I'd like to run it independently from Ranorex - just a simple *.exe.

Any chance of of using the Ranorex IDE (which, in my eyes, is 'just' a hyped up visual studio) to create a binary without Ranorex-Overhead?


Best regards,
Andy
Vorsprung durch Wahnsinn
www.Doktor-Andy.de

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4041
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Possible to create classic C# Code?

Post by odklizec » Wed Nov 21, 2018 1:12 pm

Hi,

I don't think there is a way to create a pure C# solution/project, without Ranorex references and other Ranorex-related files. Of course, you can add plain C# class file, but that's about it. It may be possible to delete all Ranorex-related files and references from the project? However, I think it would be much easier to install SharpDevelop (if you don't want to install and use full visual studio) for developing windows-based exes?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Andymann
Posts: 43
Joined: Wed Jul 27, 2016 12:22 pm
Location: Hamburg
Contact:

Re: Possible to create classic C# Code?

Post by Andymann » Wed Nov 21, 2018 1:19 pm

I already did my fair share of messing around (removing headers etc.) but wasn't successful. Sharpdevelop looks ... sharp ( I know, I know..) but my main problem is that I'm working with a very limited account (no downloads, no installations) and have to get around with what I have.

however, I just compiled my first *exe with notepad and csc .... it's not the funniest experience but it works.
Vorsprung durch Wahnsinn
www.Doktor-Andy.de

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4041
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Possible to create classic C# Code?

Post by odklizec » Thu Nov 22, 2018 12:18 pm

Hi,

It seems I just found a way to create (almost) pure C# project in Ranorex. I knew I did it in the past :)

Just add a new project to the solution of your choice, but then instead of selecting Module >> Ranorex test suite module library, select Advanced >> and then template you need...
C#project.png
C#project.png (5.49 KiB) Viewed 96 times
The project will still have referenced all Ranorex libs, but there will be no test suite, default recording or repository added to the newly created project. And if you run the project, it will just start the form or class, depending of your template selection. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration