4 Replies - 784 Views - Last Post: 26 October 2016 - 01:34 PM

#1 jmaslaki  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 9
  • Joined: 02-February 16

An unhandled exception of type 'System.Security.SecurityException&

Posted 26 October 2016 - 01:09 PM

I've never had this problem until now. It gives me an error at this constructor(I think it's called)

Posted Image

Like what? All I remember doing up to this point was this.

I kept getting an error something like SignTool.exe not found, or something. So I went to the control panel, programs, and tried "Repairing" Visual Studio 2015. I decided to cancel, and it did not stop cancelling, so I restarted my computer, and to my surprise it still was in the repair "process" so I couldn't start up the program. So I was forced to terminate the 'vs_community' processes with Ctrl+Alt+Delete. Then now when I try to run my game it just gives me the error:

"An unhandled exception of type 'System.Security.SecurityException' occurred in MonoGame.Framework.dll"

Here's extra exception details:

System.Security.SecurityException was unhandled
HResult=-2146233078
Message=Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
Source=MonoGame.Framework
StackTrace:
at MonoGame.Framework.WinFormsGamePlatform..ctor(Game game)
at Microsoft.Xna.Framework.GamePlatform.Create(Game game)
at Microsoft.Xna.Framework.Game..ctor()
at Game1.Game1..ctor()
at Game1.Program.Main()
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.nExecuteAssembly(RuntimeAssembly 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 System.Activator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:


I would extremely appreciate it if you could help, you'd be my hero. I've been working on this game for months and I was right about to release a test demo for people, and this happens...

Is This A Good Question/Topic? 0
  • +

Replies To: An unhandled exception of type 'System.Security.SecurityException&

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13389
  • View blog
  • Posts: 53,429
  • Joined: 12-June 08

Re: An unhandled exception of type 'System.Security.SecurityException&

Posted 26 October 2016 - 01:18 PM

First lesson learned - if something is installing/uninstalling/repairing, killing that process beore it has time to finish is a bad idea.

Did you go through the repair process a second time and let it be to finish?
Was This Post Helpful? 0
  • +
  • -

#3 jmaslaki  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 9
  • Joined: 02-February 16

Re: An unhandled exception of type 'System.Security.SecurityException&

Posted 26 October 2016 - 01:25 PM

View Postmodi123_1, on 26 October 2016 - 01:18 PM, said:

First lesson learned - if something is installing/uninstalling/repairing, killing that process beore it has time to finish is a bad idea.

Did you go through the repair process a second time and let it be to finish?


Yeah... and yes. I just did that, and it's still giving me the same problem, even if I run it as administrator.
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 13389
  • View blog
  • Posts: 53,429
  • Joined: 12-June 08

Re: An unhandled exception of type 'System.Security.SecurityException&

Posted 26 October 2016 - 01:28 PM

Find what version of the monogame framework it is pointing at. If 'local' uncheck that.
Was This Post Helpful? 0
  • +
  • -

#5 jmaslaki  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 9
  • Joined: 02-February 16

Re: An unhandled exception of type 'System.Security.SecurityException&

Posted 26 October 2016 - 01:34 PM

View Postmodi123_1, on 26 October 2016 - 01:28 PM, said:

Find what version of the monogame framework it is pointing at. If 'local' uncheck that.


Sorry to ask, but how? I don't know how to get to that menu/point.

Also, something important to note, my other game works fine and can run normally. But this specific project won't run due to that error.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1