Merge pull request #796 from PowerShell/vors/add-type

Make Add-Type work without a flat folder structure
This commit is contained in:
Andy Schwartzmeyer authored and Andrew Schwartzmeyer committed 2016-04-08 21:41:30 -07:00
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 -1
View File
@@ -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
}
}