stride3d/stride · error · InvalidOperationException
The asset mount point cannot be renamed
Error message
The asset mount point cannot be renamed
What it means
The asset mount point (the virtual 'Assets' root of a package) is a fixed node in the directory tree. Its Name setter deliberately throws InvalidOperationException because renaming the mount point would break package layout, and its IsEditable is false. This is an intentional guard against an unsupported operation.
Solutions
- Do not rename the mount point; check IsEditable first and skip non-editable nodes.
- If a different root name is required, that requires changing the package layout in the engine, not the editor view model.
- Route rename operations to DirectoryViewModel instances (subdirectories) only.
Example fix
// before node.Name = "MyAssets"; // after if (node.IsEditable) node.Name = "MyAssets";
Defensive patterns
Strategy: validation
Validate before calling
if (!node.IsEditable) { logger.Info("Asset root cannot be renamed"); return; } Type guard
bool CanRename(DirectoryBaseViewModel n) => n.IsEditable && !(n is AssetMountPointViewModel);
Try / catch
try { node.Name = newName; }
catch (InvalidOperationException) { logger.Warn("Asset mount point cannot be renamed"); } Prevention
- Check IsEditable before any rename UI action
- Disable rename gestures on the tree root node
- Only issue renames on regular DirectoryViewModel nodes
When it happens
Trigger: Assigning any value to AssetMountPointViewModel.Name, or calling rename UI/logic on the asset root node instead of on a regular directory view model.
Common situations: Generic rename code iterating the whole directory tree without checking IsEditable; scripts trying to rebrand the 'Assets' root folder.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- A category cannot be deleted
- Unable to find the base
- Unable to find the graph corresponding to the base part
- The base is unset for the current node.
- No Collection item identifier associated to the given…
AI-assisted analysis of stride3d/stride@96fad776d2 (2026-09-14).
Data as JSON: /api/errors/5f5fc357f726620d.
Report an issue: GitHub.
Appendix: source
Thrown at sources/editor/Stride.Core.Assets.Editor/ViewModel/AssetMountPointViewModel.cs:14
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using System;
namespace Stride.Core.Assets.Editor.ViewModel
{
public class AssetMountPointViewModel : MountPointViewModel
{
public AssetMountPointViewModel(PackageViewModel package)
: base(package)
{
}
public override string Name { get { return "Assets"; } set { throw new InvalidOperationException("The asset mount point cannot be renamed"); } }
public override bool IsEditable => false;
public override bool CanDelete(out string error)
{
error = "Unable to delete the asset root folder.";
return false;
}
public override bool AcceptAssetType(Type assetType)
{
return !typeof(IProjectAsset).IsAssignableFrom(assetType);
}
}
}
View on GitHub (pinned to 96fad776d2)