Repository navigation
VS Extension Discussion #1
Copy link
Copy link
Open
Description
This topic is for general discussion of the Visual Studio extension for Excel-DNA.
We can create individual issues for specific work items as these are more clearly defined.
My thoughts for the first iteration of the VS extension:
- The first iteration of the extension is mainly about project and item templates, and some related tools for setting up and managing an Excel-DNA add-in solution.
- We are building this for the Excel-DNA v1.1 generation, so this always targets .NET Framework. (There are some future plans for Excel-DNA to target .NET 5, and have a different model for loading the add-ins.)
- We want to support both C# and VB.NET (and possibly F# where this is easy, but it's not an initial priority).
- There are different solution and project layouts we should define and then make easy to build and configure. For example:
- Simplest add-in is just a Class Library that has the
ExcelDna.AddInNuGet package installed. - A complicated solution might have:
- an implementation Class Library project which does not reference Excel-DNA at all, with the core code, and other references
- a Test project that does unit testing of the implementation library, and
- an add-in Class Library that references Excel-DNA and the implementation library, and adds the functions and add-in specific feature that are relevant to the Excel addin part of the project.
- possible other projects that also reference the implementation library, like a GUI front-end.
- Simplest add-in is just a Class Library that has the
- There are different features that an Excel-DNA add-in project might have, and that we want to make easy to add. For example:
- Have a reference to the Excel PIA assemblies installed (perhaps with an option about the version).
- Runtime-registration of functions using the Excel-DNA Registration extensions - with some related features
- Support for a Ribbon extension, perhaps with ribbon definitions in a separate xml file that is embedded as a resource
- Support for one or more CTP, with some help in setting up the WinForms // WPF // WebView and maybe dealing with a CTP that is linked to a workbook.
- Documentation support through ExcelDnaDoc (which also needs the help compiler tools to be installed - I can't remember if the NuGet package does this automatically).
- Embedding of the IntelliSense library
- We might consider whether to interact with the .dna file that defines an add-in, for example can we help manage the list of
<Reference ... Pack='true' \>tags to help with the packing.
General extension features:
- I'd like to understand the options for licensing of the extension, particularly how we link the extension to a back-end user id and authorization to use the extension. Does the VSIX model have any built-in support for licensing?
- I'd like to understand the options for building in some telemetry into the extension, so that we might get information about how many add-ins are created, and what aspects are used. This should be anonymous and optional to the user so they can opt out.
Future topics, not for the first iteration:
- Setting up an installer project (from the WiXInstaller) is not for the first iteration, but perhaps for future work.
- Improve debugging cycle through some unloading / reloading link to a 'live' Excel instance. There are some debugger implications to this too.
- A test framework for integration testing of add-ins.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
Sergey-Vlasov commentedon Aug 4, 2020
What Visual Studio versions you would like to support?
Sergey-Vlasov commentedon Aug 4, 2020
VSIX model doesn't have any built-in support for licensing.
govert commentedon Aug 4, 2020
Just VS 2019.
Sergey-Vlasov commentedon Aug 8, 2020
I'm trying to include XML schemas to the VS extension.
Schemas can be installed globally to all projects on the machine, but it requires the extension to also be installed for all users, that complicates extension installation and updates.
We can use a separate extension to install schemas globally (like you currently have in VSExcel), keeping the main extension installable for the current user.
Include schemas to Excel-DNA add-in project templates from the extension using ExcelDna.XmlSchemas package.
What option do you prefer?
govert commentedon Aug 8, 2020
Let's go with all three options - that seems to be the least amount of work now.
Is it possible to install them (or attempt to install them) if the extension is being installed for all users, and otherwise not have an error? That would be good, if it is easy to do.
Then we keep the separate Excel-DNA XML Schemas extension available as an alternative way to install them.
Finally, if we later make a wizard to configure the project, or have a menu to add features to a project, we can add the option to install the schemas NuGet package there, if it has not been installed gloabally. (At that point it would be nice to have a way to detect whether they are installed, if that is fairly easy.)
The most interesting of the schemas is the 2010 Office ribbon schema. I would like to know whether that schema is installed by Visual Studio separately, when the Office development features are installed. Is there a way to detect (inside an extension) what schemas are installed?
Sergey-Vlasov commentedon Aug 8, 2020
Sergey-Vlasov commentedon Aug 8, 2020
I've installed the "Office/SharePoint development" workload in VS 2019, but customUI.xsd haven't appeared in xml\schemas.
Sergey-Vlasov commentedon Aug 8, 2020
Looking more closely, I've found it in xml\schemas\1033\customUI14.xsd.
govert commentedon Aug 8, 2020
OK - that customUI14.xsd is the only one we really care about. The .dna schema is nice, but less important, and the old Excel 2007 ribbon schema is not important.
I don't know if most users would have the Office workload installed, and would not encourage it for a beginner, but it's good to know that that is a case where the schema is installed already.