Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 12 06:37
  • Jan 11 16:42
    AnthonySteele commented #1155
  • Jan 03 10:08
    tiesmaster closed #1142
  • Jan 03 10:08
    tiesmaster commented #1142
  • Dec 31 2021 12:18
    stale[bot] labeled #1143
  • Dec 31 2021 12:18
    stale[bot] commented #1143
  • Dec 31 2021 10:55
    Bouke commented #1155
  • Dec 30 2021 05:04
    stale[bot] labeled #1142
  • Dec 30 2021 05:04
    stale[bot] commented #1142
  • Dec 24 2021 00:42
    stale[bot] labeled #1115
  • Dec 24 2021 00:42
    stale[bot] commented #1115
  • Dec 21 2021 03:56
    stale[bot] labeled #1112
  • Dec 21 2021 03:56
    stale[bot] commented #1112
  • Dec 21 2021 03:56
    stale[bot] labeled #1140
  • Dec 21 2021 03:56
    stale[bot] commented #1140
  • Dec 20 2021 07:28
    stale[bot] unlabeled #1098
  • Dec 20 2021 07:27
    quasarea commented #1098
  • Dec 20 2021 06:14
    stale[bot] labeled #1098
avifox
@avifox
Hi, I am new to nukeeper. I have been able to install it and run it on local visual studio. Now I want to install it on a pipeline in Azure DevOps using yaml. Are there any links that show the steps to do this?
Stephan T
@StephanTuinder
Hi. It's quiet here. Project still active? Someone should sync https://github.com/NuKeeperDotNet/NuKeeper/wiki/Configuration and https://nukeeper.com/basics/configuration/ asin the first some options are missing
David Reis
@davidreis97:matrix.org
[m]

Hey there! I have a question. My project has an import in the .csproj that looks like this:

$(SolutionDir)\MyProject

But when running "nukeeper repo", the underlying msbuild must not have the SolutionDir variable set since it resolves the above path to "C:\MyProject" which is not correct. Is there a way to pass parameters to the underlying msbuild that gets run during "nukeeper repo"? Setting the parameter in the Directory.Build.props is not an option as we don't want to hard code that value in our codebase.

1 reply
Hey, thanks for replying! This happens when running nukeeper both in the CI and also locally on my machine
Michel van den Berg
@promontis
what should the solution dir be?
David Reis
@davidreis97:matrix.org
[m]
it should be the directory where the solution is
Michel van den Berg
@promontis
yeah :) what path haha
David Reis
@davidreis97:matrix.org
[m]
depends on where it runs of course, but it could look something like "C:\mycompany\mysolution"
so that the final import path looks like "C:\mycompany\mysolution\MyProject"
Michel van den Berg
@promontis
What is the value of Project > Properties > Build Events > Pre-build -> Edit Pre-build -> Macros >> SolutionDir?
For the project that has the $(SolutionDir)\MyProject
David Reis
@davidreis97:matrix.org
[m]
On my machine it is "C:\mycompany\mysolution\" and on the CI pipeline the build step also has the correct variable there
It's just when running nukeeper that the variable seems to be empty
Michel van den Berg
@promontis
Could you run it with verbose?
and paste the log somewhere
I’d like to know what sub-step of repo the problem is
David Reis
@davidreis97:matrix.org
[m]
it's during the "nuget restore" step

the correct version of msbuild gets selected

MSBuild auto-detection: using msbuild version '16.11.0.36601' from 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin'.

Michel van den Berg
@promontis
what happens if you run the same using dotnet
David Reis
@davidreis97:matrix.org
[m]
using dotnet it gets restored without any errors
2 replies
Michel van den Berg
@promontis
mmm… what I personally would do is debug nukeeper… so, load up the nukeeper sln and run the same thing using Visual Studio. Then try to debug it and see what it is doing. Hopefully, you see where to problem is. I don’t think you will get an easy answer other than that, sorry
David Reis
@davidreis97:matrix.org
[m]
No worries, we'll keep looking into it, thank you for your help!
Michel van den Berg
@promontis
You’re welcome :) I think Nukeeper also just calls dotnet restore, so it should work. Although, it doesn’t… so last resort is probably debugging
David Reis
@davidreis97:matrix.org
[m]
Looking at the verbose logs, it calls "nuget update" actually, which does crash with the same error that's being thrown by nukeeper
Michel van den Berg
@promontis
so running nuget update has the same ptoblem as nukeeper?
David Reis
@davidreis97:matrix.org
[m]
yes
Michel van den Berg
@promontis
cool
:)
doesn’t really provide a solution, but you are one step further
David Reis
@davidreis97:matrix.org
[m]
nice find, thanks!
Is it an option for you to use PackageReference instead of SolutionDir?
why do you use SolutionDir in the first place?
David Reis
@davidreis97:matrix.org
[m]
we are transitioning to PackageReferences but a full transition is not doable at this point
Michel van den Berg
@promontis
Yeah, understandable
Stephan T
@StephanTuinder
My eperience is: if your csproj file contains: <Project Sdk="...">, restore with 'dotnet restore', otherwhise restore with 'nuget restore'. Had a few pipelines that failed to build until I implemented that, especially with solutions that contained both types of project. Maybe something to implement in Nukeeper?
Stephan T
@StephanTuinder

Actually: Microsoft states:

The nuget.exe CLI is for your .NET Framework project and non-SDK-style projects (for example, a non-SDK style project that targets .NET Standard libraries). If you are using a non-SDK-style project that has been migrated to PackageReference, use the dotnet CLI instead. The nuget.exe CLI requires a packages.config file for package references.
Manage packages using the nuget.exe CLI

So it is all about having a packages.config file or not.

David Reis
@davidreis97:matrix.org
[m]
Thank you both for your help. I was able to move past the original problem by replacing the SolutionDir variable, which was not assigned in our tests, with the MSBuildProjectDirectory variable. I'll leave this as a comment on my comment in github in case other people find it useful.
About that @StephanTuinder, is there a way to change the way that NuKeeper chooses to restore the packages? From our investigation it seems to always be restoring using "dotnet restore" which may not be compatible in our case due to some templating magic that we do
Stephen Price
@lyynx_twitter
Is there a way to specify a particular version for a package update? ie if you had a group of packages released together? Or perhaps I'll have to use the age flag. It's easy to update to the latest prerelease package (for example) but if you say you wanted the one (or anything really) earlier than the most recent, its a bit harder
eric-at-onosys
@eric-at-onosys

i've got a nuget credentials provider error lately when trying to use nukeeper. how do get around this?

The plugin credential provider could not acquire credentials. Authentication may require manual action. Consider re-running the command with --interactive for dotnet, /p:NuGetInteractive="true" for MSBuild or removing the -NonInteractive switch for NuGet

i'm simply not understanding how to resolve this from a nukeeper perspective

Stephan T
@StephanTuinder
you should install latest azure credential provider (if your feed is in Azure).
if it is running in a (yaml) pipeline add:
  - task: NuGetAuthenticate@0
    displayName: 'Install Azure Credential Provider'
eric-at-onosys
@eric-at-onosys
feed is in azure, but this is when running nukeeper locally. the feed in question is a registered and enabled nuget source
Stephan T
@StephanTuinder
did you download the latest credential provider?
Powershell:
Invoke-WebRequest https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.ps1 -UseBasicParsing -OutFile "installcredprovider.ps1"
and run installcredprovider.ps1
eric-at-onosys
@eric-at-onosys
@StephanTuinder thank you for your response. i ended up following your advice. in addition, i forced interactive mode with nuget restore via PMC and re-entered creds accordingly. this cleared up the issue and nukeeper was able to once again function properly.
my creds provider was 1 version outdated
Stephan T
@StephanTuinder
Glad it worked. :-)