Skip to content

Conversation

@daxian-dbw
Copy link
Member

@daxian-dbw daxian-dbw commented May 30, 2017

Fix #3648

Summary

A workaround has been made in .NET Core to allow accept any certificate: https://github.com/dotnet/corefx/issues/19709
To enable -SkipCertificateCheck in web cmdlets, we need to move to the latest .NET Core, and also use HttpClientHandler.DangerousAcceptAnyServerCertificateValidator as the callback delegate.

New Issues

There are 2 problems with the latest .NET Core:

  1. Behavior change in FileSystemInfo.Attribute causes 2 tests to fail on Unix platforms. https://github.com/dotnet/corefx/issues/20456 was filed to track the behavior change. These 2 tests are currently marked as -Pending for now.
  2. VSCode C# extension doesn't support .NET Core 2.0.0-preview2-* SDK. When using 2.0.0-preview2 packages and dotnet-cli, you will get a MissingMethodException opening the project in VSCode (see below). This is tracked by Failure with .NET Core 2.0.0-preview2 SDK dotnet/vscode-csharp#1495, and hopefully will be addressed this week according to this comment: Failure with .NET Core 2.0.0-preview2 SDK dotnet/vscode-csharp#1495 (comment)
[fail]: OmniSharp.MSBuild.ProjectFile.ProjectFileInfo
        The "ResolvePackageDependencies" task failed unexpectedly.
System.MissingMethodException: Method not found: 'System.Collections.Generic.IList`1<NuGet.Packaging.Core.PackageDependency> NuGet.ProjectModel.LockFileTargetLibrary.get_Dependencies()'.
   at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.GetPackageDependencies(LockFileTargetLibrary package, String targetName, Dictionary`2 resolvedPackageVersions, HashSet`1 transitiveProjectRefs)
   at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.GetPackageAndFileDependencies(LockFileTarget target)
   at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.RaiseLockFileTargets()
   at Microsoft.NET.Build.Tasks.ResolvePackageDependencies.ExecuteCore()
   at Microsoft.NET.Build.Tasks.TaskBase.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

@daxian-dbw daxian-dbw requested a review from SteveL-MSFT May 30, 2017 21:28
@daxian-dbw daxian-dbw self-assigned this May 30, 2017
@daxian-dbw
Copy link
Member Author

@SteveL-MSFT I think it would be good to have -SkipCertificateCheck fixed in beta.2. However, adopting 2.0.0-preview2 bits means VSCdoe won't work for us for a few days (Folks from omnisharp-vscode will look at supporting it in this week).

@JamesWTruher I update Microsoft.PowerShell.Console.csproj to use 2.3.0 of Microsoft.ApplicationInsights in this refreshment. Please let me know if you have any concerns.

@SteveL-MSFT
Copy link
Member

@daxian-dbw we should hold this til after beta.2 if VSCode support isn't ready

Copy link
Member

@SteveL-MSFT SteveL-MSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@iSazonov
Copy link
Collaborator

iSazonov commented Jun 8, 2017

Fix is ready in OmniSharp v1.11.0-beta2 for Windows only.

@daxian-dbw
Copy link
Member Author

@SteveL-MSFT The VSCode C# extension released v1.11.0-beta3 that supports .NET Core 2.0-preview2 packages. However, they don't plan to release the official v1.11.0 anytime soon because it's using Mono 5.2 bits which are not officially released. See dotnet/vscode-csharp#1495 (comment)

There are instructions for installing beta releases of C# extension (dotnet/vscode-csharp#1495 (comment)). Do you think we can accept this PR without the official release of v1.11.0 VSCode C# extension?

@SteveL-MSFT
Copy link
Member

@daxian-dbw I think the number of people actively using VSCode and PSCore6 is probably small, however, how will they find out to install the Beta?

@daxian-dbw
Copy link
Member Author

The instructions for installing beta releases are listed here: https://github.com/OmniSharp/omnisharp-vscode/wiki/Installing-Beta-Releases. However, we probably need to temporarily put it in the README of powershell repo to allow contributors to easily find how to develop powershell core with VSCode. And, maybe also convey the message in twitter?

@SteveL-MSFT
Copy link
Member

I can put out the message on Twitter once we update the README

@daxian-dbw
Copy link
Member Author

OK, I will update this PR to use a more recent 2.0.0-preview2 build and update the README.

@iSazonov
Copy link
Collaborator

In the last six months, I had to put an OmniSharp Beta on twice because of problems that were not related to PowerShell Core. I believe anyone will find the OmniSharp discussion easy.

@daxian-dbw
Copy link
Member Author

PR has been updated to use the most recent 2.0.0-preview2 build.
Opened #4004 to track updating README.md of powershell repo. Will do it later tonight.

I have verified the v1.11.0-beta4 of C# extension works fine with the latest 2.0.0-preview2 packages.

@daxian-dbw daxian-dbw merged commit 8731747 into PowerShell:master Jun 14, 2017
@daxian-dbw daxian-dbw deleted the new-dotnet branch June 14, 2017 00:58
@iSazonov
Copy link
Collaborator

iSazonov commented Jun 14, 2017

It seems https://github.com/dotnet/corefx/issues/20456 fixed. Maybe already in 2.0.0-preview3-25413-01 ?

@iSazonov
Copy link
Collaborator

OmniSharp was fixed dotnet/vscode-csharp#1495 - Beta4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

'Invoke-WebRequest -SkipCertificateCheck' doesn't work with netcoreapp2.0 on Mac

5 participants