2

I have a software product that calls vbc.exe directly to compile Silverlight code. This compilation of Silverlight VB.Net code has been working in Windows 2003/XP through Windows 2012/8 environments, except for one Windows 2003 SP2 (32-bit) environment where .Net Framework 3.5SP1 and 4.0 are installed.

The error is that System.String and System.Runtime.Serialization.DataContract are unknown types. Has anyone run into vbc.exe not being able to compile Silverlight VB.Net code where the error is that System.String is not recognized, and how did you resolve the issue?

Sam
  • 7,252
  • 16
  • 46
  • 65
Piv Chan
  • 21
  • 2
  • When types/classes in the .Net `code`System`code` namespace are not recognized as known types, chances are, you have at least one custom type defined with the same System namespace. NEVER use `code`System`code` as part of the namespace of any of your own types/classes. There may be ways to keep your compiler happy by fully qualifying certain types/classes, but you will not be happy with how messy your code ends up looking. In general, try avoiding words in your own namespaces that are already used by Microsoft in their namespaces. – Piv Chan Dec 28 '16 at 16:24

0 Answers0