M
M
MIsternik2016-12-15 22:55:28
linux
MIsternik, 2016-12-15 22:55:28

[dotnet core] How to install dependencies on Linux for a c# project?

Собственно суть вопрос в теме. Nuget скачивает пакеты в папку и все, что-то мне подсказывает что должен быть нормальный вариант.
upd: под нормальным вариантом я подразумеваю внесение данных установленной зависимости в project.json и сохранение их в отдельную директорию.
Пока нашел расширение для VS Code которое это делает, но не хочется привязываться к ней как к студии на винде, хотя ничего против VS Code не имею.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Вячеслав Золотов, 2016-12-15
@SZolotov

There are project dependencies, and there are package dependencies for application distribution (for example, *.deb). Developing and building an application depends on nugget packages. On Linux, the standard way to install applications is with package managers (like apt and yum for example). The installation package can link to other packages from the remote repository. Roughly speaking, when creating a package with your application, you can specify dot net core in the package dependencies. Then, when installing a package with your application, the system can pull up dot.net core. That's how it will be right. Another thing is that most likely dot net core is not in the repositories of Linux distributions, but it is on red hat, but most likely not on debian.
I don't think nugget packages will be distributed through any distribution's standard package repositories.

M
MIsternik, 2016-12-16
@MIsternik

Everything is done simply.
You need to add a dependency to project.json and run dotnet restore. He will pick up what is missing.
docs.microsoft.com

O
OnYourLips, 2016-12-16
@OnYourLips

Excuse me, why do you think this is a bad option? Everything is fine, as it should be.
For other languages, the situation is similar: the same php, python, js and ruby ​​also download packages to folders next to the code via composer, pip, bundler and npm.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question