none
Why does Visual Studio automatically assign an index to name of WCF website RRS feed

  • Question

  • I created a WCF website called ProductsServices in WCF.  Then I deleted the website from my solution and also delete the project in File Explorer.  When I re-create the project, using the same name, it changes the name to ProductsServices(1).  Can anyone tell me why this happens?  
    Saturday, November 25, 2017 4:02 PM

Answers

  • Hi joeprog2,

    What is your VS version? I made a test with VS 2017, and I fail to reproduce your issue.

    As my research, it seems to be related with .vs\config\applicationhost.config file.

    I suggest you check .vs\config\applicationhost.config in your solution folder, and check whether there is ProductsServices already exist.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by joeprog2 Monday, November 27, 2017 2:26 AM
    • Unmarked as answer by joeprog2 Monday, November 27, 2017 2:26 AM
    • Marked as answer by joeprog2 Monday, November 27, 2017 6:37 AM
    Monday, November 27, 2017 1:44 AM

All replies

  • ProductServices folder having solution (sln) file might have been saved in another location like MyDocuments or some other folder. So when you created new Project as same name was already there, ProductServices(1) was created. 

    Gaurav Khanna | Microsoft MVP | Microsoft Community Contributor

    Saturday, November 25, 2017 5:36 PM
  • Thanks for your prompt reply.  When I create the project, I am adding it to an existing solution.  Therefore, this issue does not appear to related to the solution.  I did notice that in the directory "C:\Users\RichardsWorkstation\AppData\Local\Microsoft\WebsiteCache" that there was a ProductsService directory and also now a ProductsService(1) directory.  I deleted both of them and re-created by project and now the new web site in Visual Studio is called ProductsService(2).
    Saturday, November 25, 2017 8:50 PM
  • It probably has something to do with IIS Express, since it's a file based Web server. You could search the HD for files and file content for the name.
    Sunday, November 26, 2017 1:00 AM
  • Thanks for your comment.  I did a hard disk search as explained above an found only the two mentioned directories which I deleted.  This did not solve the problem.
    Sunday, November 26, 2017 1:33 AM
  • Content means that you searched looking at the content in a file.
    Sunday, November 26, 2017 2:21 AM
  • From the DOS C:\ prompt I executed the following command:

    Dir ProductsService(*.* /s

    and got the result described above.

    I also did a content search on "ProductsService(1)" in all files and found nothing.

    Sunday, November 26, 2017 3:41 AM
  • ProductsService

    The above is what you should  be looking for.  Maybe you did it on index files on a search that doesn't cover all files 

    Sunday, November 26, 2017 4:17 PM
  • Hi joeprog2,

    What is your VS version? I made a test with VS 2017, and I fail to reproduce your issue.

    As my research, it seems to be related with .vs\config\applicationhost.config file.

    I suggest you check .vs\config\applicationhost.config in your solution folder, and check whether there is ProductsServices already exist.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by joeprog2 Monday, November 27, 2017 2:26 AM
    • Unmarked as answer by joeprog2 Monday, November 27, 2017 2:26 AM
    • Marked as answer by joeprog2 Monday, November 27, 2017 6:37 AM
    Monday, November 27, 2017 1:44 AM
  • The appllicationhost.configd did indeed contain a listing for ProductsService(1) so that is the problem.  I don't know why you were unable to duplicate the problem, but at least it is now solved.  Maybe I needed to delete the reference to the web site first before deleting the web site or some other procedural issue.

    DA924x also gets some of the credit for solving this because he said that I might not have done a complete search thru all relevant file types.  He was right. I searched only in document files.  For those who are interested, here is a link that shows how to search in other files.

    Monday, November 27, 2017 2:34 AM
  • Hi joeprog,

    >>I don't know why you were unable to duplicate the problem, but at least it is now solved. 

    I assume it is related with VS version, I made a test with VS 2017.

    It seems your issue has been resolved, but I found you unmark the solution.

    Is there any other issue with current thread? If not, I would suggest you mark the solution to close current thread.

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, November 27, 2017 5:08 AM
  • Sorry, I thought I had marked this as resolved.  I did so now.
    Monday, November 27, 2017 6:38 AM