I'm taking a VB.Net DLL and turning it into a Portable Class Library. Once I got all of the classes moved into the new project for the PCL, Visual Studio started throwing errors for a lot of common VB syntax that I thought would still work just fine. Some examples:
Is it possible there is just some option or include I need to have to get these to work?
When using portable to target the down-level platforms (.NET 4.0, Silverlight, Windows Phone, Xbox), we do not support the majority of the features that are exposed within Microsoft.VisualBasic.dll.
Instead, we make use of the embedded runtime feature. This embeds certain functionality that would traditionally be found in Microsoft.VisualBasic.dll, into the resulting binary itself. The features that are supported are called out on this page, under the /vbruntime* section: http://msdn.microsoft.com/en-us/library/bb531259.aspx.
When targeting .NET 4.5 & Windows Store apps only, then you do get access to the traditional Microsoft.VisualBasic.dll.
As a workaround, to help you move to portable, you can define your own module that bridges the old VB functions to their .NET equivalents:
Public Module VisualBasicBridge
Public Function LCase(value As String) As String
Return value.ToLower()
End Function
End Module
As far as On Error, I'm not aware of a good way to bridging that without providing your own implementation of Microsoft.VisualBasic, and passing that via the /vbruntime switch/msbuild property.