per-samuelsson / Misc

Just anything - snippets, docs that are are WIP, etc
0 stars 0 forks source link

System.NullReferenceException when trying to start a code host #5

Closed miyconst closed 7 years ago

miyconst commented 7 years ago
using System;
using Xunit;
using Starcounter;
using Starcounter.Hosting;

namespace Listonosz.XTests
{
    public class DatabaseTest
    {
        [Fact]
        public void DatabaseAccessTest()
        {
            ICodeHost host = new AppHostBuilder().UseDefaultDatabase().UseApplication(typeof(DatabaseTest).Assembly).Build();

            host.Start();

            host.Dispose();
        }
    }
}
[8/24/2017 8:33:05 AM Warning] System.NullReferenceException: Object reference not set to an instance of an object.
   at Starcounter.Hosting.RuntimeHosts.SelfHosted.LifetimeService.System.IDisposable.Dispose()
   at Starcounter.Hosting.SelfHostedCodeHost.Finalize()
   at Starcounter.Hosting.RuntimeHosts.SelfHosted.LifetimeService.System.IDisposable.Dispose()
   at Starcounter.Hosting.SelfHostedCodeHost.Finalize()
Starcounter-Develop-2.4.0.2608 (Aug 22, 2017 1:01:50 AM)
per-samuelsson commented 7 years ago

https://github.com/Starcounter/RebelsLounge/issues/171