Command line broken after upgrading to 1.1

Topics: Troubleshooting
Apr 13, 2011 at 9:32 AM

I've upgraded my site (on my test server) to 1.1. All went well, except I need to enable recipes, but the command line is broken.

I get this error when trying to boot it up:

Error starting up Orchard command line host
--------------------------------------------------------------------------------

c:\Users\Richard\Garsonix\Projects\NogginBox\NogginBox1.1\Modules\Orchard.Packaging\Services\FileBas
eProjectSystem.cs(33): error CS0246: The type or namespace name 'FrameworkName' could not be found (
are you missing a using directive or an assembly reference?)

Exception Details: System.Web.HttpCompileException: c:\Users\Richard\Garsonix\Projects\NogginBox\Nog
ginBox1.1\Modules\Orchard.Packaging\Services\FileBaseProjectSystem.cs(33): error CS0246: The type or
 namespace name 'FrameworkName' could not be found (are you missing a using directive or an assembly
 reference?)

Stack Trace:

[HttpCompileException: c:\Users\Richard\Garsonix\Projects\NogginBox\NogginBox1.1\Modules\Orchard.Pac
kaging\Services\FileBaseProjectSystem.cs(33): error CS0246: The type or namespace name 'FrameworkNam
e' could not be found (are you missing a using directive or an assembly reference?)]
   at System.Web.Compilation.AssemblyBuilder.Compile()
   at System.Web.Compilation.BuildProvidersCompiler.PerformBuild()
   at System.Web.Compilation.BuildManager.CompileWebFile(VirtualPath virtualPath)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boole
an noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean
ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, Virtu
alPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean
throwIfNotFound, Boolean ensureIsUpToDate)
   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtu
alPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpTo
Date)
   at System.Web.Compilation.BuildManager.GetCompiledAssembly(String virtualPath)
   at Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader.LoadWorker(ExtensionDescriptor d
escriptor) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\Extensions\Loaders\Dynami
cExtensionLoader.cs:line 168
   at Orchard.Environment.Extensions.ExtensionManager.BuildEntry(ExtensionDescriptor descriptor) in
d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 136

   at Orchard.Environment.Extensions.ExtensionManager.<>c__DisplayClass18.<LoadFeature>b__13(Acquire
Context`1 ctx) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\Extensions\ExtensionM
anager.cs:line 87
   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in d:\TeamCity\Projects\Orchard-De
fault\src\Orchard\Caching\Cache.cs:line 41
   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFact
ory, Func`3 updateValueFactory)
   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in d:\TeamCity\Projects\Orchard-Default\
src\Orchard\Caching\Cache.cs:line 15
   at Orchard.Environment.Extensions.ExtensionManager.LoadFeature(FeatureDescriptor featureDescripto
r) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\Extensions\ExtensionManager.cs:li
ne 86

[OrchardException: Error while loading extension 'Orchard.Packaging'.]
   at Orchard.Environment.Extensions.ExtensionManager.LoadFeature(FeatureDescriptor featureDescripto
r) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\Extensions\ExtensionManager.cs:li
ne 120
   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in d:\TeamCity\Projects\Orchard-De
fault\src\Orchard\Caching\Cache.cs:line 41
   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFact
ory, Func`3 updateValueFactory)
   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in d:\TeamCity\Projects\Orchard-Default\
src\Orchard\Caching\Cache.cs:line 15
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Orchard.Environment.Extensions.ExtensionManager.LoadFeatures(IEnumerable`1 featureDescriptors)
 in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\Extensions\ExtensionManager.cs:line
 74
   at Orchard.Environment.ShellBuilders.CompositionStrategy.Compose(ShellSettings settings, ShellDes
criptor descriptor) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\ShellBuilders\Co
mpositionStrategy.cs:line 36
   at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings setting
s) in d:\TeamCity\Projects\Orchard-Default\src\Orchard\Environment\ShellBuilders\ShellContextFactory
.cs:line 60
   at Orchard.Environment.DefaultOrchardHost.<CreateAndActivate>b__4(ShellSettings settings) in d:\T
eamCity\Projects\Orchard-Default\src\Orchard\Environment\DefaultOrchardHost.cs:line 105
   at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()
   at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Orchard.Environment.DefaultOrchardHost.BuildCurrent() in d:\TeamCity\Projects\Orchard-Default\
src\Orchard\Environment\DefaultOrchardHost.cs:line 93
   at Orchard.Commands.CommandHostAgent.StartHost(TextReader input, TextWriter output) in d:\TeamCit
y\Projects\Orchard-Default\src\Orchard\Commands\CommandHostAgent.cs:line 116

--------------------------------------------------------------------------------

Failed to initialize Orchard session.

 

I followed the instructions in clean install, but have I missed something?

Coordinator
Apr 13, 2011 at 7:07 PM

Looks like a bug. If you want to e-mail me your site, I can take a look and we can have better repro data when we file the bug.

Apr 13, 2011 at 11:50 PM

Fixed!

I thought it might be caused by one of my custom modules so I disabled them all and it worked. Then I enabled them one by one to find the culprit, but after I'd enabled all of them it still worked.

So the slightly strange, but possibly predictable solution is; turn all you custom modules off and on again.

Jun 8, 2011 at 12:09 AM

I get a similar error but on a fresh install. Fixed by disabling TinyMCE, Media Picker and Blog modules

Coordinator
Jun 8, 2011 at 1:32 AM

This is the same bug as http://orchard.codeplex.com/workitem/17728.

Current workaround: Remove the following element from web.config:
<remove assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

"FrameworkName" is a new type added to "System, Version=4.0.0.0" which didn't exist in "System, Version=2.0.0.0"