Search code examples
c#.net.net-3.5.net-assemblyapp-code

Getting rid of Assembly with TagPrefix in .NET 3.5


I had to change my .NET 3.5 web site to a web project, so I needed to remove the App_Code folder but found that I still have these:

<%@ Register Assembly="App_Code" Namespace="MyNamespace" TagPrefix="pf" %>

What's the simplest way to get rid of this? I tried renaming the assembly to the projectName.dll but that crashes.

Any ideas?


Solution

  • You might use this:

    <%@ Register Assembly="YourAssemblyName" Namespace="YourNewNamespace" TagPrefix="pf" %>
    

    Regarding a Web Application Microsoft says:

    All code-behind class files and stand-alone class files in the project are compiled into a single assembly, which is placed in the Bin folder. Because this is a single assembly, you can specify attributes such as assembly name and version, as well as the location of the output assembly.

    So now you should have a unique assembly.