-
Notifications
You must be signed in to change notification settings - Fork 525
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
convert-from-nuget should create .targets for importing nuget binaries #197
Comments
A little formatting helped me understand what you were getting at! Sounds like a good idea to me! 👍 |
👍 I second that. I think it's a really great idea and it gives real advantages:
|
This change does sound nice, but it has me worried. I know I've had to modify .*proj files manually, but I can't think of a single example right now. |
we still would not touch any manual installations. It's not in this sample, but paket adds marker sub-nodes to indicate "I was installed by paket". If Paket finds nodes to a dll without the marker we skip it.
Very good point. I'd like to hear others about that. (related: there are people who think it's not a good idea to use nuget for js libs - #199. Please don't discuss the general issue here. Just interested in where to put content installations) |
It is possible to use a Condition attribute on the import. This would be possible to discover Paket's imports then:
|
If we use paket.targets as file names then this should be enough |
Good idea Pierre, I told something similar to Steffen a couple of days ago, but it's way better to open an issue with samples :-) |
I really like this idea of using |
@ilkerde what do you think about this? |
there are still open questions: During installation we would add <Import Project="..." If we update the targets file (new version installed or something like that) we create no change in the proj file. VS will not reload. |
Just add a
This will allow Visual Studio to load the project if the file is missing. |
sounds good. |
@forki I'm really thinking hard about it. I also try to do this by hand, but it doesn't seem to work. I have VS2013 and a simple sln/csproj, tried to externalize a package reference as @pchalamet describes, but VS doesn't seem to recognize the ref at all. Any hints on how to get a working sample? |
No sorry. I didn't look into this very deeply.
|
I'll try to get a working sample, but all my efforts so far (VS2013 + VS2012 with simple sln/csproj referencing our beloved Newtonsoft.Json) failed. @pchalamet Maybe you can provide us with a working sample? |
I have a hackish patch sitting there: https://github.com/pchalamet/Paket/tree/targets for a csproj referencing Rx:
And Rx-Core's Paket.targets:
|
Btw, I failed to make it work for Moq package (work for other packages) - that is why I've not attempt a PR (and some clean up has to be done anyway). My test project is https://github.com/pchalamet/cassandra-sharp (have to keep only net45 solution and add MinimumVSver otherwise Paket badly breaks). |
Can you please elaborate on the "breaking badly" part? (insert animated gif of Walter White here) AlexAlexander Groß On Sun, Oct 12, 2014 at 2:45 PM, Pierre Chalamet notifications@github.com
|
SolutionFile::AddPaketFolder() requires MinimumVisualStudioVersion. |
|
Close this?
|
Probably. I've not rebased since few days. I will try to rebuild the patch for *.targets. |
I won't try to patch Paket anymore as I have implemented my own package manager; I'm now able to reference packages as targets files. Much better indeed. |
:( I've really been looking forward to this feature. It is one that I've marked as required for us to upgrade from |
Extended init script to manage git repo
convert-from-nuget (as of 0.4.9.0) converts nuget binary references to a bunch of
<When>/<Reference>
.This is pretty bad imho:
Well, something like that in a project referencing Rx would then be modified as follow:
and a generated file for Rx-Core could be (sitting inside packages\pkg-name\Paket.targets):
The text was updated successfully, but these errors were encountered: