Skip to content

Commit

Permalink
Merge pull request #29 from IceCryptonym/main
Browse files Browse the repository at this point in the history
Fix designer DLL not found when NUGET_PACKAGES is set
  • Loading branch information
kuiperzone committed Jul 22, 2023
2 parents 9d3c5d9 + 6430e1d commit 81032e6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions AvantGarde/Loading/RemoteLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,15 @@ public static PathItem FindDesignerHost(string? version)
// ~/.nuget/packages/avalonia/<avalonia-version>/tools/netcoreapp2.0/designer/Avalonia.Designer.HostApp.dll
if (!string.IsNullOrWhiteSpace(version))
{
string src = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
string? src = Environment.GetEnvironmentVariable("NUGET_PACKAGES");

if (string.IsNullOrEmpty(src))
{
src = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
src = Path.Combine(src, ".nuget");
src = Path.Combine(src, "packages");
}

src = Path.Combine(src, ".nuget");
src = Path.Combine(src, "packages");
src = Path.Combine(src, "avalonia");
src = Path.Combine(src, version);
src = Path.Combine(src, "tools");
Expand Down

0 comments on commit 81032e6

Please sign in to comment.