Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a .NET Core 3 target for the global tool #279

Closed
wants to merge 2 commits into from

Conversation

clairernovotny
Copy link
Member

Fixes #277

@clairernovotny
Copy link
Member Author

clairernovotny commented Dec 15, 2018

This probably needs updates to the base Linux images to test the netcoreapp3 version. That said, the core libraries have not changed, it's just another publish output.

@clairernovotny
Copy link
Member Author

Not sure what to do with the NPM packing error:

2018-12-15T19:00:27.5871500Z [19:00:27] 'setPackageVersion' errored after 1.33 s
2018-12-15T19:00:27.5871767Z [19:00:27] Error: Command failed: dotnet "D:\a\1\s\src\nerdbank-gitversioning.npm\out\nbgv.cli\tools\netcoreapp2.1\any\nbgv.dll" get-version --project "." --format json
2018-12-15T19:00:27.5871851Z 
2018-12-15T19:00:27.5871941Z Unhandled Exception: System.TypeInitializationException: The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'git2-a904fc6' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E)
2018-12-15T19:00:27.5872015Z    at LibGit2Sharp.Core.NativeMethods.git_libgit2_init()
2018-12-15T19:00:27.5872345Z    at LibGit2Sharp.Core.NativeMethods.InitializeNativeLibrary()
2018-12-15T19:00:27.5872405Z    at LibGit2Sharp.Core.NativeMethods..cctor()
2018-12-15T19:00:27.5872477Z    --- End of inner exception stack trace ---
2018-12-15T19:00:27.5872538Z    at LibGit2Sharp.Core.NativeMethods.git_libgit2_opts(Int32 option, UInt32 level, String path)
2018-12-15T19:00:27.5872603Z    at LibGit2Sharp.GlobalSettings.SetConfigSearchPaths(ConfigurationLevel level, String[] paths)
2018-12-15T19:00:27.5872695Z    at Nerdbank.GitVersioning.GitExtensions.OpenGitRepo(String pathUnderGitRepo) in D:\a\1\s\src\NerdBank.GitVersioning\GitExtensions.cs:line 391
2018-12-15T19:00:27.5872771Z    at Nerdbank.GitVersioning.Tool.Program.OnGetVersionCommand(String projectPath, String format, String versionOrRef) in D:\a\1\s\src\nbgv\Program.cs:line 236
2018-12-15T19:00:27.5872859Z    at Nerdbank.GitVersioning.Tool.Program.Main(String[] args) in D:\a\1\s\src\nbgv\Program.cs:line 110
2018-12-15T19:00:27.5872912Z 
2018-12-15T19:00:27.5872962Z     at ChildProcess.exithandler (child_process.js:276:12)
2018-12-15T19:00:27.5873014Z     at emitTwo (events.js:126:13)
2018-12-15T19:00:27.5873083Z     at ChildProcess.emit (events.js:214:7)
2018-12-15T19:00:27.5873135Z     at maybeClose (internal/child_process.js:915:16)
2018-12-15T19:00:27.5873192Z     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
2018-12-15T19:00:27.6410000Z ##[error]Gulp failed with error: C:\npm\prefix\gulp.cmd failed with return code: 1
2018-12-15T19:00:27.6423750Z ##[section]Finishing: Build nerdbank-gitversioning NPM package

@@ -1,5 +1,5 @@
{
"sdk": {
"version": "2.1.400"
"version": "3.0.100-preview"
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmmm... I'm not sure I'm ready to require a preview .NET Core SDK on every box in order to build nb.gv.

The problem this solves will only exist when people have .NET Core 3.0 SDK and not 2.1, right? If so, perhaps this is the right solution, but will cause problems in the short term without actually solving any short-term problems. How about we hold off on this PR until .NET Core 3.0 is stable, and therefore has a more reasonable chance of being the only SDK installed?

Copy link
Member Author

@clairernovotny clairernovotny Dec 15, 2018

Choose a reason for hiding this comment

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

Up to you of course, but this was actively biting me here: https://github.com/dotnet/reactive/blob/linux-tests/azure-pipelines.rx.yml#L115-L137

It's not even enough to currently install both SDK's, you have to use the tool before installing 3.0.

I had to install 2.2, use the tool, then install 3.0.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ouch. OK, I'll take the hit.

Copy link
Collaborator

Choose a reason for hiding this comment

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

For future reference, the SDK installer seems to be here: https://dotnet.microsoft.com/download/dotnet-core/3.0

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not even enough to currently install both SDK's, you have to use the tool before installing 3.0.

Now that I have .NET Core 3.0 SDK Preview installed, the nbgv tool I was using before still works. So I'm not sure why it wasn't working for you.

I'm a bit surprised that since dotnet.exe itself has a --roll-forward-on-no-candidate-fx switch that it wouldn't be available to dotnet CLI tools.

Copy link
Member Author

Choose a reason for hiding this comment

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

The scenario is a bit more nuanced. It's with the local install done with the .NET Core Installer task on Pipelines, not a global install of the tool.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's also one where there is no other .NET Core 2.x globally, like in the Linux Agents

Copy link
Collaborator

Choose a reason for hiding this comment

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

That --roll-forward-on-no-candidate-fx switch appears to be totally busted. I just filed https://github.com/dotnet/cli/issues/10477

@AArnott
Copy link
Collaborator

AArnott commented Dec 15, 2018

Ya, I guess I still need to figure out that NPM failure though.

@AArnott
Copy link
Collaborator

AArnott commented Dec 15, 2018

BTW, isn't there some text file that dotnet CLI tools can include in their package to cause the runtime to be more willing to pick them up in the face of a version difference?

@clairernovotny
Copy link
Member Author

I'm not sure @KathleenDollard?

@AArnott
Copy link
Collaborator

AArnott commented Dec 15, 2018

The NPM failure isn't reproing for me locally. That makes it a lot harder to debug. :(

@ctaggart
Copy link
Contributor

ctaggart commented May 9, 2019

This was fixed by #326.

@AArnott AArnott closed this May 9, 2019
AArnott pushed a commit that referenced this pull request Oct 9, 2024
Bumps [nbgv](https://github.com/dotnet/Nerdbank.GitVersioning) from 3.6.139 to 3.6.141.
- [Release notes](https://github.com/dotnet/Nerdbank.GitVersioning/releases)
- [Commits](v3.6.139...v3.6.141)

---
updated-dependencies:
- dependency-name: nbgv
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

Add netcoreapp3.0 target for nbgv
3 participants