Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content support in 3.3 discussion #1523

Closed
yishaigalatzer opened this issue Oct 6, 2015 · 14 comments
Closed

Content support in 3.3 discussion #1523

yishaigalatzer opened this issue Oct 6, 2015 · 14 comments
Milestone

Comments

@yishaigalatzer
Copy link

The rational behind the design laid out in https://github.com/NuGet/Home/wiki/Bringing-back-content-support,-September-24th,-2015

Is that we want content to be immutable and not affect the projects to the extent possible. This prevents many of the drawbacks content had in the packages.config world, where projects are modified, and content files cannot be overridden safely.

We also don't want to break users that have built packages that rely on targets instead of content, and we want to enable source code scenarios, where today on C# (or a single language was supported) we will enable a "shared library" style package that will work happily in both visual basic, C# and eventually F# projects (once msbuild support for F# projects in available)

@yishaigalatzer yishaigalatzer added this to the Discussions milestone Oct 6, 2015
@shaynevanasperen
Copy link

There is issue #627 for this

@yishaigalatzer
Copy link
Author

This is a slightly different approach

@shaynevanasperen
Copy link

It's a broken link though. Can you please fix it? Also, it can't hurt to reference a related issue.

@yishaigalatzer
Copy link
Author

Fixed the link. Of course you can add extra ref

@dls314
Copy link

dls314 commented Dec 8, 2015

I'm also curious about any plans to add back support for not-immutable content (I can't seem to find a good issue discussing it). My broken example is the NLog.Config package.

@yishaigalatzer
Copy link
Author

We are actively looking into it. We don't have anything that gels enough just yet. We will post ideas once we have then. There is an issue but I can't find I from my phone at the moment

@xied75
Copy link

xied75 commented Jun 29, 2016

Is this related to the fact that currently the nuget.exe doesn't install any content or modify files to a VS project? If not anyone can show me which issue is the correct one? Thanks a lot.

BTW, should NuGet repos in whole have a Gitter room?

@harikmenon
Copy link

We have an open issue on enabling Gitter #2762. We are holding off on creating a room for a while given the challenges we mentioned in the issue, we are still open to starting in a gitter room down the line.

In the project.json world, NuGet does not add content or modify files in a VS project. NuGet 3.+ working on packages.config projects still can modify and add contents.

@xied75
Copy link

xied75 commented Jun 29, 2016

@harikmenon Thanks for the reply. I'll wait patiently then.

Regarding contents, I'm a bit confused. I just did a test with these:
Visual Studio Community 2015 Update 3,
Create an empty ASP.NET project, (by default targets 4.6.1, with packages.config, not using project.json)

Go to cmd and run (NuGet Version: 3.4.4.1321): nuget install nuget.server
this should fetch in other dependencies and add contents and modify web.config and packages.config, according to what you said, but nothing happened except a bunch of downloads.

@harikmenon
Copy link

You need to use the Package manager console or the VS UI to modify project files and such. nuget.exe is not meant to be used in that since. From our FAQ

https://docs.nuget.org/consume/nuget-faq

"Keep in mind that the focus of NuGet is to let you modify your projects and add references to Visual Studio projects. The command line tool, NuGet.exe, will download and unpack packages, but it won't automate Visual Studio and modify your project files. Within Visual Studio, there are two clients for NuGet: the PowerShell-based Package Manager Console and the Manage NuGet Packages dialog box. Both are wrappers around the NuGet API, which is written in managed code. NuGet.exe is also used to create and publish packages."

@xied75
Copy link

xied75 commented Jun 29, 2016

@harikmenon Got you. So this issue is not really meant to discuss about the nuget.exe right? Is there an issue for that? That people may still want this kind of function in the command line.

@harikmenon
Copy link

nuget.exe is not meant to be used for updating VS projects. nuget.exe is a lightweight command line utility and in-order for it to have knowledge about VS, it would require it to take a dependency on VS assemblies or the product which defeats the purpose for the tool. Also, packages,config is not something we are looking into investing going forward (supported: yes, new investments: probably not).

I couldn't find an existing issue for this (most probably was brought up before) at this time. We are not considering extending the support to modifying and adding content files using nuget.exe to VS projects due to the above reasons at this time.

@xied75
Copy link

xied75 commented Jun 30, 2016

Thanks once again. So what is the future solution for CI/CD, Automation, Scripting purpose? Say I got a Jenkins, I can git clone some repo, then trying to install some libraries into an existing VS project then build and push, all these should be handled by Jenkins, but we don't have a command line tool that can do this, and nuget.exe is not meant for it. Thus whoever use Windows should continue to mouse click click click to the next century...

Regarding taking dependency on VS dlls, I just remembered that Roslyn does understand VS solution/project, any chance we can design a MightyNuGet.exe that use Roslyn to achieve what the VS tooling currently can do?

@yishaigalatzer
Copy link
Author

@xied75 can you please take the discussion off this issue? It has diverged enough and it is just adding noise to this issue. I'll be glad to have this discussion with you on how to address your scenario. This is not the place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants