email module seems to break the command line

Jan 29, 2011 at 3:23 AM

I get the following error on the command line if when email module is installed.

 C:\inetpub\orchard\bin>orchard

Initializing Orchard session. (This might take a few seconds...)

 Error starting up Orchard command line host

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

 c:\inetpub\orchard\Modules\Orchard.Email\Services\EmailMessagingChannel.cs(37):

error CS1674: 'System.Net.Mail.SmtpClient': type used in a using statement must be implicitly convertible to 'System.IDisposable'

 

Exception Details: System.Web.HttpCompileException: c:\inetpub\orchard\Modules\Orchard.Email\Services\EmailMessagingChannel.cs(37): error CS1674: 'System.Net.Mail.SmtpClient': type used in a using statement must be implicitly convertible to

'System.IDisposable'

 Stack Trace:

 [HttpCompileException: c:\inetpub\orchard\Modules\Orchard.Email\Services\EmailMessagingChannel.cs(37): error CS1674: 'System.Net.Mail.SmtpClient': type used in a using statement must be implicitly convertible to 'System.IDisposable']

   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, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)

   at System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp,Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)

   at System.Web.Compilation.BuildManager.GetVPathBuildResult(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean ensureIsUpToDate)

   at System.Web.Compilation.BuildManager.GetCompiledAssembly(String virtualPath)

   at Orchard.Environment.Extensions.Loaders.DynamicExtensionLoader.LoadWorker(ExtensionDescriptor descriptor) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\Extensions\Loaders\DynamicExtensionLoader.cs:line 173

   at Orchard.Environment.Extensions.ExtensionManager.BuildEntry(ExtensionDescriptor descriptor) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 132

   at Orchard.Environment.Extensions.ExtensionManager.<>c__DisplayClass18.<LoadFeature>b__13(AcquireContext`1 ctx) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 83

   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Caching\Cache.cs:line 41

   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key,Func`2 addValueFactory, Func`3 updateValueFactory)

   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Caching\Cache.cs:line 15

   at Orchard.Environment.Extensions.ExtensionManager.LoadFeature(FeatureDescriptor featureDescriptor) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 82

 [OrchardException: Error while loading extension 'Orchard.Email'.]

   at Orchard.Environment.Extensions.ExtensionManager.LoadFeature(FeatureDescriptor featureDescriptor) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 116

   at Orchard.Caching.Cache`2.CreateEntry(TKey k, Func`2 acquire) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Caching\Cache.cs:line 41

   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key,

Func`2 addValueFactory, Func`3 updateValueFactory)

   at Orchard.Caching.Cache`2.Get(TKey key, Func`2 acquire) in d:\TeamCity\Projects\Orchard-1.x\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`1featureDescriptors) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\Extensions\ExtensionManager.cs:line 70

   at Orchard.Environment.ShellBuilders.CompositionStrategy.Compose(ShellSettings settings, ShellDescriptor descriptor) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\ShellBuilders\CompositionStrategy.cs:line 36

   at Orchard.Environment.ShellBuilders.ShellContextFactory.CreateShellContext(ShellSettings settings) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\ShellBuilders\ShellContextFactory.cs:line 60

   at Orchard.Environment.DefaultOrchardHost.<CreateAndActivate>b__1(ShellSettings settings) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:line 100

   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-1.x\src\Orchard\Environment\DefaultOrchardHost.cs:line 88

   at Orchard.Commands.CommandHostAgent.StartHost(TextReader input, TextWriter output) in d:\TeamCity\Projects\Orchard-1.x\src\Orchard\Commands\CommandHostAgent.cs:line 116

 Failed to initialize Orchard session.

C:\inetpub\orchard\bin>

Jan 30, 2011 at 2:14 PM
Edited Jan 30, 2011 at 2:16 PM
I've seen thesameproblem, but it's intermittent and I can get it working within a few tries. There is an open issue in the tracker for it. http://orchard.codeplex.com/workitem/17246