mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Merge pull request #796 from PowerShell/vors/add-type
Make Add-Type work without a flat folder structure
This commit is contained in:
commit
fde82fdf46
2 files changed
+3
-2
No files matched your search
@@ -1059,8 +1059,9 @@ namespace Microsoft.PowerShell.Commands
|
||||
private static PortableExecutableReference ObjectImplementationAssemblyReference =
|
||||
MetadataReference.CreateFromFile(typeof(object).GetTypeInfo().Assembly.Location);
|
||||
|
||||
// This assembly should be System.Runtime.dll
|
||||
private static PortableExecutableReference ObjectDeclaredAssemblyReference =
|
||||
MetadataReference.CreateFromFile(System.IO.Path.Combine(FrameworkFolder, "System.Runtime.dll"));
|
||||
MetadataReference.CreateFromFile(ClrFacade.GetAssemblies(typeof(object).FullName).First().Location);
|
||||
|
||||
private static MetadataReference[] defaultAssemblies = new MetadataReference[]
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Describe "Add-Type" {
|
||||
It "Should not throw given a simple class definition" -Skip {
|
||||
It "Should not throw given a simple class definition" {
|
||||
{ Add-Type -TypeDefinition "public static class foo { }" } | Should Not Throw
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user