5

I have an MVC5 application which I'm trying to run offline. I installed VS2017 offline but when I try to build the project it throws multiple errors relating to it missing all the .NET assemblies and dlls. When I try to add these assemblies they're not available to be added. Anyone please help.

PS: there's NO internet on the machine.

2
  • Did you install VS with the Installer? If so which Workloads and components did you install Commented Mar 27, 2019 at 8:29
  • I installed .NET Desktop Development and ASP.NET and Web Develoment components. Commented Mar 27, 2019 at 8:39

3 Answers 3

12

I also have that problem from time to time. What usually helps is to do a dotnet restore. This is different to running restore from the solution explorer within VS, you have to do it through the command line. In order to execute it, you need to have the .NET Core SDK installed. dotnet restore is usually very good at fixing some project problems such as corrupted .json files that VS creates behind the scenes and I would guess that it is able to repair those files without internet connection, but I haven't tried.

Sign up to request clarification or add additional context in comments.

3 Comments

I installed the .NET Core SDK and it stopped moaning about it. But I get these runtime errors when I build the solution. All the PM console commands to install the missing assemblies don't work because it tries to connect to the internet.
@Vusi85 PM commands connect to the specified NuGet sources. If your machine is offline, I suggest to disable all online package sources. You can set up a local folder as NuGet source and deploy all the packages there instead.
thanks, tried the standard clean&build steps without success. running your dotnet restore within the VS PS terminal project folder instantly helped.
0

Try cleaning and rebuilding your solution. I had this issue and something went funky with my dll's.

Comments

0

It's obvious omnisharp error same as mine. I changed omnisharp path version from c# extension(c# > unistall > install another version) and reopened to vscode. It worked for my project. All error has gone.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.