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.

Nuget mismatch when compiling Build Script and nuget addin.

See original GitHub issue

What You Are Seeing?

Fails to run script that was previously working mismatch with nuget.core versions…

Preparing to run build script...
Running build script...
Analyzing build script...
Processing build script...
Installing addins...
Compiling build script...
Error: error CS1705: Assembly 'Cake, Version=0.20.0.0, Culture=neutral, PublicKeyTo
.14.0.832, Culture=neutral, PublicKeyToken=31bf3856ad364e35' which has a higher ver
Core, Version=2.12.0.817, Culture=neutral, PublicKeyToken=31bf3856ad364e35'

What is Expected?

Runs normally.

What version of Cake are you using?

0.20.0 (previous versions worked)

Are you running on a 32 or 64 bit system?

64bit

What environment are you running on? Windows? Linux? Mac?

Windows

Are you running on a CI Server? If so, which one?

AppVeyor (but can reproduce locally)

https://ci.appveyor.com/project/danwalmsley/avalonstudio/build/0.2.0.2978

How Did You Get This To Happen? (Steps to Reproduce)

I hadn’t pinned cake to a specific version (you learn some things the hard way)

Build.cake for repro…

I had thought changing the version for the nuget.core package would have fixed it, but doesn’t seem to resolve it.

/////////////////////////////////////////////////////////////////////
// ADDINS
/////////////////////////////////////////////////////////////////////

#addin "Cake.FileHelpers"
#addin "Cake.Docker"
#addin "nuget:?package=NuGet.Core&version=2.12.0"

//////////////////////////////////////////////////////////////////////
// TOOLS
//////////////////////////////////////////////////////////////////////

///////////////////////////////////////////////////////////////////////////////
// USINGS
///////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////
// ARGUMENTS
//////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////////
// TASKS
/////////////////////////////////////////////////////////////////////////////// 

Task("Restore-NetCore")
    .IsDependentOn("Clean")
    .Does(() =>
{
    foreach (var project in netCoreProjects)
    {
        DotNetCoreRestore(project.Path);
    }
});

Task("Default")
    .IsDependentOn("Restore-NetCore");

RunTarget(target);

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
danwalmsleycommented, Jun 13, 2017

@gep13 thanks for your help 😃 👍

0reactions
devleadcommented, Jun 13, 2017

Issue moved to cake-build/website #366 via ZenHub

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Nuget version not correct?
I have a project that i cannot compile. When i try to do so I get the following error: The 'Microsoft.Bcl.Build 1.0.14' package...
Read more >
Nuget Not Installing Version in Packages.config
The problem is, it is not pulling that down the version reference in packages.json and then library fails to build. In pacakges.json we're ......
Read more >
NuGet Package Dependency Resolution
This error occurs when one or more of the packages referenced in your project do not indicate that they support the project's target...
Read more >
Cake.NuGet 3.1.0
Cake (C# Make) is a build automation system with a C# DSL to do things like compiling code, copy files/folders, running unit tests,...
Read more >
How to resolve .NET reference and NuGet package version ...
The located assemly's manifest definition does not match the assembly reference. If you ran into this exception, you are in the right place....
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