Good to hear that you'd like to re-use uComponents in a package!
There are a couple of ways...
1. Just include it. But that runs the risk of clashing with other versions/installs of uComponents.
2. Use ILMerge to bundle uComponents with your assembly. This is much safer, as the merged DLL is marked as "internal", so only accessible from your code/references.
3. Forget about bundling it... and rip out any parts of the code that you want to re-use. All the code is MIT-licensed, you have the freedom to do so.
I've tried the first method you've mentioned via the Umbraco Developer section and I came across the following challenge.
I am using the Multi-Node Tree Picker whereby the Start Node ID is set to 1183.
After installing the package, I get the error No node exists with Id '1183'.
The ID for that node has changed as the content is getting re-created, therefore new ID's. Manually setting the Start Node ID after install resolves this. Suppose I could look at using an XPath Expression that would look for a particular DocType.
Packaging all doc-types, content nodes, data types, macros, etc. XPath expression would definitely resolve the above issue. Could possible replicate the Cultiv Razor Examples package, and zip/unzip the site.
Including Ucomponents as part of a custom package
Looking to put together a custom package as a base for building Umbraco sites, and I would like to include Ucomponents as part of the custom package.
How do I go about including Ucomponents as part of a custom package?
Thanks for any help
Hi Sean,
Good to hear that you'd like to re-use uComponents in a package!
There are a couple of ways...
1. Just include it. But that runs the risk of clashing with other versions/installs of uComponents.
2. Use ILMerge to bundle uComponents with your assembly. This is much safer, as the merged DLL is marked as "internal", so only accessible from your code/references.
3. Forget about bundling it... and rip out any parts of the code that you want to re-use. All the code is MIT-licensed, you have the freedom to do so.
Looking forward to seeing what you come up with.
Cheers, Lee.
Hi Lee
Thanks for responding.
I've tried the first method you've mentioned via the Umbraco Developer section and I came across the following challenge.
I am using the Multi-Node Tree Picker whereby the Start Node ID is set to 1183.
After installing the package, I get the error No node exists with Id '1183'.
The ID for that node has changed as the content is getting re-created, therefore new ID's. Manually setting the Start Node ID after install resolves this. Suppose I could look at using an XPath Expression that would look for a particular DocType.
Any other suggestions for resolving this?
Hi Sean,
Given that node IDs will be different between every Umbraco install, it is a safer option to go for an XPath expression to select the start node.
Not sure what else you are packaging up... other doc-types, content nodes, etc?
Cheers, Lee.
Hi Lee
Packaging all doc-types, content nodes, data types, macros, etc. XPath expression would definitely resolve the above issue. Could possible replicate the Cultiv Razor Examples package, and zip/unzip the site.
Thanks for your help Lee
is working on a reply...