views:

399

answers:

1

I've got a Website project in VS.NET 2008. I have a class in App_Code folder

namespace RM{
    public class MyClass{
        ...
    }
}

I need to know what assembly this will compile to? You'd think it should be RM.dll but doesn't look like it.

I know that it's better to use WebApplication project instead, but it's not an option at this time.

+6  A: 

No, it won't be RM.dll. If your website is not precompiled, then you won't know the name beforehand. It will be a name like this:

App_Web_t70fesfi.dll

You can determine this at runtime from with:

typeof(MyClass).Assembly.GetName()

Or, if you really need to know in advance, you can put this in an external class library that the web project references.

David M
thanx, external class library is the way to go then !
roman m
one more question, how to avoid circular reference if i rely on assemblied from my WEBSITE project, but I'd need to reference back to this class library from that same website?
roman m