none
Silverlight and Visual Studio 2015

    Question

  • I just converted a Visual Studio 2010 Silverlight Application running Silverlight 4 (plus toolkit) to Visual Studio 2015 running Silverlight 5 (plus toolkit).

    I am getting the following compile errors and can not make sense of it at all:

    Type 'Global.Microsoft.VisualBasic.Devices.Computer' is not defined.
    Type 'Global.Microsoft.VisualBasic.ApplicationServices.ApplicationBase' is not defined.
    Type 'Global.Microsoft.VisualBasic.MyServices.Internal.ContextValue' is not defined.
    Type 'Global.Microsoft.VisualBasic.ApplicationServices.User' is not defined.
    Type 'Global.System.ComponentModel.Design.HelpKeyword' is not defined.

    There is no line number or file given other than 'vbc' as the file name...

    Can someone please help me sort this out??

    All my best,

    Ron


    The Doctor is in... "There is a fine line between Saturday night and Sunday morning."

    Sunday, September 13, 2015 1:29 AM

Answers

  • Hi TheDoctor30306,

    Does the Silverlight application is a VB project?

    Please try to create a new Silverlight application with VS 2015 to troubleshoot if it is caused by the exception installation of VS or Silverlight.

    If the new blank Silverlight application has the same problem, please uninstall Silverlight and Silverlight SDK and re-install them.

    If the new blank Silverlight application works fine, please check your Silverlight application which converted from VS2010 Silverlight 4. Please unload the Silverlight application project, right-click it and choose Edit .vbproj. Look for the node <NoStdLib>true</NoStdLib> and after it, add <MyType>Empty</MyType>. This node is included with new Silverlight projects in VS2015. Then save and reload the project and the MyType flag will be included in the vbc command line, which will allow the Silverlight application to compile.

    Best Regards,
    Weiwei


    Monday, September 14, 2015 3:01 AM
    Moderator

All replies

  • Hi TheDoctor30306,

    Does the Silverlight application is a VB project?

    Please try to create a new Silverlight application with VS 2015 to troubleshoot if it is caused by the exception installation of VS or Silverlight.

    If the new blank Silverlight application has the same problem, please uninstall Silverlight and Silverlight SDK and re-install them.

    If the new blank Silverlight application works fine, please check your Silverlight application which converted from VS2010 Silverlight 4. Please unload the Silverlight application project, right-click it and choose Edit .vbproj. Look for the node <NoStdLib>true</NoStdLib> and after it, add <MyType>Empty</MyType>. This node is included with new Silverlight projects in VS2015. Then save and reload the project and the MyType flag will be included in the vbc command line, which will allow the Silverlight application to compile.

    Best Regards,
    Weiwei


    Monday, September 14, 2015 3:01 AM
    Moderator
  • The problem does occur with a new silverlight project as well (and yes it is VB.NET).  I will follow you instructions and report back.

    Thank you!


    The Doctor is in... &quot;There is a fine line between Saturday night and Sunday morning.&quot;

    Monday, September 14, 2015 1:57 PM
  • Weiwei, Thank you for the information. I had to add the <MyType> node for this to work. VS 2015 is not even creating a new silver light project correctly... All my best! The Doctor is in...

    The Doctor is in... &quot;There is a fine line between Saturday night and Sunday morning.&quot;

    Monday, September 21, 2015 3:01 PM
  • Hi TheDoctor30306,

    Does the Silverlight application is a VB project?

    Please try to create a new Silverlight application with VS 2015 to troubleshoot if it is caused by the exception installation of VS or Silverlight.

    If the new blank Silverlight application has the same problem, please uninstall Silverlight and Silverlight SDK and re-install them.

    If the new blank Silverlight application works fine, please check your Silverlight application which converted from VS2010 Silverlight 4. Please unload the Silverlight application project, right-click it and choose Edit .vbproj. Look for the node <NoStdLib>true</NoStdLib> and after it, add <MyType>Empty</MyType>. This node is included with new Silverlight projects in VS2015. Then save and reload the project and the MyType flag will be included in the vbc command line, which will allow the Silverlight application to compile.

    Best Regards,
    Weiwei


    Hi Guys

    Just to add my 2 cents...

    If you have a solution with multiple build configurations, you have to update this setting in each build configuration using the method described above. Otherwise - when you change build config, the errors will return.

    Cheers

    Rod.


    Mono / DotNet Rocks!

    Tuesday, September 22, 2015 7:53 AM
  • I have the same problem.  I found it works for me if you change your build configuration to debug.  I also have 2013 installed and it works from there so I just do the final release build from there.   I've installed clean windows 10 and visual studio 2015 with nothing else installed and it does the same thing.  Microsoft just isn't doing any basic testing before releasing their products.
    Thursday, January 25, 2018 8:48 PM