question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GetBuildVersion task fails for full Framework builds

See original GitHub issue

Repro steps

  • Create a new Console Application (.NET Framework)
  • Install package Nerdbank.GitVersionong (either using packages.config or <PackageReference/>)
  • Build the project

Error:

System.IO.FileNotFoundException: Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified.
File name: 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
   at Nerdbank.GitVersioning.VersionOracle.Create(String projectDirectory, String gitRepoDirectory, ICloudBuild cloudBuild, Nullable`1 overrideBuildNumberOffset, String projectPathRelativeToGitRepoRoot)
   at Nerdbank.GitVersioning.Tasks.GetBuildVersion.ExecuteInner()
   at MSBuildExtensionTask.ContextAwareTask.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()

I tested this using both Visual Studio 2015 and 2017 (15.8.1) on both Windows 7 and Windows 10 machines.

I do not know if it is relevant, but the Console Application is targeting .NET 4.6.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:44 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
bordingcommented, Oct 21, 2018

@AArnott I’ve been out of town, so I haven’t had a chance to take a look at it this yet. At this point it might be Tuesday before I’ll be able to. Wanted to let you know that it’s on my radar.

I’ll be so happy once we get rid of all the problematic native dependencies and fix this once and for all!

2reactions
bordingcommented, Nov 6, 2018

FYI LibGit2Sharp 0.26.0-preview-0062 is up on nuget.org and it includes a separate ubuntu.18.04-x64 binary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error MSB4018 The "Nerdbank.GitVersioning.Tasks. ...
Is anyone give a solution to resolve this issue? Error MSB4018 The "Nerdbank.GitVersioning.Tasks.GetBuildVersion" task failed unexpectedly.
Read more >
Visual Studio Build task fails in Azure DevOps - my .Net ...
I am seeing an issue when building in Azure DevOps on my own build VM. Same error occurs on a VS2017 hosted agent....
Read more >
Can't build MonoAGS
GetBuildVersion " task failed unexpectedly. System. ... Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.
Read more >
MSB3277: Found conflicts between different versions of ' ...
This error occurs during a build when more than one version of the same dependent assembly is referenced in a build of the...
Read more >
Blazor webassembly electron. With Mobile Blazor Bindings this
Within any Turing Complete programming environment on a PC (like Blazor and ... What is the best way to get build version number...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found