locked
asp.net app_code folder errors RRS feed

  • Question

  • Playing with an app_code folder in an asp.net project in Visual Studio 2015. Put in a myclass with a function to return a string, and successfully called it from a default.aspx.cs file, putting the string to a label so it showed on a web page.

    "Cool!" thought I.

    So I added a couple more functions that use System.Data.SqlClient. I copied these from the .cs pages of an old project.

    Now, when I have VS launch the web project, I get an error:

    CS0433: The type 'MyClass' exists in both 'App_Code.vmsqpowp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' and 'ChewChew, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

    Has VS compiled this into a dll or something that I have to delete somewhere. The main application is "ChewChew" (I did not pick the name)

    I even tried changing the class name, but I get the same error with the new class name.

    Monday, January 1, 2018 7:41 PM

All replies

  • see https://forums.asp.net/t/980517.aspx?The+type+class+exists+in+both+dll+location+and+dll+location+2+


    Visual C++ MVP

    Monday, January 1, 2018 9:39 PM
  • Hi Tom Ruby,

    Thank you for posting here.

    For your question is more related to ASP.NET, you could post a new thread in ASP.NET forum for suitable support.

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework, including Managed Extensibility Framework (MEF), Charting Controls, CardSpace, Windows Identity Foundation (WIF), Point of Sale (POS), Transactions. 

    Best Regards,

    Wendy


    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.

    Tuesday, January 2, 2018 8:19 AM