StrataFrame Forum

DataBase Deployment Toolkit Error

http://forum.strataframe.net/Topic33519.aspx

By Buffie - 9/4/2017

I have not used this in a while but I need to change a table structure and I went to DataBase Deployment ToolKit and found the Database I needed to edit this morning and I get the following error.

TypeInitializationException
  The type initializer for 'MicroFour.StrataFrame.Business.DBEAssembliesBO' threw an exception.
FileNotFoundException
  Could not load file or assembly 'Microsoft.SqlServer.SqlEnum, Version=13.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
FileNotFoundException
  Could not load file or assembly 'Microsoft.SqlServer.SqlEnum, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.

Source     : StrataFrame BO

Stack Trace: 

   at MicroFour.StrataFrame.Business.DBEAssembliesBO..cctor()

   at MicroFour.StrataFrame.Business.DBEAssembliesBO..ctor(IContainer Container)
   at MicroFour.StrataFrame.Data.ProfileEditorDialog.InitializeComponent()
   at MicroFour.StrataFrame.Data.ProfileEditorDialog..ctor(Int32 ProfilePK)
   at MicroFour.StrataFrame.Data.DatabaseMain.OpenDialog(Int32 ProfilePK)
   at MicroFour.StrataFrame.Data.DatabaseMain.ShowProfileOpenDialog()
   at System.Windows.Forms.Timer.OnTick(EventArgs e)
   at System.Windows.Forms.Timer.TimerNativewindow.WndProc(Message& m)
   at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


It says it could not load "Microsoft.SqlServer.SqlEnum". I am not sure what to try? I know it exists on my machine as the image shows.
Any help would be appreciated. Win 10 Pro - Visual Studio 17
By Edhy Rijo - 9/4/2017

Hi Terry,
The DDT uses the Microsoft Shared Management Objects (SMO) and it looks like yours are not registered.

You could try to repair them via the Add/Remove program or re-download them from https://www.microsoft.com/en-us/download/details.aspx?id=52676 and install:
  • ENU\x64\SharedManagementObjects.msi
  • ENU\x86\SharedManagementObjects.msi



I would try to repair them first, the DDT uses a very specific version of the SMO.
By Buffie - 9/5/2017

I tried to repair the SMO and I tried to repair the whole SQLExpress installation and I still get the same error. I even downloaded a complete install package from Microsoft.

Is the next choice Uninstalling and reinstalling SQLExpress?
 
Ben, maybe you could chime in with any ideas you might have?

TIA.
By Buffie - 9/5/2017

Is there another way to find out if SMO has been installed or installed correctly?
TIA
By Buffie - 9/7/2017

This pretty well has gotten me completely Stopped. I have a new Win 10 Pro machine. I have reinstalled Win 10 and got all the required .Net Versions and tried installing SqlExpress2014 and I still don't get the SMO from Microsoft installed. I have completely reinstalled Win 10 Pro and then installed Visual Studio 2017 and got all the required .Net Versions and then installed SQLExpress2014 and I don't get the SMO from Microsoft installed. Of course without SMO Strataframe Database Deployment does not work. Can not proceed with BO's and so forth.

Does anybody have a clue as to what I should do??? 
TIA
By Edhy Rijo - 9/7/2017

Hi Terry,
Sorry I got pretty busy and forgot to post something here.

Please read the whole forum in this thread http://forum.strataframe.net/FindPost33478.aspx

If you haven't download and install my custom SF setup for Windows 10 and look at other threads for manually registering all the SF assemblies, I am almost sure this may fix your issue.

Sorry you had to go to trouble of re-installing everything, that is a major decision.
BigGrin
By Buffie - 9/7/2017

No problem. I think I have used all of the correct stuff but since I have a pretty clean vanilla machine I will go through it again. Thanks for the notes.
By Edhy Rijo - 9/7/2017

I believe my custom setup will install the SMO used by the DDT.

Also take a look at this post and download the SMO from there and see if that works for you.
http://forum.strataframe.net/FindPost32382.aspx

What version of SQL Server are you using?

Please let me know if it works.
By Buffie - 9/7/2017

SqlExpress 2014
Thanks for the other info. Will try tomorrow.
By Buffie - 9/8/2017

What makes me wonder about all of this is spelled out in the images. 
When I run Regedit and look under Local Machine - Software - Microsoft - Microsoft SQL Server, on my last development machine I had SMO but notice on the new machine SMO2.
What is going on with that?
By Edhy Rijo - 9/8/2017

Hi Terry,
So what is the status? did you install any of the SMO?
By Buffie - 9/8/2017

Not yet. I live in Florida and I am getting Prepared. May not get to it for awhile. I will let you know.
By Edhy Rijo - 9/8/2017

Hi Terry,
Sorry to hear that. 

Please be safe and good luck!!!
By Buffie - 9/14/2017

I am done dealing with Hurricane Irma and luckily no serious damage.
I also think I found the root of the problem. I built the new machine with a Ryzen Chip from AMD. When I tried to install the SMO you linked me to. I got a message that it was not supported by the chip. 
I have been in contact with the chip maker but have not heard anything.
So, be aware!
By Edhy Rijo - 9/14/2017

Hi Terry,

I am glad to hear you are OK.

Sorry to hear about the compatibility issues with the Ryzen Chip from AMD, that is not good.

Me personally prefer to use Intel processors all the time, there is always minor issues with AMD.
By Buffie - 9/14/2017

I have always used Intel until this one and I got Bit!
I'll let you know how things go.