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

Would like to see a "recipe" version #22

Open
wlscaudill opened this issue Nov 23, 2016 · 8 comments
Open

Would like to see a "recipe" version #22

wlscaudill opened this issue Nov 23, 2016 · 8 comments

Comments

@wlscaudill
Copy link

I love this library and would like to see a recipe version to not require a package reference that is passed downstream. A recipe will install the CS file as content and compile the logic in while continuing to allow for updates and bug fixes to be distributed via NuGet.

I publish both a dll package and a recipe/cs package for one of my libraries Naos.WiRM(https://github.com/NaosProject/Naos.WinRM) if you would like to look an example of editing the file to support both.

I have created a wrapped version of this in a NuGet package already to allow for my using it while having this conversation; (https://www.myget.org/feed/naos-nuget/package/nuget/Naos.Recipes.ByteSize). I would rather have this published here for ease of getting updates.

Please let me know if this is something you would consider providing.

Thank you,
Lawson

@omar
Copy link
Owner

omar commented Nov 25, 2016

Hey Lawson,

This looks interesting. I think many people would benefit from a recipe. I'll look into this and add it to my to do list.

Thanks

@omar
Copy link
Owner

omar commented Nov 30, 2016

Hey Lawson,

I'm not sure when I'll get to this, but If you have something already, maybe you can open a PR and we can work on it together to build some momentum for this feature.

@wlscaudill
Copy link
Author

wlscaudill commented Dec 13, 2016

Do you publish your packages by hand? If so then you just simply need another nuspec file (ByteSize.Recipe.nuspec let's say) with a new ID (ByteSize.Recipe) and in the file list you would specify a single file:

  <files>
    <file src="ByteSize.cs" target="content/45/.ByteSize.Recipe/ByteSize.cs" />
  </files>

Then pack and push that new package. NuGet will automatically put this in a folder (.ByteSize.Recipe) in Visual Studio and the period prefix is just to denote that it's not used or make the directory hidden if you have that enabled...

Feel free to message me if you have any issues or questions.

@sandrock
Copy link

IMO, your request looks like a hack of nuget principles. Is there a documentation somewhere that recommends this practice?

Can you also investigate Paket: GitHub dependencies? Then can you tell us why this "recipe"-thing is better than using Paket?

@julealgon
Copy link
Contributor

IMO, your request looks like a hack of nuget principles. Is there a documentation somewhere that recommends this practice?

Thought exactly the same thing when I first saw this "recipe" thing. Where did that come from? Source should really not be distributed as content in .NET.

@wlscaudill
Copy link
Author

wlscaudill commented Jun 15, 2021 via email

@julealgon
Copy link
Contributor

Thanks for clarifying @wlscaudill .

Still, this introduces so many complications though. What happens if you reference a file, and then try to update it from inside Visual Studio? This is like using a scaffolding mechanism, updating the results, and then running the scaffolding again on updates. What happens when you attempt to update the NuGet package?

It is such an outlandish concept to me... I assume it was used exclusively internally at Microsoft? I've never seen a "standard" package employ this approach. It seems like a way to "package a 'Shared Content' project type".

@wlscaudill
Copy link
Author

wlscaudill commented Jun 16, 2021 via email

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

No branches or pull requests

4 participants