About liunx machine offline environment (NETCORE) Nuget packet migration problem

  • First of all, the nuget offline environment can’t load third-party nuget packages, so I’m using nuget to cache files (right or recommend using your own nuget server and publishing it properly, just for emergencies)
  • We all know that the dotnet restore of a project is a command to clarify the dependencies of a project, and the restore command relies on the project. assets. JSON file under the obj directory under the project directory to clarify the dependencies.
  • Let’s start with a diagram that shows the directories of the liunx environment and the window environment nuget packages, respectively (after the liunx environment VIM / configFilePaths returns, you can locate the following figure)

     

     

  • The source of the nuget package can be set up by using dotnet restore -s [path].
  • What we’re going to do is migrate nugets from all the paths of a successful restore project in the Windows environment to the liunx environment
  • Then modify the config file of the configFilePaths species and set the value to your local path.
  • Problem encountered on the way (. csproj file reported referencing an object to an object instance: because the project dependency package could not be found, it was provided and then generated successfully.)

Leave a Reply

Your email address will not be published. Required fields are marked *