Skip to content

Making nuget install binaries to ${project}\libs#7

Open
mshafer1 wants to merge 1 commit into
haven1433:masterfrom
mshafer1:master
Open

Making nuget install binaries to ${project}\libs#7
mshafer1 wants to merge 1 commit into
haven1433:masterfrom
mshafer1:master

Conversation

@mshafer1

Copy link
Copy Markdown
Collaborator

Specifying the destination of the files on install so that a pre-build step can become something like:
$(ProjectDir)libs\AutoImplement
without any extra work.

@mshafer1 mshafer1 requested a review from haven1433 November 21, 2018 15:58
Specifying the destination of the exe file on install so that a pre-build step can become something like:
`$(ProjectDir)libs\AutoImplement`
without any extra work.

@haven1433 haven1433 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately, this is a breaking change... if this was submitted as part of 1.1.0, anyone who upgrades to 1.1.0 from 1.0.1 will no longer be able to find the DLL without changing their applications.

Breaking changes should wait until we're ready for version 2.0.0. So either this pull request needs to wait for that, or be closed and changed into an issue as a desired feature for version 2.0.0.

Comment thread AutoImplement.nuspec
</metadata>
<files>
<file src="artifacts\AutoImplement\bin\Release\AutoImplement.exe" target="" />
<file src="artifacts\AutoImplement\bin\Release\AutoImplement.exe" target="content\libs" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is content\libs the best possible place for this? I would think that content\tools might be more appropriate. Libs/lib is usually reserved for libraries that you want to reference (such as the nuget target="lib" used for System.Delegation). "Tools" is probably a better name for something called as a pre-build step that isn't actually referenced by the project.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only selected libs because that is the path that is currently suggested in the wiki. I agree that tools makes more sense.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. While updating the wiki, I went ahead and updated that path based on the current expected install scenario. I can update it again once this gets merged in.

@mshafer1

Copy link
Copy Markdown
Collaborator Author

Unfortunately, this is a breaking change... if this was submitted as part of 1.1.0, anyone who upgrades to 1.1.0 from 1.0.1 will no longer be able to find the DLL without changing their applications.

So, current behavior is installing the nuget puts the exe under the nuget root (which is typically under the users home directory, but can be customized even on a per solution basis), and the dll's that need to be depended on under lib (which causes them to be added to the project as resources).

I would not expect this to be a breaking change as people should not be installing a Nuget to a project, but then using a global (system) path to call the exe. (Albeit, it is different than the current behavior and I can understand waiting for 2.0 to accept the merge).

@haven1433

Copy link
Copy Markdown
Owner

So, current behavior is installing the nuget puts the exe under the nuget root (which is typically under the users home directory, but can be customized even on a per solution basis), and the dll's that need to be depended on under lib (which causes them to be added to the project as resources).

I haven't done anything to change the default behavior on my machine. "Manage Nuget Packages" through VisualStudio installed the nugets into a folder called "packages" inside my solution directory. This is reflected by the $(SolutionDir)packages path used in the wiki.

Not sure why the default nuget install location is different from your machine to mine, but it does reinforce that (1) this change is required, to help provide consistency in how a project using AutoImplement finds the exe, and (2) this is a breaking change that needs to wait for a major version bump.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants