error CS0518: The predefined type 'System.Byte' is not defined or imported

  • Thread starter Thread starter Francisco García
  • Start date Start date
F

Francisco García

It gives the following error "error CS0518: The predefined type
'System.Byte' is not defined or imported", when I compile a custom control
in design time, with csc.exe
csc /noconfig /nostdlib /define:DESIGN /target:library ......
...........

if delete /nostdlib, appears the Error CS1595:
'System.Collections.ArrayList' is defined in multiple places

Thanks for help
 
Are you specifying /nodistlib option in the compliler,if yes then remove
it.Also check if you are linking to the right mscorelib.dll....if these
dosent help then i think you would need to reinstall the .net framework
sdk...

Regards
-Amit
 
That means mscorlib.dll was not found because desktop libraries are
disabled by /nostdlibs switch, but reference to alternative is not provided.
To fix it, add a reference to mscorlib.dll (and all CF libraries you're
using): -r:<PATH_TO_CF_LIBS>\mscorlib.dll …

Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
 
Back
Top