Hot answers tagged

42

The two tools have different feature sets, and implementations. I've tried to represent both out-of-the-box feature sets here briefly, but as fairly as possible. SIMILAR FUNCTIONALITY The similar functionality between the two is the ability to serialize Sitecore items to disk. Unicorn's README summarizes the need for this really well, by stating it writes:...


27

Sean's answer is a good general overview of the differences between Unicorn and TDS Classic. This answer is here mostly to expand on a few of the serialization-based items not entirely covered. The real best way to decide what you want to use is to actually try using both. Each has its own distinct advantages for different types of projects and different ...


18

This is an alternative method to @Kasaku's answer - it effectively gives the same result but can be a little more flexible, especially if you are following Helix guidelines. Instead of patching the physicalRootPath in the targetDataStore for the defaults, you can also do this in each configuration file. So that you only have one place to put the full path, ...


14

Yep. Using the NewItemsOnly evaluator. Add this under your <configuration> element. <evaluator type="Unicorn.Evaluators.NewItemOnlyEvaluator, Unicorn" singleInstance="true"/> You can find an example of this in your Unicorn folder. Unicorn.Configs.NewItemsOnly.example Be aware. Be aware of a few caveats though. I've been using this one myself ...


11

Unicorn 3.2 is built against .NET 4.5, and Sitecore 8.2 is built against .NET 4.5.2. There are some funny edge cases where the earlier framework assembly calling the later framework assembly breaks - like this one. To fix this update to Unicorn 3.3 RC9, which is built against .NET 4.5.2 and squashes a bunch of bugs. It's a plain ol' NuGet package upgrade to ...


11

This is caused by having the Unicorn.SharedSecret.config loading prior to Unicorn.UI.config (which prevents the type definition on the auth provider from loading correctly due to Sitecore config patching rules). Rename your Unicorn.SharedSecret.config to Unicorn.zSharedSecret.config and that should fix it.


11

Yes it's totally possible. When an item is controlled by Unicorn, you can use the Developer tab controls in the Sitecore ribbon to do partial syncing or partial reserialization. Unicorn takes over the standard Sitecore serialization in those cases. See https://kamsar.net/index.php/2015/09/Unicorn-3-What-s-new/#Unicorn-enabled-serialize-commands


11

Unicorn 3 and above has an option to exclude child items under parent item. In your case you can use as below: <include database="master" name="WFFMSaveActions" path="/sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions"> <exclude path="/sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save ...


10

Yes, you can do the sync with almost any kind of script. Basically you can call the /unicorn.aspx with parameters. Here you can find the whole documentation about this. This example is working with PowerShell. Generate a very long random shared secret key, preferably using a password generator. There are no limits on character count, character types, ...


9

As far as I know, I can say no there isn't at this point. Please correct me if I am wrong someone. However you can do the following to deploy sitecore items. Source: https://github.com/kamsar/Unicorn Automated Deployment With Unicorn you've got two options for automated deployment of item changes, for example from a Continuous Integration server or ...


8

It could be a couple of things. When does this error happen to you? when starting up your Sitecore instance, or when you try and add new items to be serialised? The error comes, when an item under Unicorn control is updated/saved/created, but where an initial serialisation of the entire tree has not been performed yet. Most likely, you have forgotten the ...


7

For anyone coming to this question far in the future, you can explicitly combine your Unicorn configuration into a package with SPE See https://kamsar.net/index.php/2017/02/Unicorn-4-Preview-Part-2-5-Generating-Packages-with-SPE/ # Create a new Sitecore Package (SPE cmdlet) $pkg = New-Package # Get the Unicorn Configuration(s) we want to package $configs = ...


7

There is Sitecore Courier which generates a package from your serialized items. It also supports Unicorn files. You can then use Sitecore Ship to install the package on a remote server.


7

There is a mismatch between your Sitecore binaries and Sitecore configuration. The OnPackageInstallStartingRemoteHandler method was only added to PackagingEventHandler in Sitecore 8.2 Update 1. It didn't exist yet in 8.2 Initial Release. Which means you have 8.2 (or earlier) binaries with 8.2 Update 1 configuration. What happens, most likely, is that you ...


7

One way to do this using Unicorn 3 is with <exclude> and <except> elements. This can be done like so: <include name="xxxxxx.Foundation.CustomWffmFieldTypes.SaveActions" database="master" path="/sitecore/system/Modules/Web Forms for Marketers/Settings/Actions/Save Actions"> <exclude children="true"> <except ...


