Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
向 App_Code 添加两个语言代码文件,即 C# 和 VB.NET 时,出现错误
The files ... file names ... use a different language, which is not allowed since they need to be compiled together.
有没有办法添加两个不同的语言文件?
创建子文件夹并将所有 VB 代码放在一个文件夹中,将 C# 放在另一个文件夹中。在您的情况下,您将有一个用于 C#,另一个用于 VB
您需要修改编译元素下的 web.config 以包含这些,以便编译器知道将它们包含在编译中
<codeSubDirectories> <add directoryName="MyVBCode"/> <add directoryName="MyCSharpCode"/> </codeSubDirectories>