在Linux中,用于框架".NETFramework,Version = v4.5"的参考程序集找不到 [英] In Linux , The reference assemblies for framework ".NETFramework,Version=v4.5" were not found

查看:385
本文介绍了在Linux中,用于框架".NETFramework,Version = v4.5"的参考程序集找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Visual Studio,可以在我的Ubuntu Machine中编译C#代码. 我将工作区/我的代码加载到了VS,可以看到以下错误.

I have made a setup of Visual studio to compile C# code in my Ubuntu Machine . I loaded the workspace/my code to VS and I could see the below error.

    The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend.

作为Visual Studio的初学者,请帮助我解决此问题.

Please help me on resolving this issue as am a beginner in Visual studio.

谢谢

推荐答案

如果项目繁重,您可以按照 此过程

If project is heavy, you can follow this procedure

如果您的项目是轻量级的,请使用VS创建一个新的.netcore项目,并将您的代码(和依赖项引用)移到该新项目中.然后让VS告诉您潜在的错误并进行纠正.

If your project is lightweight, create a new .netcore project using VS and move your code (and dependencies references)into that new project. then let VS telling you potential errors and correct them.

看一下过程,您可以首先在dotnet 4.6.2框架中重新定位实际项目,以确保在.NET Core无法支持的情况下,可以将API替代方法用于特定于.NET Framework的目标.特定的API."

Looking at the procedure, you can firstly retargeting your actual project in dotnet 4.6.2 framework in order to "ensures that you can use API alternatives for .NET Framework-specific targets in the cases where .NET Core can't support a particular API."

这篇关于在Linux中,用于框架".NETFramework,Version = v4.5"的参考程序集找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