-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
9 msbuild integration does not work under linux (#10)
- Loading branch information
1 parent
1189e16
commit 2328544
Showing
10 changed files
with
146 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/dotnet.nugit/Services/Workspace/CustomAssemblyLoadContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
namespace dotnet.nugit.Services.Workspace | ||
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Reflection; | ||
using System.Runtime.Loader; | ||
|
||
public class CustomAssemblyLoadContext : AssemblyLoadContext | ||
{ | ||
private readonly Dictionary<AssemblyName, Assembly> assemblies = new(); | ||
|
||
protected override Assembly Load(AssemblyName assemblyName) | ||
{ | ||
return this.assemblies.GetValueOrDefault(assemblyName)!; | ||
} | ||
|
||
public void CacheAssembly(AssemblyName assemblyName, Assembly assembly) | ||
{ | ||
ArgumentNullException.ThrowIfNull(assemblyName); | ||
ArgumentNullException.ThrowIfNull(assembly); | ||
|
||
this.assemblies.Add(assemblyName, assembly); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters