{"action":"created","issue":{"url":"https://api.github.com/repos/nightroman/Invoke-Build/issues/31","repository_url":"https://api.github.com/repos/nightroman/Invoke-Build","labels_url":"https://api.github.com/repos/nightroman/Invoke-Build/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/nightroman/Invoke-Build/issues/31/comments","events_url":"https://api.github.com/repos/nightroman/Invoke-Build/issues/31/events","html_url":"https://github.com/nightroman/Invoke-Build/issues/31","id":172339047,"number":31,"title":"OSS Posh: ConsoleColor Assembly Issues","user":{"login":"zloeber","id":4702624,"avatar_url":"https://avatars.githubusercontent.com/u/4702624?v=3","gravatar_id":"","url":"https://api.github.com/users/zloeber","html_url":"https://github.com/zloeber","followers_url":"https://api.github.com/users/zloeber/followers","following_url":"https://api.github.com/users/zloeber/following{/other_user}","gists_url":"https://api.github.com/users/zloeber/gists{/gist_id}","starred_url":"https://api.github.com/users/zloeber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zloeber/subscriptions","organizations_url":"https://api.github.com/users/zloeber/orgs","repos_url":"https://api.github.com/users/zloeber/repos","events_url":"https://api.github.com/users/zloeber/events{/privacy}","received_events_url":"https://api.github.com/users/zloeber/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-08-21T20:17:24Z","updated_at":"2016-08-22T19:09:15Z","closed_at":"2016-08-22T18:43:39Z","body":"In answer to a comment you left on my blog here is the error I get when I try to run Invoke-Build.ps1 on Powershell 6.0 on my linux test server. I cannot dig into this just right now to find the equivalent .Net Core namespaces but I'll try to take a peek a bit later.\r\n\r\n> Add-Type : (9) : The type or namespace name 'ConsoleColor' could not be found (are you missing a using directive or an assembly reference?)\r\n(8) :   static public void RC() {if (_u != null) {try {_u.ForegroundColor = _c;} catch {}}}\r\n(9) : >>>       static public void SC(ConsoleColor c) {if (_u != null) {try {_c = _u.ForegroundColor; _u.ForegroundColor = c;} catch {_u = null;}}}\r\n(10) :  static public object List() {return new List<object>();}\r\nAt /vagrant/Invoke-Build/Invoke-Build.ps1:204 char:1\r\n+ Add-Type @'\r\n+ ~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Exception\r\n    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand\r\n\r\nAdd-Type : (5) : The type or namespace name 'ConsoleColor' could not be found (are you missing a using directive or an assembly reference?)\r\n(4) : public class IB {\r\n(5) : >>>       [ThreadStatic] static ConsoleColor _c;\r\n(6) :   [ThreadStatic] static PSHostRawUserInterface _u;\r\nAt /vagrant/Invoke-Build/Invoke-Build.ps1:204 char:1\r\n+ Add-Type @'\r\n+ ~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Exception\r\n    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand\r\n\r\nAdd-Type : (8) : The type 'ConsoleColor' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Console, Version=4.0.0.0, Culture=neutral,\r\nPublicKeyToken=b03f5f7f11d50a3a'.\r\n(7) :   static public void Init(PSHost h) {if (h.UI != null) _u = h.UI.RawUI;}\r\n(8) : >>>       static public void RC() {if (_u != null) {try {_u.ForegroundColor = _c;} catch {}}}\r\n(9) :   static public void SC(ConsoleColor c) {if (_u != null) {try {_c = _u.ForegroundColor; _u.ForegroundColor = c;} catch {_u = null;}}}\r\nAt /vagrant/Invoke-Build/Invoke-Build.ps1:204 char:1\r\n+ Add-Type @'\r\n+ ~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Exception\r\n    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand\r\n\r\nAdd-Type : (9) : The type 'ConsoleColor' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Console, Version=4.0.0.0, Culture=neutral,\r\nPublicKeyToken=b03f5f7f11d50a3a'.\r\n(8) :   static public void RC() {if (_u != null) {try {_u.ForegroundColor = _c;} catch {}}}\r\n(9) : >>>       static public void SC(ConsoleColor c) {if (_u != null) {try {_c = _u.ForegroundColor; _u.ForegroundColor = c;} catch {_u = null;}}}\r\n(10) :  static public object List() {return new List<object>();}\r\nAt /vagrant/Invoke-Build/Invoke-Build.ps1:204 char:1\r\n+ Add-Type @'\r\n+ ~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Exception\r\n    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand\r\n\r\nAdd-Type : (9) : The type 'ConsoleColor' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Console, Version=4.0.0.0, Culture=neutral,\r\nPublicKeyToken=b03f5f7f11d50a3a'.\r\n(8) :   static public void RC() {if (_u != null) {try {_u.ForegroundColor = _c;} catch {}}}\r\n(9) : >>>       static public void SC(ConsoleColor c) {if (_u != null) {try {_c = _u.ForegroundColor; _u.ForegroundColor = c;} catch {_u = null;}}}\r\n(10) :  static public object List() {return new List<object>();}\r\nAt /vagrant/Invoke-Build/Invoke-Build.ps1:204 char:1\r\n+ Add-Type @'\r\n+ ~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidData: (Microsoft.Power...peCompilerError:AddTypeCompilerError) [Add-Type], Exception\r\n    + FullyQualifiedErrorId : SOURCE_CODE_ERROR,Microsoft.PowerShell.Commands.AddTypeCommand\r\n\r\nAdd-Type : Cannot add type. Compilation errors occurred.\r\nAt /vagrant/Invoke-Build/Invoke-Build.ps1:204 char:1\r\n+ Add-Type @'\r\n+ ~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidData: (:) [Add-Type], InvalidOperationException\r\n    + FullyQualifiedErrorId : COMPILER_ERRORS,Microsoft.PowerShell.Commands.AddTypeCommand\r\n\r\nUnable to find type [IB].\r\nAt /vagrant/Invoke-Build/Invoke-Build.ps1:217 char:1\r\n+ [IB]::Init($Host)\r\n+ ~~~~\r\n    + CategoryInfo          : InvalidOperation: (IB:TypeName) [], RuntimeException\r\n    + FullyQualifiedErrorId : TypeNotFound\r\n\r\n/vagrant/Invoke-Build/Invoke-Build.ps1 : Unable to find type [IB].\r\nAt line:1 char:1\r\n+ ./Invoke-Build.ps1\r\n+ ~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : InvalidOperation: (IB:TypeName) [Invoke-Build.ps1], RuntimeException\r\n    + FullyQualifiedErrorId : TypeNotFound,Invoke-Build.ps1"},"comment":{"url":"https://api.github.com/repos/nightroman/Invoke-Build/issues/comments/241517557","html_url":"https://github.com/nightroman/Invoke-Build/issues/31#issuecomment-241517557","issue_url":"https://api.github.com/repos/nightroman/Invoke-Build/issues/31","id":241517557,"user":{"login":"nightroman","id":927533,"avatar_url":"https://avatars.githubusercontent.com/u/927533?v=3","gravatar_id":"","url":"https://api.github.com/users/nightroman","html_url":"https://github.com/nightroman","followers_url":"https://api.github.com/users/nightroman/followers","following_url":"https://api.github.com/users/nightroman/following{/other_user}","gists_url":"https://api.github.com/users/nightroman/gists{/gist_id}","starred_url":"https://api.github.com/users/nightroman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nightroman/subscriptions","organizations_url":"https://api.github.com/users/nightroman/orgs","repos_url":"https://api.github.com/users/nightroman/repos","events_url":"https://api.github.com/users/nightroman/events{/privacy}","received_events_url":"https://api.github.com/users/nightroman/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T19:09:15Z","updated_at":"2016-08-22T19:09:15Z","body":"Thank you! This would take much longer without your report and help. I think the story is not over yet and there will be issues. But the first working build is a great step forward."}}
{"actor":{"display_login":"nightroman"}}