Can not specify /main if building module or library (CS2017)

Ask general questions here.
Ashwin Kumar
Posts: 3
Joined: Tue Jan 27, 2015 10:38 am

Can not specify /main if building module or library (CS2017)

Post by Ashwin Kumar » Tue Jan 27, 2015 11:31 am

Hi,
I have created 2 projects in the solution and both projects I set to .dll in the Properties window. When I build the solution, I am getting error "Can not specify /main if building module or library (CS2017) ’

Ranorex version : 5.2
.net version : 4.0

Operation System:
Windows 7 SP1 (64 Bit)

Thanks,
Ashwin Kumar

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Can not specify /main if building module or library (CS2017)

Post by Support Team » Wed Jan 28, 2015 10:59 am

Hello Ashwin,

Please ensure that no "StartupObject" is set within your project if your output type is set to "Class Library".
StartupObject.png
Open your *.csproj file with a text editor and delete the entry within the <StartupObject></StartupObject>-Tag.

Regards,
Robert
You do not have the required permissions to view the files attached to this post.

Ashwin Kumar
Posts: 3
Joined: Tue Jan 27, 2015 10:38 am

Re: Can not specify /main if building module or library (CS2017)

Post by Ashwin Kumar » Fri Jan 30, 2015 4:08 am

Hi Robert,
As you mentioned in the below and I perfomed similar steps

Open your *.csproj file with a text editor and delete the entry within the <StartupObject></StartupObject>-Tag when output type is set to "Class Library".

But while building the solution I am getting UTIL 10 errors like "The type or Namespace name 'Util' could not be found (CS0246)"

Thanks,
Ashwin Kumar

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Can not specify /main if building module or library (CS2017)

Post by Support Team » Tue Feb 03, 2015 10:48 am

Hi Ashwin Kumar,

This seems to be another issue. Please check in your class file if the using directive "using Util;" is available.
Usually this message means that this is missing.

Regards,
Bernhard