c#生成的代码是指从项目中删除的程序集

问题描述:

编译我的项目时出现以下消息。c#生成的代码是指从项目中删除的程序集

环境是Visual Studio中临2017 .Net框架4.6

Server Error in '/' Application. 

Compilation Error 

Description: An error occurred during the compilation of a resource required 
to service this request. Please review the following specific error details 
and modify your source code appropriately. 

Compiler Error Message: CS0234: The type or namespace name 'NAME' does not 
exist in the namespace 'FILE' (are you missing an assembly reference?) 

Source Error: 


Line 27:  using One.Assembly; 
Line 28:  using Two.Assembly; 
Line 29:  using NAME.FILE; 

Source File: C:\LocalDisk\tempFile.cs Line: 29 

据生成其是指已经从溶液中取出的组件“NAME.FILE”的临时文件。

让我描述的情景,AAA.dll取决于BBB.dll和BBB.dll取决于CCC.dll,你有BBB.dll,但你需要添加一个refrence到CCC.dll为好,而AAA .dll不需要直接引用CCC.dll,但您仍然需要它。

原来它是对web.config文件中文件的引用。