• Advertisement
Sign in to follow this  

[.net] TypeInitializationException

This topic is 3980 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I have created a simple C# program. Everything was working fine while creating this project. But after I deployed my project (using ClickOnce) and tried to install and to run it, I get TypeInitializationException. Here is the information of the thrown exception: System.TypeInitializationException was unhandled Message="The type initializer for 'Visata.Program' threw an exception." Source="Visata" TypeName="Visata.Program" StackTrace: at Visata.Program.Main() at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args) at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel) at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly() at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData) at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() Why does this happen and how to solve it? Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement