I was just introduced to Ninject yesterday and am loving it so far!
Along with other fun, I got some samples to run that demonstrate the capabilities of the factory extension. However, to get these samples to run I've had to put the following in an app.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<loadFromRemoteSources enabled="true"/>
</runtime>
</configuration>
Otherwise, I get the following error:
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Dev\Prototypes\Ninject\Nin
jectPrototypes\Factory1\bin\Debug\Ninject.Extensions.Factory.dll' or one of its dependencies. Operation is not supported
. (Exception from HRESULT: 0x80131515) ---> System.NotSupportedException: An attempt was made to load an assembly from a
network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This
release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not
intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?Li
nkId=155569 for more information.
I'm attempting to run the 3.0.2.13 Ninject.dll binary and the 3.0.2.6 Ninject.Extensions.Factory.dll which are compatible according to the teamcity site. Aside from the app.config setting (which I fear might cause my Ninject pitch to get shot down), are you aware of any way around the error?
This occurred when I ran from both C:\Dev\XYZ as well as D:\Dev\XYZ. So I'm not actually running it off a network mount as the error sounds like.
Any advice would be appreciated!
Matt
--
You received this message because you are subscribed to the Google Groups "ninject" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninject+u...@googlegroups.com.
To post to this group, send email to nin...@googlegroups.com.
Visit this group at http://groups.google.com/group/ninject?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.