Orchard settings resetting when debugging

Topics: General, Installing Orchard, Troubleshooting
Jan 9, 2013 at 9:49 AM

Hi

 

I've created an Orchard application, which I've deployed to Azure, however when debugging it, it occasionally resets everything so that I have to enter the site details (i.e. site name, admin user, database, etc.) all over again. Because I'm using an existing database, it ends up duplicating various things, so I end up with multiple admin users, multiple navigation menus, etc. Why is this happening, and is there a way I can prevent it?

 

Thanks

Jan 9, 2013 at 12:32 PM

It appears as if it's being caused by running ClickToBuildAzurePackage. Is this meant to happen?

Jan 10, 2013 at 9:19 AM
Edited Jan 10, 2013 at 9:19 AM

OK, I think I've found the problem. For some reason the unit tests that are run in ClickToBuildAzurePackage are causing it to "forget" the settings. If I comment out this bit from AzurePackage.proj:

 

<Target Name ="Test">
    <CreateItem Include="$(CloudRootFolder)\Tests\*Azure.Tests.*dll">
        <Output TaskParameter="Include" ItemName="TestAssemblies" />
    </CreateItem>
    <NUnit Assemblies="@(TestAssemblies)" ToolPath="$(LibFolder)\nunit" WorkingDirectory="$(MsDeployFolder)\bin" /> 
</Target>
 

 

It works fine. I assume it's got something to do with the unit tests creating another instance of the storage emulator or something, but I don't know.