-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
12.2.0
Bug summary
Installing Umbraco 12.2.0 using NuGet, media directory is not created leading to exception on first start.
Not a showstopper, obviously - just manually creating the missing media directory fixes it - but not going to be a great first impression for anyone trying out Umbraco for the first time.
Specifics
On first start of new clean install, following exception occurs:
DirectoryNotFoundException: [SITE_DIRECTORY]\wwwroot\media\ Microsoft.Extensions.FileProviders.PhysicalFileProvider..ctor(string root, ExclusionFilters filters) Umbraco.Cms.Core.IO.PhysicalFileSystem.Create() Umbraco.Extensions.FileSystemExtensions.TryCreateFileProvider(IFileSystem fileSystem, out IFileProvider fileProvider) Umbraco.Cms.Core.IO.ShadowWrapper.Create() Umbraco.Extensions.FileSystemExtensions.TryCreateFileProvider(IFileSystem fileSystem, out IFileProvider fileProvider) Umbraco.Extensions.ApplicationBuilderExtensions.UseUmbracoMediaFileProvider(IApplicationBuilder app) Umbraco.Cms.Web.Common.ApplicationBuilder.UmbracoApplicationBuilder.RegisterDefaultRequiredMiddleware() Umbraco.Cms.Web.Common.ApplicationBuilder.UmbracoApplicationBuilder.WithMiddleware(Action<IUmbracoApplicationBuilderContext> configureUmbracoMiddleware) TestSite.Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env) in Startup.cs + app.UseUmbraco() System.RuntimeMethodHandle.InvokeMethod(object target, Void** arguments, Signature sig, bool isConstructor) System.Reflection.MethodInvoker.Invoke(object obj, IntPtr* args, BindingFlags invokeAttr) System.Reflection.RuntimeMethodInfo.Invoke(object obj, BindingFlags invokeAttr, Binder binder, object[] parameters, CultureInfo culture) Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(object instance, IApplicationBuilder builder) Microsoft.WebTools.BrowserLink.Net.HostingStartup+<>c__DisplayClass1_0.<Configure>b__0(IApplicationBuilder app) Microsoft.AspNetCore.Watch.BrowserRefresh.HostingStartup+<>c__DisplayClass1_0.<Configure>b__0(IApplicationBuilder app) Microsoft.AspNetCore.Hosting.GenericWebHostService.StartAsync(CancellationToken cancellationToken) Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken) Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.RunAsync(IHost host, CancellationToken token) Microsoft.Extensions.Hosting.HostingAbstractionsHostExtensions.Run(IHost host) TestSite.Program.Main(string[] args) in Program.cs + => CreateHostBuilder(args)
Steps to reproduce
Create Umbraco site project in Visual Studio, Umbraco Version 12.2.0. Install NuGet packages/build and run site.
Expected result / actual result
Expected the site to start, any essential folders created by NuGet package or on first start.
Actually, site throws exception due to missing wwwroot/media folder.