SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Microsoft.VisualBasic.ApplicationServices does not exist?

Last post 04-15-2007 12:15 PM by anger2headshot. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-15-2007 11:46 AM

    Microsoft.VisualBasic.ApplicationServices does not exist?

    using Microsoft.VisualBasic.ApplicationServices;

     I converted an app from VB.NET to C#, did a little tweaking and got greeted with this happy little error:

    The type or namespace name 'ApplicationServices' does not exist in the namespace 'Microsoft.VisualBasic' are you missing an assembly reference?

     

    I changed my timezone from +10 to -12 to save myself from the almighty wrath of Friday the 13th.
  • 04-15-2007 11:50 AM In reply to

    Re: Microsoft.VisualBasic.ApplicationServices does not exist?

    If this is in Program.cs: Visual Basic uses a bit of compiler magic to make Program.vb work. In C#, you'll have to write your own start-up method, the compiler won't generate any for you - you can delete the contents of Program.cs and replace it with a new C# class with a static void Main() that shows the main form (create a new C# project to see how it's done).

    If this is somewhere else in your program, you have two possibilities: remove the using statement and rewrite the code that depended on it; or add a reference to Microsoft.VisualBasic.dll to your C# project.

    Daniel Grunwald
  • 04-15-2007 12:15 PM In reply to

    Re: Microsoft.VisualBasic.ApplicationServices does not exist?

    I tried with using System; and tweaked some code in MainForm.cs and also MainFormDesigner.cs and now everything works perfectly :)
    I changed my timezone from +10 to -12 to save myself from the almighty wrath of Friday the 13th.
Page 1 of 1 (3 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.