微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

无法在JetBrains Rider中构建或运行我的.NET应用程序

如何解决无法在JetBrains Rider中构建或运行我的.NET应用程序

我正在Ubuntu 20.04.1上试用JetBrains Rider,并且刚刚从OneDrive中将.NET应用程序下载到了Linux机器中。当我打开JetBrains Rider时,无论何时我要运行或构建我的应用程序,都会出现以下错误

Done building project "InterviewTest.csproj" -- Failed.

Build Failed.

/usr/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2101,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly "System.Web.Entity". Check to make sure the assembly exists on disk. If this reference is required by your code,you may get compilation errors.
CSC : error CS0041: Unexpected error writing debug information -- 'Operation is not supported on this platform.'
    1 Warning(s)
    1 Error(s)

Time Elapsed 00:00:01.42

我以前曾尝试删除以下2个软件包:

  • Microsoft.CodeDom.Providers.DotNetCompilerPlatform
  • Microsoft.Net.Compilers

如该问题所示:CSC: error CS0041: Unexpected error writing debug information -- 'Operation is not supported on this platform.'

但是突出显示解决方案似乎对我不起作用。

更新:我刚刚意识到这个项目可能不是> NET Standard应用程序。该应用程序似乎可以在Windows上正常运行,但是根据Jetbrains网站的说法,我在Linux上运行该应用程序应该没有问题。

解决方法

如Lex所述,程序包System.Web.Entity不是.NET Standard兼容程序包。如果要运行它,则必须尝试通过以下方法针对Mono运行它:转到Rider> Preferences> Build,Execution,Deployment> Toolset and Build> Use MSBuild version并选择Mono运行时。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。