Is it possible to add two language code files, for example, C # and VB.NET in App_Code? If so, how could I achieve this?

Error adding two language code files, i.e. C # and VB.NET in App_Code

 The files ... file names ... use a different language,  
 which is not allowed since they need to be compiled together.

Is there a way to add two different language files?

+3
source share
1 answer

Create auxiliary folders and put all your VB code in one folder and C # in another. In your case, you will have one for C # and another for VB

You will need to modify the web.config under the compilation element to include them so that the compiler knows to include them in the compilation

<codeSubDirectories>
   <add directoryName="MyVBCode"/>
   <add directoryName="MyCSharpCode"/>
</codeSubDirectories>
+9
source

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


All Articles