Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install C# dependencies one time or manually or locally to work offline without internet connection for VS-code?

I don't need to download the packages of C# dependencies every time I reopen my project it's consume the time. Also, when you have a slow internet connection like my case will be difficult to going on.

what I get when searching about solution is .vsix solution but it did't help.

Installing C# dependencies...
Platform: win32, x86_64

Downloading package 'OmniSharp for Windows (.NET 4.6 / x64)' (33778 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package 'OmniSharp for Windows (.NET 4.6 / x64)'

Downloading package '.NET Core Debugger (Windows / x64)' (47489 KB).................... Done!
Validating download...
Integrity Check succeeded.
Installing package '.NET Core Debugger (Windows / x64)'

Downloading package 'Razor Language Server (Windows / x64)' (59571 KB).................... Done!
Installing package 'Razor Language Server (Windows / x64)'

Finished

Screenshot of downloading package after opening the project

What I need is to open asp.net core 2.2 projects without re-downloading packages of C# dependencies.

like image 753
Muhammad M. Fadel Avatar asked Sep 20 '19 00:09

Muhammad M. Fadel


People also ask

Does C need to be installed?

To start learning C programming, you only have to install the C compiler in your system. Nowadays, C and C++ both compilers come as a single integrated package, which serves the purpose of both C and C++ program development.

How do I open C on my computer?

Any text editor like Notepad++, Emacs, the Windows Notepad program, EditPlus, TextMate, and others, can open and view a C file if it's a C/C++ source code file.


2 Answers

As Lex Li mentions in a comment:

I said that because I have an extension that does the same (same code from Omnisharp). Ever since VSCode started to auto update extensions, you as an end user might never realize how often an extension has been updated, and each update will trigger a full download of the dependencies (how VSCode works). So your personal feeling/understanding is far from the truth. Like I said, if you disable auto update, then those dependencies will be well cached, and you can update the extension while you have a good connection to download those dependencies again.

I have disabled VSCode auto update of the extensions to avoid it downloading the bits automatically and it's working well.

like image 65
Muhammad M. Fadel Avatar answered Nov 02 '22 22:11

Muhammad M. Fadel


The Omnisharp repository has the document here. You could pack the platform-specific Omnisharp dependencies to a vsix package, and install it on the target computer offline.

like image 36
Alsein Avatar answered Nov 02 '22 23:11

Alsein