Guest User

Untitled

a guest
May 22nd, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. The assembly named 'Cosmos.Compiler.Assembler.X86' was loaded from 'file:///C:/Users/Geramy/AppData/Roaming/Cosmos User Kit/Build/VSIP/Cosmos.Compiler.Assembler.X86.DLL' using the LoadFrom context. The use of this context can result in unexpected behavior for serialization, casting and dependency resolution. In almost all cases, it is recommended that the LoadFrom context be avoided. This can be done by installing assemblies in the Global Assembly Cache or in the ApplicationBase directory and using Assembly.Load when explicitly loading assemblies.
  2.  
  3. line 83 in IL2CPUTask.cs
  4.  
  5. static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs args) {
  6. var xShortName = args.Name;
  7. if (xShortName.Contains(',')) {
  8. xShortName = xShortName.Substring(0, xShortName.IndexOf(','));
  9. // TODO: remove following statement if it proves unnecessary
  10. if (xShortName.Contains(',')) {
  11. throw new Exception("Algo error");
  12. }
  13. }
  14. foreach (var xDir in mSearchDirs)
  15. {
  16. var xPath = Path.Combine(xDir, xShortName + ".dll");
  17. if (File.Exists(xPath)) {
  18. return Assembly.LoadFrom(xPath); /* THIS IS THE ONE THAT ERROR-ED */
  19. }
  20. xPath = Path.Combine(xDir, xShortName + ".exe");
  21. if (File.Exists(xPath)) {
  22. return Assembly.LoadFrom(xPath);
  23. }
  24. }
  25. if (mStaticLog != null) {
  26. mStaticLog(string.Format("Assembly '{0}' not resolved!", args.Name));
  27. }
  28. return null;
  29. }
Add Comment
Please, Sign In to add comment