Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,282 changes: 1,042 additions & 1,240 deletions src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/CorePsTypeCatalog.cs

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions src/Microsoft.PowerShell.CoreCLR.Eventing/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@
"define": [ "CORECLR" ]
},
"dependencies": {
"NETStandard.Library": "1.5.0-rc2-23921",
"System.Security.Principal": "4.0.1-rc2-23921",
"System.Security.Principal.Windows": "4.0.0-rc2-23921",
"System.Diagnostics.TraceSource": "4.0.0-rc2-23921",
"System.Security.Principal": "4.0.1-rc2-23922",
"System.Security.Principal.Windows": "4.0.0-rc2-23922",
"System.Diagnostics.TraceSource": "4.0.0-rc2-23922",
"System.Security.SecureString": "1.0.0-*"
}
}
Expand Down
51 changes: 0 additions & 51 deletions src/TypeCatalogGen/Runtime/project.json

This file was deleted.

9 changes: 3 additions & 6 deletions src/TypeCatalogGen/build.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
. mono-snapshot mono
export DOTNET_REFERENCE_ASSEMBLIES_PATH=$MONO_PREFIX/lib/mono/xbuild-frameworks/

pushd Runtime
pushd ../TypeCatalogParser
dotnet restore
dotnet publish --output bin
dotnet run
popd

ls Runtime/bin/*.dll | sed ':a;N;$!ba;s/\n/;/g' > powershell.inc

dotnet restore
dotnet run CorePsTypeCatalog.cs powershell.inc
cp CorePsTypeCatalog.cs ../Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/
dotnet run ../Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/CorePsTypeCatalog.cs powershell.inc
35 changes: 35 additions & 0 deletions src/TypeCatalogParser/Main.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.IO;
using System.Linq;
using NuGet.Frameworks;
using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.ProjectModel;
using Microsoft.DotNet.ProjectModel.Graph;
using Microsoft.Extensions.DependencyModel.Resolution;

namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
// The TypeCatalogGen project takes this as input
var outputPath = "../TypeCatalogGen/powershell.inc";

// Get a context for our top level project
var context = ProjectContext.Create("../Microsoft.PowerShell.Linux.Host", NuGetFramework.Parse("netstandardapp1.5"));

System.IO.File.WriteAllLines(outputPath,
// Get the target for the current runtime
from t in context.LockFile.Targets where t.RuntimeIdentifier == Constants.RuntimeIdentifier
// Get the packages (not projects)
from x in t.Libraries where x.Type == "package"
// Get the real reference assemblies
from y in x.CompileTimeAssemblies where y.Path.EndsWith(".dll")
// Construct the path to the assemblies
select $"{context.PackagesDirectory}/{x.Name}/{x.Version}/{y.Path};");

Console.WriteLine($"List of reference assemblies written to {outputPath}");
}
}
}
26 changes: 26 additions & 0 deletions src/TypeCatalogParser/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilationOptions": {
"warningsAsErrors": true,
"emitEntryPoint": true
},

"dependencies": {
"Microsoft.DotNet.ProjectModel": "1.0.0-beta-*",
"Microsoft.DotNet.Cli.Utils": "1.0.0-beta-*"
},

"frameworks": {
"netstandardapp1.5": {
"imports": [ "dnxcore50", "portable-net45+win8" ]
}
},

"runtimes": {
"ubuntu.14.04-x64": { },
"centos.7.1-x64": { },
"win7-x64": { },
"win10-x64": { },
"osx.10.10-x64": { },
"osx.10.11-x64": { }
}
}
5 changes: 5 additions & 0 deletions test/powershell/DotNetInterop.Tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Describe ".NET class interoperability" {
It "Should access types in System.Console" {
[System.Console]::TreatControlCAsInput | Should Be $false
}
}