dotnetcore和Framework 4.5之间的兼容性 [英] Compatibility between dotnetcore and framework 4.5

查看:296
本文介绍了dotnetcore和Framework 4.5之间的兼容性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在向现有解决方案中添加一个新的dotnetcore(RC2)项目,其中包含一组dotnet framewotk 4.5项目.

I'm adding a new dotnetcore (RC2) project to my existing solution which contains a set of dotnet framewotk 4.5 projects.

当我尝试在全新的dotnetcore项目中添加引用时,我收到一条消息,告诉我无法从针对框架4.5的项目中进行引用.

When I try to add a reference in my brand new dotnetcore project I get a message telling me that I can't do a reference from a project that targets framework 4.5.

不支持以下项目的引用:项目名称" 具有与当前目标不兼容的目标框架 项目项目名称"

The following projects are not supported references: "project name" has target frameworks that are incompatible with targets in current project "project name"

我关注了这个线程,但是我没有找到解决该问题的明确方法

I followed this thread but I didn't find any clear solution for the issue.

在这种情况下推荐的方法是什么?

what's the recommended approach for this situation?

推荐答案

用新的您还可以有2个单独的项目文件,构建相同的源文件,但是每个文件都针对不同的框架/目标(一个用于PCL,一个用于.NET fw).

You can also have 2 separated project files, building the same source files, but each one targeting a different frameworks/target (one for PCL, one for .NET fw).

在这里您可以逐步进行操作: https://oren.codes/2016/06/23/portable-is-dead-long-live-netstandard/

Here you have a step-by-step: https://oren.codes/2016/06/23/portable-is-dead-long-live-netstandard/

这篇关于dotnetcore和Framework 4.5之间的兼容性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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