Locked Some WebService Class icons are missing...

  • Monday, March 12, 2012 8:38 AM
     
     

    Hello,

    How can i fix WebService Class icons in VS?

    I had converted some classes to webservice in my project but class icon didnt change... if i create new webservice by using "add new item" on the right click menu, webservice icon looks well...

    is there any way to change icons of the webservice classes?

    screenshot is below:

    http://i.imgur.com/JofJD.png


    • Edited by Ogun Isik Monday, March 12, 2012 9:39 AM
    •  

All Replies

  • Wednesday, March 14, 2012 6:15 AM
    Moderator
     
     Answered

    Hi Ogun,
    I cannot reproduce this issue, I create a new class name class1, can converted it to web service , and then its icons are changed. It is same as by using “add new item”.
    You can refer to the following photo:
    https://skydrive.live.com/#cid=475F7E3EBE2EEF90&id=475F7E3EBE2EEF90%21163
    The following steps are what I have done:
    1. create a web application;
    2. add class named class1 to this project;
    3. renamed the class1.cs to class1.asmx.cs; and the code is:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;

    namespace WebApplication2
    {
        public class Class1 : System.Web.Services.WebService
        {
        }
    }
    4. then create a new file named class1.asmx; and the code is :
    <%@ WebService Language="C#" CodeBehind="Class1.asmx.cs" Class="WebApplication2.Class1" %>
    5. include the class1.asmx file to this web project, now you will see the icon has changed.

    So I suggest you to restart your VS and create a new project to try.
    And you also can try the following common workarounds:
    1. If we reboot the operating system to safe mode, do we have the problem? This can help to isolate whether any other applications are interfering with Visual Studio. Note that some features (like IIS) are not available under safe mode. Please check whether this can apply or not. In addition to safe mode, we can also suggest “clean boot”: http://support.microsoft.com/kb/310353.
    2. If we create a new user account, do we have the problem? This can help to isolate user profile corruption related causes.
    3. If we disable Add-ins (e.g. “Tools” | “Add-in Manager”) and run “devenv.exe /safemode”, do we still have the problem? This can eliminate the possibility that third party Add-ins are causing problems.
    4. If we use “devenv.exe /resetsettings”, does it solve the problem? It restores Visual Studio default settings.
    5. If the problem remains, we can use Visual Studio Setup Wizard (via Control Panel) to repair Visual Studio. It can restore the Visual Studio Installation into its original state.


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us

  • Monday, March 19, 2012 7:43 AM
    Moderator
     
     

    Hi Ogun,

    I temporary make my last reply as answer. You can unmark it if they provide no help.

    Thank you for your understanding!


    Lucy Liu [MSFT]
    MSDN Community Support | Feedback to us