-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aWG-Maintainers-Buildspecific to affecting the buildspecific to affecting the build
Description
What's the correct way to reference System.Management.Automation? E.g., this snippet from project.json:
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0",
"Microsoft.AspNetCore.Routing": "1.0.0",
"System.Security.Cryptography.Algorithms": "4.2.0",
"System.Management.Automation": "6.1.7601.17514"
},
Works when you run dotnet restore in that it finds and claims to install the System.Management.Automation dependency (noting that .17515 isn't compatible with .NET Core). But you can't simply add a using in the code, or it says:
The type or namespace name 'Management' does not exist in the namespace 'System'
The intent here is to programmatically instantiate PowerShell in the code, but .NET Core is a bit restrictive in how it wants references handled...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Issue-Questionideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aideally support can be provided via other mechanisms, but sometimes folks do open an issue to get aWG-Maintainers-Buildspecific to affecting the buildspecific to affecting the build