I am building a site with VS Code on macOS. I currently have version 16 and want to go to 16.2.0-rc, but I can’t figure out how to upgrade the package reference.
Can anyone help me out with this? All of the dotnet upgrade references I search for are for Windows
Unhandled exception. System.Reflection.ReflectionTypeLoadException: Could not load all types from "Umbraco.Cms.StaticAssets, Version=16.2.0.0, Culture=neutral, PublicKeyToken=null" due to LoaderExceptions, skipping:
. System.IO.FileNotFoundException: Could not load file or assembly 'Umbraco.Web.Website, Version=16.2.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
Could not load file or assembly 'Umbraco.Web.Website, Version=16.2.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
at Umbraco.Cms.Core.Composing.TypeFinder.GetTypesWithFormattedException(Assembly a)
at Umbraco.Cms.Core.Composing.TypeFinder.GetClassesWithBaseType(Type baseType, IEnumerable`1 assemblies, Boolean onlyConcreteClasses, Func`2 additionalFilter)
at Umbraco.Cms.Core.Composing.TypeFinder.FindClassesOfType(Type assignTypeFrom, IEnumerable`1 assemblies, Boolean onlyConcreteClasses)
at Umbraco.Extensions.TypeFinderExtensions.FindClassesOfType[T](ITypeFinder typeFinder, IEnumerable`1 assemblies, Boolean onlyConcreteClasses)
at Umbraco.Cms.Core.Composing.TypeLoader.<>c__DisplayClass13_0`1.<GetTypes>b__1()
at Umbraco.Cms.Core.Composing.TypeLoader.GetTypesInternalLocked(Type baseType, Type attributeType, Func`1 finder, String action, Boolean cache)
at Umbraco.Cms.Core.Composing.TypeLoader.GetTypesInternal(Type baseType, Type attributeType, Func`1 finder, String action, Boolean cache)
at Umbraco.Cms.Core.Composing.TypeLoader.GetTypes[T](Boolean cache, IEnumerable`1 specificAssemblies)
at Umbraco.Cms.Core.DependencyInjection.UmbracoBuilderExtensions.AddAllCoreCollectionBuilders(IUmbracoBuilder builder)
at Umbraco.Cms.Core.DependencyInjection.UmbracoBuilder.AddCoreServices()
at Umbraco.Cms.Core.DependencyInjection.UmbracoBuilder..ctor(IServiceCollection services, IConfiguration config, TypeLoader typeLoader, ILoggerFactory loggerFactory, IProfiler profiler, AppCaches appCaches)
at Umbraco.Extensions.UmbracoBuilderExtensions.AddUmbraco(IServiceCollection services, IWebHostEnvironment webHostEnvironment, IConfiguration config)
at Umbraco.Extensions.WebApplicationBuilderExtensions.CreateUmbracoBuilder(WebApplicationBuilder builder)
at Program.<Main>$(String[] args) in /Users/{user}/Software/{Project}/{Project}.Web/Program.cs:line 3
at Program.<Main>(String[] args)
System.IO.FileNotFoundException: Could not load file or assembly 'Umbraco.Web.Website, Version=16.2.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'Umbraco.Web.Website, Version=16.2.0.0, Culture=neutral, PublicKeyToken=null'
You probably also need to update other packages. If you look in your .csproj file, anything starting with Umbraco.Cms should be updated to 16.2.0-rc. You can edit the file or do that on the command line.
Alternatively, you can also see which nuget packages are outdated using:
dotnet list package --outdated
In your case, since you want to move to a release candidate, you’d need to change it to
dotnet list package --outdated --include-prerelease
Warning: this will show you other “outdated” packages that are not Umbraco, I wouldn’t recommend upgrading those to pre-release versions.
For anyone reading this later: To upgrade to an RC version of the UmbracoExtension template, you must specify the version manually, or else the NuGet restore fails.
dotnet new umbraco-extension --name TestExtension --version 16.2.0-rc -ex
That is because the default “version” value is ”*”, which only works for non-prerelease versions of Umbraco, i.e., “16.2.0”, which is not out yet.
My tiptap editor looked a little weird so I though I would install a new project to see if it looked ok and I am getting an error on npm install
in terminal
mkdir MyProject
cd MyProject
dotnet new umbraco -n MyProject.Web --version 16.2.0-rc
cd MyProject.Web
dotnet run
(install Umbraco)
here I get an in-browser error after installation on redirect to the login page
error:invalid_request
error_description:The specified 'client_id' is invalid.
error_uri:https://documentation.openiddict.com/errors/ID2052
I can navigate to localhost/umbraco and log in.
in terminal
cd ..
dotnet new umbraco-extension -n MyProject.Ext --version 16.2.0-rc
cd MyProject.Web
dotnet add reference ../MyProject.Ext/MyProject.Ext.csproj
cd ../MyProject.Ext/Client
npm install
which leads to
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: @hey-api/[email protected]
npm error node_modules/@hey-api/client-fetch
npm error dev @hey-api/client-fetch@"^0.10.2" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @hey-api/client-fetch@"^0.12.0" from @umbraco-cms/[email protected]
npm error node_modules/@umbraco-cms/backoffice
npm error dev @umbraco-cms/backoffice@"^16.2.0-rc" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
You have stumbled into another bug, for which there is a fix slated for 16.3.0. It is apparently more widespread than I realised, so I’ll see if we can do something about it a bit sooner. It is registered here:
There is a temp solution, which is to manually pin the version of @hey-api/openapi-ts because the template is using an older version than the CMS.