8000 Changed nuget to use msbuild targets and support web app publish by amibar · Pull Request #615 · libgit2/libgit2sharp · GitHub
[go: up one dir, main page]

Skip to content

Changed nuget to use msbuild targets and support web app publish #615

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

Closed
wants to merge 2 commits into from

Conversation

amibar
Copy link
Contributor
@amibar amibar commented Jan 24, 2014

I changed the nuget packet to use msbuild target instead of the post build event.

It is less error prone, since a user might change the post build event and damage the script.

I also added support to Web Application publish.

@nulltoken
Copy link
Member

It is less error prone, since a user might change the post build event and damage the script.

@amibar You're completely right. In order to achieve a similar goal, I've created #425 some time ago. It's not merged yet because there are still some pending issues related to "Publish"ing.

As I imagine you've spent some time on this PR, I'd happily grant you authorship of #425. However, I'd prefer close this one in order to avoid duplicates.

Regarding the code, it appears we've followed similar paths, but the *.targets file look slightly different. As I'm not a MSBuild expert, I'd really appreciate if you could please help me comparing them? What are the pros/cons of each?

Beside this, do you think you could provide us with some help in the "Publishing" area?

For apllications it uses the .targets option.
For Web Application it uses the magical _bin_deployableAssemblies project folder that does
the trick of publishing extra binaries.

I used Microsoft SQL Server Compact Edition as a template.
I changed the original post build event to .targets.
@nulltoken
Copy link
Member

@amibar Huh? One of the goal of #425 was to

help removing the `nuget.package/Tools/*.ps1` scripts by adding a `.targets`
file in the `/build/<framework>` package folder, which can contain <itemgroup>
tags that have items that are set to copy to output.

@davidebbo @fearthecowboy Isn't there a way to support publishing without any powershell based trick?

@amibar
Copy link
Contributor Author
amibar commented Jan 25, 2014

@nulltoken, The ps1 files are not copying files, they build the _bin_deployableAssemblies folder in Web Application projects.
There is also .target for exe applications, I used both.

@nulltoken
Copy link
Member

@amibar I've seen this 😉 But I'd rather try to find a way to do this without any *.ps1 scripting. Powershell support is very limited on Mono.

@amibar
Copy link
Contributor Author
amibar commented Jan 25, 2014

@nulltoken, I am missing something.
Where does Mono take place in this issue?

@nulltoken
Copy link
Member

LibGit2Sharp is a Win32/Mono compatible product. I'd like the NuGet package to be also Mono friendly.

@amibar
Copy link
Contributor Author
amibar commented Jan 25, 2014

@nulltoken
How do I check it on Mono?
What is the setup? Linux, MonoDevelop?

@davidebbo
Copy link
Contributor

Another concern that I have is that if you copy the native binaries into _bin_deployableAssemblies at the time the package is installed, you will end up having to commit those binaries (since Package Restore won't get them there). And committing binaries to git is best avoided.

Ideally, there would be some msbuild level magic that copies those binaries from the Packages folder into _bin_deployableAssemblies early on at build time. This way nothing would need to be committed, and it would probably get rid of the PowerShell logic. But I'm no msbuild expert, so don't ask me for details on how to achieve that :)

@nulltoken
Copy link
Member

Superseded by #821.

Thanks!

@nulltoken nulltoken closed this Sep 19, 2014
@nulltoken nulltoken added this to the UnmergedOrDoNotRequireAFix milestone Sep 19, 2014
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.

3 participants
0