c# - Windows 10 通用平台 aoo 模块 CommonLanguageRuntimeLibrary 中的错误 :Cannot find type System. MarshalByRefObject

标签 c# asp.net xaml frameworks windows-10

您好,我正在开发此应用程序中的 Windows 通用平台应用程序 当我调试我的 windows 通用项目时发生错误这个错误自动出现所以有人建议我如何解决这个错误?

错误:- 在模块 CommonLanguageRuntimeLibrary 中找不到类型 System.MarshalByRefObject

所以建议我如何解决这个错误。

最佳答案

我在从 Windows 10 通用应用程序项目中删除 System.Drawing 引用时解决了这个错误。

在搜索 Ctrl+F 时,在解决方案中未找到所有关键字 system.drawling。因为此引用仅添加到项目中而未使用。所以检查项目文件 .csproj 找到它。并删除此引用。

 <ItemGroup>
    <Reference Include="DocumentFormat.OpenXml">
      <HintPath>..\JOIN8POS.Website\SharedDLL\DocumentFormat.OpenXml.dll</HintPath>
    </Reference>
    <Reference Include="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.6\System.Drawing.dll</HintPath>
    </Reference>
  </ItemGroup>

并保存 .csproj 文件并重新加载。

enter image description here

关于c# - Windows 10 通用平台 aoo 模块 CommonLanguageRuntimeLibrary 中的错误 :Cannot find type System. MarshalByRefObject,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38409216/

相关文章:

c# - System.Web.Services.Protocols.SoapHeaderAttribute.Required 已过时 我现在应该使用什么?

c# - 嵌套中继器

asp.net - 将值列表放入 ASP.Net MVC 中的 View 模型中

c# - 使 AvalonEdit MVVM 兼容

c# - C#中嵌套SQL的理解

c# - 如何在 .net 2.0 目标下禁止 var 关键字?

ASP.net 4.0 母版页页脚 Div

c# - 如何使用 DatePicker 和 TextBox 将数据添加到 ObservableCollection

xaml - 按钮 Xamarin Forms 中的堆栈布局

c# - 在 WPF DataGrid 中单击编辑