Skip to content

Commit

Permalink
Fix designer DLL not found when NUGET_PACKAGES is set
Browse files Browse the repository at this point in the history
  • Loading branch information
IceCryptonym committed Jul 17, 2023
1 parent 9d3c5d9 commit 6430e1d
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 6430e1d

Please sign in to comment.