Page 1 of 1
Can not specify /main if building module or library (CS2017)
Posted: Tue Jan 27, 2015 11:31 am
by Ashwin Kumar
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
Re: Can not specify /main if building module or library (CS2017)
Posted: Wed Jan 28, 2015 10:59 am
by Support Team
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
Re: Can not specify /main if building module or library (CS2017)
Posted: Fri Jan 30, 2015 4:08 am
by Ashwin Kumar
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
Re: Can not specify /main if building module or library (CS2017)
Posted: Tue Feb 03, 2015 10:48 am
by Support Team
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