New Posts New Posts RSS Feed: TypeInitializationException
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

TypeInitializationException

 Post Reply Post Reply
Author
Warren View Drop Down
Newbie
Newbie
Avatar

Joined: 03-Oct-2007
Location: United States
Posts: 2
Post Options Post Options   Quote Warren Quote  Post ReplyReply Direct Link To This Post Topic: TypeInitializationException
    Posted: 04-Oct-2007 at 9:11am
Aha - that was it.
The reason that it's often forgotten is that you do the Publish setup in Visual Studio, that dll doesn't appear in the list.
 
Thanks for the help.
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 04-Oct-2007 at 8:14am
Your application runs fine on your development system because the required IdeaBlade assemblies are already installed in the Global Assembly Cache (GAC).  When you use Click-Once, you must make sure to include these same required assemblies.
 
The one assembly that is most often forgotten is IdeaBlade.Persistence.Server.dll.  See if this assembly exists in your deployment directory.  If not, copy this assembly, and retry running your application.
Back to Top
Linguinut View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14-Jun-2007
Location: United States
Posts: 394
Post Options Post Options   Quote Linguinut Quote  Post ReplyReply Direct Link To This Post Posted: 03-Oct-2007 at 5:58pm
Hey Warren,
 
Is there a named instance involved?  If so, you may have to specify it in the ibconfig file.
 
Also, I run a database connection check when the app launches.  That just helps me tackle those pesky connection issues up front.
 
Bill
Back to Top
Warren View Drop Down
Newbie
Newbie
Avatar

Joined: 03-Oct-2007
Location: United States
Posts: 2
Post Options Post Options   Quote Warren Quote  Post ReplyReply Direct Link To This Post Posted: 03-Oct-2007 at 5:13pm
I'm attempting my first deployment - a C# Console app to reside on the same computer as the database server. It works fine on my development system, connected to a copy of the database residing on the same system. The development system connects to database server (local), and that's what's in IdeaBlade.ibconfig. It doesn't look to me like anything in the config file would need to be changed.
 
So I publish and install on the server using Click Once, and the program starts up fine when I try to run it. However, soon after, as I try to use the PersistenceManager to fetch the first object from the database, it blows up with a TypeInitializationException.
 
Am I missing something obvious? (BTW, this is with version 3.5.3.1)
 
Thanks for any help you can give.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down