如何在.NET Core库中将文件添加为链接?

编程入门 行业动态 更新时间:2024-10-24 15:14:45
本文介绍了如何在.NET Core库中将文件添加为链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我已经在解决方案中添加了.NET Core RC2类库(出于娱乐目的),通常我要做的第一件事是添加指向共享的 GlobalAssemblyInfo.cs 并编辑现有的 AssemblyInfo.cs 到程序集详细信息。

I've added a .NET Core RC2 class lib to my solution (for fun) and the first thing I usually do is add a link to a shared GlobalAssemblyInfo.cs and edit the existing AssemblyInfo.cs down to the assembly specifics.

所以我刚刚完成了添加->现有项目,找到了我的文件,然后点击了添加按钮的下拉菜单。没有添加为链接选项。

So I've just done "Add"->"existing item", located my file and clicked the dropdown of the add button. No "Add as Link" option.

这是怎么回事?我该如何使用.NET Core?

What's the deal? How do I do this with .NET Core?

推荐答案

我认为该工具尚不支持此功能,不幸的是,文档尚未更新。

I don’t think the tooling supports this yet, and unfortunately, the documentation is not up to date on this yet.

但是,您可以从ASP.NET Core公告。基本上,您可以在 project.json 的 buildOptionspile.includeFiles 设置中添加单个文件路径:

However, you can get an idea on how this works from this ASP.NET Core announcement. Basically, you can add individual file paths to the buildOptionspile.includeFiles setting in your project.json:

{ "buildOptions": { // … "compile": { // … "includeFiles": [ // … "../shared/GlobalAssemblyInfo.cs" ] } } }

更多推荐

如何在.NET Core库中将文件添加为链接?

本文发布于:2023-11-15 23:55:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1599109.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:库中   链接   文件   如何在   Core

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!