gpt4 book ai didi

c# - 如何创建共享代码项目 (.shproj)

转载 作者:IT王子 更新时间:2023-10-29 04:21:53 29 4
gpt4 key购买 nike

如何将 .shproj 添加到我的 Visual Studio 解决方案并从其他项目引用它?

Showing the Shared Project

我知道 Visual Studio 2013 Update 2 为“共享代码”添加了一个新的项目类型。这种类型的项目本身不产生dll。相反,共享项目中的文件作为源文件包含在引用它的程序集中。

我知道它存在,因为我在一个开源项目中看到过它。但是,在 Visual Studio 中查看项目模板时,我找不到“共享”项目类型。

最佳答案

编辑:根据Visual Studio 2015 Preview documentation , VS 2015 添加了共享项目的模板和管理引用的 UI,因此升级后不再需要以下内容。

似乎没有办法直接创建一个。目前看来,共享代码项目是在您创建通用应用程序项目时自动创建的 as shown in this introduction to creating a Universal App .

因此,要在您的解决方案中创建一个:添加一个新项目类型“Blank App (Universal App)”。删除它创建的 Windows 8 和 Windows Phone 项目,只留下共享项目。

关于c# - 如何创建共享代码项目 (.shproj),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24294608/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com