7

Had the same issue due to the SC Hackathon 2021 with Sitecore v. 10.1. Resolved by change this resolved by change this config Unicorn.DataProvider.config section: <databases> <database id="master"> <dataProviders> <dataProvider ref="dataProviders/main"> <...


6

I asked a similar question a little while back, about the interop between Sitecore and Unicorn on disk files. If you have Transparent-Sync on or have your Unicorn.DataProvider.config file configured, then there is a direct relation between Sitecore and the Unicorn serialization files on disk. If you update an item, in a part of Sitecore that is tracked, the ...


6

Transparent Sync is off by default and something you deliberately enable. With Transparent Sync, for items controlled by Unicorn it bypasses the Sitecore database completely. In effect, the filesystem becomes the item data-store. In regular Unicorn usage, you still use the Sitecore databases, but any items controlled by Unicorn (i.e. specified in a ...


6

The Sitecore.CodeGenerator project can convert serialized Sitecore items into GlassMapper classes, and it contains support for the Rainbow serialization format (used by Unicorn 3). The project page has step-by-step instructions on how to install and configure it.


6

I think the powershell functions you're looking for are: # Reserialize one Export-UnicornConfiguration "Foundation.Foo" # Reserialize multiple by name Export-UnicornConfiguration @("Foundation.Foo", "Foundation.Bar") # Reserialize from pipeline Get-UnicornConfiguration "Foundation.*" | Export-UnicornConfiguration Taken from here EDIT: that's for the ...


6

Sitecore 9.1 uses identity server for authorization. muso31/Helixbase uses unicorn 4.0.4 and old version of Rainbow. Just update Unicorn to 4.0.7 version and Rainbow to 2.0.5. There are some changes in unicorn config files for new version. Be sure to update them https://github.com/SitecoreUnicorn/Unicorn/tree/master/src/Unicorn/Standard%20Config%20Files


6

Looks like it might be a problem with Unicorn. In 9.3 Sitecore removed the Context property from the pipeline args, but your older version of Unicorn is trying to access it. They have fixed this though, so I'd remove the Unicorn config files and dlls and verify the site works ok, and if it does then apply the most recent version of Unicorn.


5

This is a Unicorn/Rainbow error that occurs when the item being saved (serialized to disc) does not have its parent item serialized. This indicates that you are using Unicorn not only on your local machine, but also on your development server. In general, in most development processes there should be no reason to use Unicorn on a development server, ...


5

This is hard to answer because it's really several questions at once. To start with, YES Unicorn 3 handles things much better because it has more control over its serialization system. Unicorn 2 is a bit hamstrung because it's using the built in APIs which have some fun bugs. Unicorn 2.x should, however, support most kinds of renaming without issue. If your ...


5

It is exactly possible to use the Unicorn for Continuous Delivery. I have some suggestions: First of all, you need to put files (which are generated by Unicorn) under source control. You need to use a config transformations for filling a correct path to the folder with the Unicorn's files. The next very important part is that you should deny Unicorn to ...


5

Security stored on items Access rights (security) are stored on the item itself, in the __Security field. You can see the contents of this field in a few ways: Security Details tab In the Content Editor, under the Security ribbon tab, click the Details button and you will see the following tab: Raw field values If you want to be able to copy the ...


5

Create a patch file; z.Rainbow.config. <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"> <sitecore> <settings> <setting name="Rainbow.SFS.SerializationFolderPathMaxLength" set:value="150" /> </settings> </sitecore> </...


5

TIL that Visual Studio 2017 introduced a Solution Explorer toolbar to switch between the classic "Solution" view and to a "Source Files" view which shows the files and folder structure which is on disk. From the Solution Explorer toolbar, click the Switch Views toolbar icon and select Folder View: You can now see the repository as it is on disk. Expand the ...


4

With transparent sync, the file system becomes the record for Sitecore. It treats the file system like the master database. For items and children that are monitored by transparent sync, if you create an item, TS will add it to the file system. If you delete an item from disk, it will be deleted from Sitecore. If you delete an item from Sitecore, it gets ...


4

Actually; Reserialize means "Delete local files and take whatever is in Sitecore and serialize that to local files". Sounds to me like you may have been getting the terms mixed up. If you want to set Sitecore back to where it was; checkout the branch at the commit you want to roll back to and issue a Sync (not Reserialize).


Only top voted, non community-wiki answers of a minimum length are eligible