So today I got into discussions with my dev team about the future of Umbraco and v8 in particular and we had a few assumptions that we wanted to validate so decided to try and get the V8 code to build and run.
The solution builds but wont run. The specific errors we are getting are as follows.
1. System.IO.FileNotFoundException: Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.
The package is in the packages.config file but there is no reference to it in the project?
If we reference this dll that is in the packages folders we can get past this issue. We build and go again.
2. Could not load file or assembly 'ImageProcessor, Version=2.4.5.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Next issue is ImageProcessor is referenced but the reference is broken so we remove and add it again. This resolves this issue. We build and go again.
3. The following errors occurred while attempting to load the app.
- The OwinStartupAttribute.FriendlyName value 'UmbracoDefaultOwinStartup' does not match the given value 'SignalRStartup' in Assembly 'umbraco, Version=1.0.6177.30603, Culture=neutral, PublicKeyToken=null'.
- The given type or method 'SignalRStartup' was not found. Try specifying the Assembly.
To disable OWIN startup discovery, add the appSetting owin:AutomaticAppStartup with a value of "false" in your web.config.
To specify the OWIN startup Assembly, Class, or Method, add the appSetting owin:AppStartup with the fully qualified startup class or configuration method name in your web.config.
And this is where we get stuck and will need a bit of help on what next. We have tried to simply change the web.config key to specify UmbracoDefaultOwinStartup instead of SignalRStartup but we hit a different issue where it simple says
Boot failed. Umbraco cannot run. Umbraco's log file contains details about what caused the boot to fail.
The log looks like this
2016-11-29 17:49:00,384 [P25792/D9/T1] INFO Umbraco.Core.CoreRuntime - Booting Umbraco 8.0.0-alpha0020 on PGSURFACEBOOK.
2016-11-29 17:49:00,396 [P25792/D9/T1] DEBUG Umbraco.Core.CoreRuntime - Runtime: Umbraco.Web.WebRuntime
2016-11-29 17:49:00,397 [P25792/D9/T1] DEBUG Umbraco.Core.CoreRuntime - Acquiring MainDom.
2016-11-29 17:49:00,401 [P25792/D9/T1] INFO Umbraco.Core.MainDom - Acquiring.
2016-11-29 17:49:00,402 [P25792/D9/T1] INFO Umbraco.Core.MainDom - Acquired.
2016-11-29 17:49:00,407 [P25792/D9/T1] DEBUG Umbraco.Core.CoreRuntime - Aquired. (7ms)
2016-11-29 17:49:00,408 [P25792/D9/T1] DEBUG Umbraco.Core.CoreRuntime - Determining runtime level.
2016-11-29 17:49:00,461 [P25792/D9/T1] ERROR Umbraco.Core.CoreRuntime - Failed. (52ms)
2016-11-29 17:49:00,462 [P25792/D9/T1] ERROR Umbraco.Core.CoreRuntime - Boot failed. (175ms)
Umbraco.Core.Exceptions.BootFailedException: Boot failed. ---> System.InvalidOperationException: Unable to resolve type: Umbraco.Core.Persistence.IDatabaseFactory, service name: ---> System.InvalidOperationException: No resolvable constructor found for Type: Umbraco.Core.Persistence.DefaultDatabaseFactory
at LightInject.MostResolvableConstructorSelector.Execute(Type implementingType) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 5205
at LightInject.TypeConstructionInfoBuilder.Execute(Registration registration) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 5344
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at LightInject.ConstructionInfoProvider.GetConstructionInfo(Registration registration) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 5404
at LightInject.ServiceContainer.EmitNewInstance(ServiceRegistration serviceRegistration, IEmitter emitter) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3291
at LightInject.ServiceContainer.EmitNewInstanceWithDecorators(ServiceRegistration serviceRegistration, IEmitter emitter) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3194
at LightInject.ServiceContainer.<>c__DisplayClass199_0.<ResolveEmitMethod>b__2(IEmitter ms) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3885
at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3043
at LightInject.ServiceContainer.<>c__DisplayClass200_0.<EmitLifetime>b__0() in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3893
at LightInject.PerContainerLifetime.GetInstance(Func`1 createInstance, Scope scope) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 5739
at LightInject.ServiceContainer.EmitLifetime(ServiceRegistration serviceRegistration, Action`1 emitMethod, IEmitter emitter) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3892
at LightInject.ServiceContainer.<>c__DisplayClass199_0.<ResolveEmitMethod>b__1(IEmitter methodSkeleton) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3885
at LightInject.ServiceContainer.<>c__DisplayClass152_0.<CreateEmitMethodWrapper>b__0(IEmitter ms) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3124
at LightInject.ServiceContainer.CreateDynamicMethodDelegate(Action`1 serviceEmitter) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3043
at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3967
--- End of inner exception stack trace ---
at LightInject.ServiceContainer.CreateDelegate(Type serviceType, String serviceName, Boolean throwError) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3972
at LightInject.ServiceContainer.CreateDefaultDelegate(Type serviceType, Boolean throwError) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 3930
at LightInject.ServiceContainer.GetInstance(Type serviceType) in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 2538
at LightInject.ServiceContainer.GetInstance[TService]() in C:\projects\lightinject\build\tmp\Net46\Binary\LightInject\LightInject.cs:line 2593
at Umbraco.Core.CoreRuntime.DetermineRuntimeLevel(IServiceFactory container) in C:\wip\Umbraco8\src\Umbraco.Core\CoreRuntime.cs:line 150
at Umbraco.Core.CoreRuntime.Boot(ServiceContainer container) in C:\wip\Umbraco8\src\Umbraco.Core\CoreRuntime.cs:line 90
--- End of inner exception stack trace ---
2016-11-29 17:49:05,561 [P25792/D9/T13] ERROR Umbraco.Core.UmbracoApplicationBase - An unhandled exception occurred.
Umbraco.Core.Exceptions.BootFailedException: Boot failed. Umbraco cannot run. Umbraco's log file contains details about what caused the boot to fail.
at Umbraco.Web.UmbracoModule.<>c.<Init>b__42_0(Object sender, EventArgs args) in C:\wip\Umbraco8\src\Umbraco.Web\UmbracoModule.cs:line 502
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
So this is where we are at. From what I can see in the logs looks related to Database? We have not reached the installer at this point so nothing is configured in the web.config
Any help getting this up and running would be amazing.
Point 1 and 2 are probably simple things - the solution should always build, but I keep working on the same VS solution and maybe when you start from scratch some things are missing. Will try to checkout and rebuild and see what happens, and fix.
Point 3 is again probably something silly: my own web.config which has been manually tweaked contains everything that is needed but I probably need to update the web.config template that ships with a fresh clone.
And then for the last part: the boot process has been refactored and I'm actually happy to see that you have seen the correct message, and immediately found the relevant part in the log. What that parts says is that, again, when merging a few days ago I made a mistake. Fixed on my machine.
So all in all, depending on how much time I get, it should all be fixed within a day or two.
Thanks for the quick response Stephen. I know how it can be to have a build that works in your dev environment and when you hand it off to other devs it fails because you forgot to include or exclude something.
We are looking forward to having a look around and are willing to contribute where we can. Will take a look later in the week once you have committed the update with the fixes.
edit: I guess the boot will fail on that one too though :)
A friendly reminder: please note that looking at v8 now is premature and a lot is yet to change. There's no need to start stressing out about it now. :-)
So premature yes as in it's not ready for anything. Premature no from the point of view that we would be silly to not look over the horizon once in a while. Besides isn't early validation a good thing?
Certainly a good thing! I just speak to too many people getting scared that they need to prepare for the future while the future in this case is quite uncertain. So just trying to manage the expectations a little bit!
Latest code in dev-v8 should build and install and run. Caveats:
Do not install a starter kit, as none of them currently work with v8 and that would YSOD the install.
Edit web.config and disable ModelsBuilder, it currently has an issue that silently breaks everything including the content cache.
From there it should be working although I have some little-tested work-in-progress in the persistence layer that could very well break a few things.
DISCLAIMER: What You See Is Not What You'll Get
Feel free to look at the code, test everything - all ears for questions, ideas, comments and suggestions. But do not expect the code and APIs to remain stable, and be ready for nasty breaking changes now and then.
How do you disable ModelsBuilder effectively? I set enabled to false in my web.config but.. computer says no:
Umbraco.Core.Exceptions.BootFailedException: Boot failed. ---> System.Reflection.ReflectionTypeLoadException: Could not load all types from "Umbraco.ModelsBuilder, Version=8.0.0.2, Culture=neutral, PublicKeyToken=null" due to LoaderExceptions, skipping:
. System.IO.FileNotFoundException: Could not load file or assembly 'Umbraco.Compat7, Version=1.0.6106.21780, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
ModelsBuilder requires the Umbraco.Compat7 layer in order not to crash the whole thing entirely as it is not (yet) fully compatible with v8.
The Umbraco.Compat7 project is part of the v8 solution but is not copied to the Umbraco.Web.UI ~/bin by default. It can be copied by Umbraco.Compat7.csproj (see the AfterBuild target) if the COMPAT7 conditional compilation symbol is defined.
Turns out that in DEBUG that symbol is defined, but not in RELEASE - are you by chance building in RELEASE mode? I probably need to activate the copy for both modes. Let me know and I'll fix & update the previous post.
Getting Umbraco 8 source to build and run
Hey Core Team!
So today I got into discussions with my dev team about the future of Umbraco and v8 in particular and we had a few assumptions that we wanted to validate so decided to try and get the V8 code to build and run.
Our checkout was from https://github.com/umbraco/Umbraco-CMS/tree/dev-v8
The solution builds but wont run. The specific errors we are getting are as follows.
1. System.IO.FileNotFoundException: Could not load file or assembly 'UrlRewritingNet.UrlRewriter' or one of its dependencies. The system cannot find the file specified.
The package is in the packages.config file but there is no reference to it in the project?
If we reference this dll that is in the packages folders we can get past this issue. We build and go again.
2. Could not load file or assembly 'ImageProcessor, Version=2.4.5.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Next issue is ImageProcessor is referenced but the reference is broken so we remove and add it again. This resolves this issue. We build and go again.
3. The following errors occurred while attempting to load the app. - The OwinStartupAttribute.FriendlyName value 'UmbracoDefaultOwinStartup' does not match the given value 'SignalRStartup' in Assembly 'umbraco, Version=1.0.6177.30603, Culture=neutral, PublicKeyToken=null'. - The given type or method 'SignalRStartup' was not found. Try specifying the Assembly. To disable OWIN startup discovery, add the appSetting owin:AutomaticAppStartup with a value of "false" in your web.config. To specify the OWIN startup Assembly, Class, or Method, add the appSetting owin:AppStartup with the fully qualified startup class or configuration method name in your web.config.
And this is where we get stuck and will need a bit of help on what next. We have tried to simply change the web.config key to specify UmbracoDefaultOwinStartup instead of SignalRStartup but we hit a different issue where it simple says
Boot failed. Umbraco cannot run. Umbraco's log file contains details about what caused the boot to fail.
The log looks like this
So this is where we are at. From what I can see in the logs looks related to Database? We have not reached the installer at this point so nothing is configured in the web.config
Any help getting this up and running would be amazing.
thanks in advance
Peter
Quick answers:
Point 1 and 2 are probably simple things - the solution should always build, but I keep working on the same VS solution and maybe when you start from scratch some things are missing. Will try to checkout and rebuild and see what happens, and fix.
Point 3 is again probably something silly: my own web.config which has been manually tweaked contains everything that is needed but I probably need to update the web.config template that ships with a fresh clone.
And then for the last part: the boot process has been refactored and I'm actually happy to see that you have seen the correct message, and immediately found the relevant part in the log. What that parts says is that, again, when merging a few days ago I made a mistake. Fixed on my machine.
So all in all, depending on how much time I get, it should all be fixed within a day or two.
Thanks for the quick response Stephen. I know how it can be to have a build that works in your dev environment and when you hand it off to other devs it fails because you forgot to include or exclude something.
We are looking forward to having a look around and are willing to contribute where we can. Will take a look later in the week once you have committed the update with the fixes.
Peter :-)
The latest working v8 build is available from the artifacts here: https://ci.appveyor.com/project/Umbraco/umbraco-cms-hs8dx/build/5495
edit: I guess the boot will fail on that one too though :)
A friendly reminder: please note that looking at v8 now is premature and a lot is yet to change. There's no need to start stressing out about it now. :-)
Nah not stressing. Just interested.
Yes we know it will change.
So premature yes as in it's not ready for anything. Premature no from the point of view that we would be silly to not look over the horizon once in a while. Besides isn't early validation a good thing?
Keep up the good work.
Certainly a good thing! I just speak to too many people getting scared that they need to prepare for the future while the future in this case is quite uncertain. So just trying to manage the expectations a little bit!
Latest code in
dev-v8
should build and install and run. Caveats:From there it should be working although I have some little-tested work-in-progress in the persistence layer that could very well break a few things.
DISCLAIMER: What You See Is Not What You'll Get
Feel free to look at the code, test everything - all ears for questions, ideas, comments and suggestions. But do not expect the code and APIs to remain stable, and be ready for nasty breaking changes now and then.
Enjoy!
How do you disable ModelsBuilder effectively? I set enabled to false in my web.config but.. computer says no:
Umbraco.Core.Exceptions.BootFailedException: Boot failed. ---> System.Reflection.ReflectionTypeLoadException: Could not load all types from "Umbraco.ModelsBuilder, Version=8.0.0.2, Culture=neutral, PublicKeyToken=null" due to LoaderExceptions, skipping: . System.IO.FileNotFoundException: Could not load file or assembly 'Umbraco.Compat7, Version=1.0.6106.21780, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
ModelsBuilder requires the Umbraco.Compat7 layer in order not to crash the whole thing entirely as it is not (yet) fully compatible with v8.
The Umbraco.Compat7 project is part of the v8 solution but is not copied to the Umbraco.Web.UI
~/bin
by default. It can be copied byUmbraco.Compat7.csproj
(see theAfterBuild
target) if theCOMPAT7
conditional compilation symbol is defined.Turns out that in DEBUG that symbol is defined, but not in RELEASE - are you by chance building in RELEASE mode? I probably need to activate the copy for both modes. Let me know and I'll fix & update the previous post.
Aha! Correct, I'm running
build.bat
which runs it inRELEASE
mode! :)And since AppVeyor will also run in release mode, it should make sure those artifacts work as well!
is working on a reply...