多项目的NuGet问题 [英] Multi-Project Nuget Issues

查看:81
本文介绍了多项目的NuGet问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个多项目ASP.NET 4.0 Web窗体的解决方案。最初,我创建了一个项目包,包括静态文件:师傅,CSS,图像等

I have a multi-project ASP.NET 4.0 Web Forms solution. Initially I created a project package consisting of static files: master, css, images, etc.

因为我已经升级到1.4的NuGet援用一个解决方案项目(这样我就不必手动更新每个项目)的。我打算卸载现有的项目包,然后创建和安装包含相同的通用文件的解决方案包。

I have since upgraded to Nuget 1.4 to avail of a solution project (so I don't have to manually update each project). I planned to uninstall existing project package, then create and install a solution package containing the same common files.

运行卸载封装MyProjectPackage后,我注意到,还有在我的项目的NuGet相关的文件。例如:

After running Uninstall-Package MyProjectPackage, I noticed that there are still Nuget-related files in my projects. For example:



Packages.dgml

MyProjectPackage.1.1.nuspec

MyProjectPackage.1.2.nupkg

packages.config
Packages.dgml
MyProjectPackage.1.1.nuspec
MyProjectPackage.1.2.nupkg

MyProjectPackage.nuspec

MyProjectPackage.nuspec

问题:


  1. 他们是灰色的,如他们没有在解决方案包括
    了,但这些文件仍然在项目文件夹。应该
    他们没有被全切除?

  1. They are greyed-out like they are not included in the solution anymore, but these files are still in the project folders. Should they not have been totally removed?

我已经创建使用GUI一个新包。什么是安装此为解决方案的正确方法是什么?

I have created a new package using the GUI. What is the correct way to install this for the solution?

我如何添加的NuGet到我的路径? (获得术语的NuGet'无法识别...在命令行)

How do I add NuGet to my path? (getting "The term 'nuget' is not recognized..." on command line)

更新2011年8月24日:

我创建了一个新的解决方案包,并通过包管理器设置添加它。不幸的是,当我安装它,它不被压出到子项目。不能得到这个工作了。

I created a new solution package and added it via the Package Manager Settings. Unfortunately, when I install it, it is not being pushed out to sub-project. Cannot get this to work.

更新2011年8月25日:

在努力缩小这个下来,当我试图在解决方案级别管理已安装包,我不能去选择项目图形用户界面,因为没有管理按钮,只有卸载按钮,在MyProject.sln - 管理的NuGet包。对话框

In an effort to narrow this down, when I try to Manage Installed Package at the solution level, I cannot get to the "Select Projects GUI" because there is no "Manage" button, only an "Uninstall" button, in the 'MyProject.sln - Manage NuGet Packages' dialog.

包装内容(为简便起见基本结构):

Package Contents (basic structure for brevity):

控件(文件夹)

- Footer.ascx

- Footer.ascx.cs

- Footer.ascx.designer.cs

controls (Folder)
- Footer.ascx
- Footer.ascx.cs
- Footer.ascx.designer.cs

图像(文件夹)

- footer.jpg

images (Folder)
- footer.jpg

大师(文件夹)

-
- Site.Master.cs

- Site.Master.designer.cs

masters (Folder)
- Site.Master
- Site.Master.cs
- Site.Master.designer.cs

样式(文件夹)

- style.css文件

style (Folder)
- style.css

推荐答案

根据您所拥有的结构,你需要把一切都放在一个内容/为它应用到项目中。

Based on the structure you have, you need to put everything in a content/ for it to apply to a project.

点击此处了解详情:
<一href=\"http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#From_a_convention_based_working_directory\" rel=\"nofollow\">http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package#From_a_convention_based_working_directory

这篇关于多项目的NuGet问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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