I'm trying to do a web page where you can browse through folders. i have done this in separate solution and it all works, but when i tried to integrate it in solution with more then one project who are also referencing PostSharp I get this error:
Unhandled exception (2.1.7.1, 32 bit, CLR 4.0, Release): System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\_projects\...\Libraries\SharpSvn\SharpSvn.dll' or one of its dependencies. The system cannot find the file specified.
File name: 'file:///C:\_projects\...\Libraries\SharpSvn\SharpSvn.dll'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.ReflectionOnlyLoadFrom(String assemblyFile)
at PostSharp.Sdk.CodeModel.ModuleDeclaration.GetSystemModule()
at PostSharp.Sdk.CodeModel.Domain.LoadAssembly(Assembly reflectionAssembly, Boolean lazyLoading)
at PostSharp.Sdk.CodeModel.Domain.GetAssembly(IAssemblyName assemblyName, BindingOptions bindingOptions)
at PostSharp.Sdk.CodeModel.AssemblyRefDeclaration.GetAssemblyEnvelope()
at PostSharp.Sdk.Extensibility.Tasks.MulticastAttributeTask.^SgrhoGlQ(AssemblyRefDeclaration _0)
at PostSharp.Sdk.Extensibility.Tasks.MulticastAttributeTask.^+GwnKh4ZYHu3()
at PostSharp.Sdk.Extensibility.Tasks.MulticastAttributeTask.Execute()
at PostSharp.Sdk.Extensibility.Project.ExecutePhase(String phase)
at PostSharp.Sdk.Extensibility.Project.Execute()
at PostSharp.Hosting.PostSharpObject.ExecuteProjects()
at PostSharp.Hosting.PostSharpObject.InvokeProject(ProjectInvocation projectInvocation)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].
I wrote: "when i comment this method the error is gone: static void SVN_SSL_Override(object sender, SharpSvn.Security.SvnSslServerTrustEventArgs e) { e.AcceptedFailures = e.Failures; e.Save = true; } "
don't know why but there was the problem so i removed:
client.Authentication.Clear(); client.Authentication.SslServerTrustHandlers += new EventHandler(SVN_SSL_Override); client.Authentication.DefaultCredentials = new NetworkCredential("", "");
and this method
static void SVN_SSL_Override(object sender, SharpSvn.Security.SvnSslServerTrustEventArgs e) { e.AcceptedFailures = e.Failures; e.Save = true; } "
and just added:
client.Authentication.UserNamePasswordHandlers += delegate(object obj, SharpSvn.Security.SvnUserNamePasswordEventArgs args) { args.UserName = ""; args.Password = ""; args.Save = true; };
and now it works.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments