How to compile a C # file outside of App_Code?

I would like to stick to a class in a folder hierarchy. The script is too trivial to guarantee your own project or a separate website. However, I hate to prevent my top-level App_Code from being used by the tiny corner of the site.

Is there a way in web.config to include another file or folder in the compilation process?

+3
source share
2 answers
<configuration>
   <system.web>
      <compilation>
         <assemblies>
            <add assembly="<AssemblyName>, Version=<Version>, Culture=<Culture>, PublicKeyToken=<PublicKeyToken>"/>
         </assemblies>
      </compilation>
   </system.web>
</configuration>
0
source

It looks like you are using the type of project "Website". You might want to switch to the Web Application project type, which is more like a traditional project that allows you to have a much more flexible folder structure (the code can go anywhere, and App_Code is not a special folder).

"" / "" - -:

http://forums.asp.net/p/1233004/2232697.aspx#2232697

+1

Source: https://habr.com/ru/post/1698907/


All Articles