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

Document how to create add-ins (and similar scenarios) #30342

Open
richlander opened this issue Jul 25, 2022 · 5 comments
Open

Document how to create add-ins (and similar scenarios) #30342

richlander opened this issue Jul 25, 2022 · 5 comments
Labels
doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3

Comments

@richlander
Copy link
Member

richlander commented Jul 25, 2022

@RickStrahl is asking for guidance on creating add-ins: https://twitter.com/RickStrahl/status/1551342858774319104. We don't have a doc on that, AFAIK.

I believe the scenario is this:

  • Addins can have any dependency.
  • Dependencies that are already provided by the app should be knocked out.

We don't have a good way of doing this today. That's what dotnet/runtime#71282 is hoping to enable. The question is whether we have any facility for this today. It sounds like #30341 delivers at least part of that.

Related to

@vitek-karas @rainersigwald @JonDouglas @baronfel @mhutch

@PRMerger7 PRMerger7 added the Pri3 label Jul 25, 2022
@dotnet-bot dotnet-bot added the ⌚ Not Triaged Not triaged label Jul 25, 2022
@baronfel
Copy link
Member

We do have a decent story for the 'knock out' part via the ExcludeAssets="runtime" mechanism. That's how MSBuild tasks don't bundle their own version of the MSBuild libraries, for example. That will end up being a key part of any story we tell here.

@richlander
Copy link
Member Author

How does that work for inner loop or dotnet test, for example? This seems like another scenario where we might want knockout only for publish or something like that. Presumably, people building msbuild tasks (or other addins) have some way of doing development w/o the host. Or no?

@gewarren gewarren added doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3 and removed ⌚ Not Triaged Not triaged Pri3 labels Jul 25, 2022
@zivkan
Copy link
Member

zivkan commented Jul 25, 2022

Another option is that the plugin host provides a package with ref/<tfm>/*.dll, but no lib/* or runtimes/*. That way package consumers don't need to manually use ExcludeAssets or similar. The VS SDK kind of does this, just in its own way, I think, rather than using NuGet's features (maybe because it's hard to pack assemblies into ref/?)

@vitek-karas
Copy link
Member

Not sure if this fits the request but we have a guide and a sample for an app with plugins:
https://docs.microsoft.com/en-us/dotnet/core/tutorials/creating-app-with-plugin-support

And it does discuss the exclusion of some dependencies...:

<ItemGroup>
    <ProjectReference Include="..\PluginBase\PluginBase.csproj">
        <Private>false</Private>
        <ExcludeAssets>runtime</ExcludeAssets>
    </ProjectReference>
</ItemGroup>

The sample app is here: https://github.com/dotnet/samples/tree/main/core/extensions/AppWithPlugin

@ericstj
Copy link
Member

ericstj commented Apr 19, 2024

We do have a decent story for the 'knock out' part via the ExcludeAssets="runtime" mechanism. That's how MSBuild tasks don't bundle their own version of the MSBuild libraries, for example. That will end up being a key part of any story we tell here.

This doesn't work well in the project graph. If someone else brings in a reference to one of the excluded packages - even at a lower version - it will be included again. Conflict resolution is a better example of how we should drop components provided by the host. That's how shared frameworks work today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-idea Indicates issues that are suggestions for new topics [org][type][category] Pri1 High priority, do before Pri2 and Pri3
Projects
None yet
Development

No branches or pull requests

8 participants