Skip to content
Closed
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
| |Ubuntu 14.04 |Windows |
|---------|:------:|:------:|
|master| TODO |[![Build status](https://ci.appveyor.com/api/projects/status/wb0a0apbn4aiccp1/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/powershell-linux/branch/master)|
|dnx451| TODO |[![Build status](https://ci.appveyor.com/api/projects/status/wb0a0apbn4aiccp1/branch/dnx451?svg=true)](https://ci.appveyor.com/project/PowerShell/powershell-linux/branch/dnx451)|


## Obtain the source code
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd ../..

# Publish PowerShell
cd src/Microsoft.PowerShell.Linux.Host
dotnet publish --framework dnxcore50 --output $BIN
dotnet publish --framework dnx451 --output $BIN
# Copy files that dotnet-publish does not currently deploy
cp *_profile.ps1 $BIN
cd ../..
Expand Down
8 changes: 2 additions & 6 deletions src/Microsoft.Management.Infrastructure.Native/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
"compilationOptions": { "allowUnsafe": true },

"dependencies": {
"NETStandard.Library": "1.0.0-rc2-23712",
"System.Security.SecureString": {
"type": "build",
"version": "1.0.0-*"
}
},

"frameworks": { "dnxcore50": { } }
"dnx451": {},
"frameworks": { "dnx451": { } }
}
12 changes: 4 additions & 8 deletions src/Microsoft.Management.Infrastructure/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,16 @@
},

"dependencies": {
"NETStandard.Library": "1.0.0-rc2-23712",
"System.Runtime.Serialization.Xml": "4.1.0-rc2-23712",
"System.Threading.ThreadPool": "4.0.10-rc2-23712",

"Microsoft.Management.Infrastructure.Native" : {
"type": "build",
"version": "1.0.0-*"
},
"System.Security.SecureString": {
"type": "build",
"version": "1.0.0-*"
}

},

"frameworks": { "dnxcore50": { } },
"dnx451": {},
"frameworks": { "dnx451": { } },

"compileFiles": [
"../monad/wmi/WMIv2/Client/DotNetAPI/cs/AssemblyInfo.cs",
Expand Down
27 changes: 14 additions & 13 deletions src/Microsoft.PowerShell.Commands.Management/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,24 @@

"compilationOptions": {
"define": [
"CORECLR",
"_CORECLR",
"LINUX"

],
"allowUnsafe": true
},

"dependencies": {
"NETStandard.Library": "1.0.0-rc2-23712",
"System.ServiceProcess.ServiceController": "4.1.0-rc2-23712",
"System.Net.NameResolution": "4.0.0-rc2-23712",
"Microsoft.PowerShell.Security": {
"type": "build",
"version": "1.0.0-*"
}
"Microsoft.PowerShell.Security": {
"type": "build",
"version": "1.0.0-*"
},
},

"frameworks": { "dnxcore50": { } },
"dnx451": {},
"frameworks": { "dnx451": {
"frameworkAssemblies": {
"System.ServiceProcess": "4.0.0.0",
},
} },

"compile": [ "../windows-build/gen/COMMANDS_MANAGEMENT/*.cs" ],

Expand Down Expand Up @@ -55,7 +55,6 @@
"../monad/monad/src/commands/management/ClearPropertyCommand.cs",
"../monad/monad/src/commands/management/CombinePathCommand.cs",
"../monad/monad/src/commands/management/CommandsCommon.cs",
"../monad/monad/src/commands/management/Computer.cs",
"../monad/monad/src/commands/management/ContentCommandBase.cs",
"../monad/monad/src/commands/management/ConvertPathCommand.cs",
"../monad/monad/src/commands/management/CopyPropertyCommand.cs",
Expand All @@ -77,7 +76,9 @@
"../monad/monad/src/commands/management/Service.cs",
"../monad/monad/src/commands/management/SetContentCommand.cs",
"../monad/monad/src/commands/management/SetPropertyCommand.cs",
"../monad/monad/src/commands/management/WriteContentCommandBase.cs"
"../monad/monad/src/commands/management/WriteContentCommandBase.cs",


],

"namedResource": {
Expand Down
10 changes: 10 additions & 0 deletions src/Microsoft.PowerShell.Commands.Omi/OmiInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,22 @@ internal static class Platform
{
internal static bool IsLinux()
{
#if CORECLR
return RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
#else
// FullCLR doesn't have a Linux version
return false;
#endif
}

internal static bool IsWindows()
{
#if CORECLR
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
#else
// FullCLR has only Windows version
return true;
#endif
}
}

Expand Down
6 changes: 2 additions & 4 deletions src/Microsoft.PowerShell.Commands.Omi/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
"authors": [ "George Fleming", "andschwa" ],

"dependencies": {
"NETStandard.Library": "1.0.0-rc2-23712",
"System.Xml.XDocument": "4.0.11-rc2-23712",
"System.Runtime.InteropServices": "4.0.21-rc2-23712",
"System.Management.Automation": {
"type": "build",
"version": "1.0.0-*"
}
},

"frameworks": { "dnxcore50": { } }
"dnx451": {},
"frameworks": { "dnx451": { } }
}
7 changes: 2 additions & 5 deletions src/Microsoft.PowerShell.Commands.Utility/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,19 @@

"compilationOptions": {
"define": [
"CORECLR",
"_CORECLR",
"LINUX"
],
"allowUnsafe": true
},

"dependencies": {
"NETStandard.Library": "1.0.0-rc2-23712",
"System.Management.Automation": {
"type": "build",
"version": "1.0.0-*"
}
},

"frameworks": { "dnxcore50": { } },
"dnx451": {},
"frameworks": { "dnx451": { } },

"compile": [ "../windows-build/gen/COMMANDS_UTILITY/*.cs" ],

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
"compilationOptions": { "define": [ "CORECLR", "LINUX" ] },

"dependencies": {
"NETStandard.Library": "1.0.0-rc2-23712",
"System.Runtime.Loader": "4.0.0-rc2-23712"
},

"frameworks": { "dnxcore50": { } }
"dnx451": {},
"frameworks": { "dnx451": { } }
}
3 changes: 3 additions & 0 deletions src/Microsoft.PowerShell.Linux.Host/main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,14 @@ public static class Program
/// </summary>
public static void Main(string[] args)
{
#if CORECLR
// Setup the Assembly Load Context, which Core PowerShell uses to
// analyze the libraries for types, functions, cmdlets, etc. and
// provide the ability to load assemblies by file path. Doing this
// here eliminates the need for a custom native host.

PowerShellAssemblyLoadContextInitializer.SetPowerShellAssemblyLoadContext(AppContext.BaseDirectory);
#endif

// Custom argument parsing
string initialScript = null;
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.PowerShell.Linux.Host/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
},

"dependencies": {
"NETStandard.Library": "1.0.0-rc2-23712",
"Newtonsoft.Json": "8.0.2",
"Microsoft.PowerShell.Commands.Management": {
"type": "build",
Expand All @@ -25,5 +24,6 @@
}
},

"frameworks": { "dnxcore50": { } }
"dnx451": {},
"frameworks": { "dnx451": { } }
}
8 changes: 3 additions & 5 deletions src/Microsoft.PowerShell.Security/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,20 @@

"compilationOptions": {
"define": [
"CORECLR",
"_CORECLR",
"LINUX"

],
"allowUnsafe": true
},

"dependencies": {
"NETStandard.Library": "1.0.0-rc2-23712",
"System.Management.Automation": {
"type": "build",
"version": "1.0.0-*"
}
},

"frameworks": { "dnxcore50": { } },
"dnx451": {},
"frameworks": { "dnx451": { } },

"compile": [ "../windows-build/gen/SECURITY/*.cs" ],

Expand Down
Loading