asp.net - 不能多次应用属性“TargetFrameworkAttribute”
问题描述
构建时在 .net Web 应用程序上出现错误。
\obj\Debug.NETFramework,Version=v4.7.2.AssemblyAttributes.vb(7,14):错误 BC30663:不能多次应用属性“TargetFrameworkAttribute”。
' <autogenerated/>
Option Strict Off
Option Explicit On
Imports System
Imports System.Reflection
<Assembly: Global.System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName:=".NET Framework 4.7.2")>
我已经搜索了解决方案,没有重复。我还删除了 bin 和 obj 文件夹并重新启动 - 这没有任何效果。
解决方案
进入 Visual Studio 项目的 AssemblyInfo 文件并注释掉重复属性的组装行。
要查看 AssemblyInfo 文件,可能需要在 Visual Studio 的解决方案资源管理器中启用“显示所有文件”选项。
对我来说,“ComVisible 属性是在 AssemblyInfo 文件和 Class 文件中指定的。在 AssemblyInfo 文件中将此属性注释掉后,此错误就消失了。
推荐阅读
- javascript - JavaScript 正则表达式两个字符串数字由 (:) 分隔的单个最大最小值计算
- javascript - 如何在 angularjs 中为事件广播找到 $on?
- html - 使用 BeautifulSoup 将 HTML 编码的 JSON 转换为 JSON
- oracle-sqldeveloper - 如何在 SQL 开发人员中调用存储过程,其中参数是带有回车的长字符串
- c# - 如何使用带有 at 命令的 GSM 调制解调器发送和读取 SMS
- javascript - 如何解决图片上传问题
- python - 当迭代次数增加时,Cupy 会变慢
- applescript - 如何将 Automator 中的多个变量作为文本传递/粘贴到 Google Chrome 中
- android - 如何避免默认选中BottomNavigationView集中的第一项
- javascript - 我的下拉菜单没有下拉(它出现在侧面)以及如何粘贴栏