如何将xproj(asp.net/dotnet核心项目)与shproj(共享项目)一起使用? [英] How can I use xproj (asp.net/dotnet core project) with shproj (shared project)?

查看:160
本文介绍了如何将xproj(asp.net/dotnet核心项目)与shproj(共享项目)一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以从.Net核心项目(.xproj)引用共享项目(.shrpoj)?

Is it possible to reference a Shared project (.shrpoj) from a .Net core project (.xproj)?

我看不到办法,但是我可能会丢失一些东西。

I can't see a way, but I could be missing something.

如果以下链接停止工作:

In case the link below stops working:

.net核心世界中的shproj的替代方法是在 buildOptions compile 部分 project.json 文件的c $ c>部分。

The alternative to shproj in .net core world is to add a compile section to the buildOptions section of the project.json file.

例如:

"buildOptions": {
 "compile": {
   "include": [
     "../../shared/**/*.cs"
   ]
 }
}


推荐答案

不支持。抱歉。您可以通过将代码文件包含在 project.json

It's not supported. Sorry. You can share the code though by including the code files in project.json

这是在项目中包括额外源文件的方式: https://github.com/aspnet/MusicStore/blob/c83fbdbf127b95d8505b6a55010eb129f23e6530/src/MusicStore/project.json#L7-L12

Here's how you include extra source files in a project: https://github.com/aspnet/MusicStore/blob/c83fbdbf127b95d8505b6a55010eb129f23e6530/src/MusicStore/project.json#L7-L12

这篇关于如何将xproj(asp.net/dotnet核心项目)与shproj(共享项目)一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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