diff --git a/src/vpm/config.cs b/src/vpm/config.cs index b99d66b..af374e9 100644 --- a/src/vpm/config.cs +++ b/src/vpm/config.cs @@ -64,6 +64,20 @@ public List ReferencedAssemblies if (string.IsNullOrWhiteSpace(lass.Location)) continue; _referencedAssemblies.Add(lass); } + var vpmfolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + foreach (var file in Directory.GetFiles(vpmfolder, "*.dll")) + { + Assembly ass; + try + { + ass = Assembly.LoadFrom(file); + } + catch (Exception e) + { + continue; + } + _referencedAssemblies.Add(ass); + } } return _referencedAssemblies; } diff --git a/src/vpm/scriptglobals.cs b/src/vpm/scriptglobals.cs index 601c206..2b2b9c6 100644 --- a/src/vpm/scriptglobals.cs +++ b/src/vpm/scriptglobals.cs @@ -205,7 +205,14 @@ public void Download(string src, string dst) } }; var dltask = client.DownloadFileTaskAsync(src, dst); - dltask.Wait(); + try + { + dltask.Wait(); + } + catch (Exception e) + { + Console.WriteLine("Problem with waiting for downloader. Skipping wait."); + } Console.ResetColor(); Console.WriteLine("Done"); } diff --git a/src/vpm/vpack.cs b/src/vpm/vpack.cs index c45e892..f0803d0 100644 --- a/src/vpm/vpack.cs +++ b/src/vpm/vpack.cs @@ -306,10 +306,20 @@ public void Install() globals: vpmglobal, options: ScriptOptions.Default.WithReferences(assemblies)); } - catch (CompilationErrorException e) + catch (Exception e) { - Console.WriteLine("Compilation error:"); - Console.WriteLine(string.Join(Environment.NewLine, e.Diagnostics)); + if (e is CompilationErrorException) + { + var ee = (CompilationErrorException) e; + Console.WriteLine("Compilation error:"); + Console.WriteLine(string.Join(Environment.NewLine, ee.Diagnostics)); + } + else + { + Console.WriteLine("Script error:"); + Console.WriteLine(e.Message); + Console.WriteLine(e.StackTrace); + } Console.WriteLine("Press any key to exit..."); Console.ReadKey(true); VpmUtils.CleanUp();