1
votes

I am trying to learn Microsoft Service Fabric and completely new to Visual Studio .

I am trying to follow some tutorial on creating a Service Fabric stateless endpoint . But many missing references are there.

I come to know there are two options - Adding missing Assembly references and adding missing packages.

Using Nuget package manager console I tried adding one of the missing package but it failed as i didnt had the required dependency .

Is there any command or Visual studio option using that I can install all missing assembly , packages and there dependency in one go ?

Problem here is I am new to Microsoft tech stack and I am not aware of what reference requires which Assembly and respective packages with dependency .

enter image description here

2
Have u tried right click on solution and "Manage Nuget Packages for Solution" / "Manage Nuget Packages for Project" ? Normaly nuget installs everything needed - Tobias Theel
@TobiasTheel , yes i tried that . But I am not sure which packages i should select from nuget repository - Divyanshu Jimmy

2 Answers

1
votes

It really looks like you are just missing the usings in your class. Try to click on the red underlined Objects, a light bulb should appear. Click on that lightbulb and select "add using for xx" or similar.

If that is not available you are truly missing references. And as i said if u are using resharper u select the red underlined objects hit alt+enter and select import missing reference / add missing using

1
votes

Problem here is I am new to Microsoft tech stack and I am not aware of what reference requires which Assembly and respective packages with dependency .

Exactly, but the same problem is for Visual Studio, how could it know which nuget package would resolve the problem from the code? Some nuget packages would have the same commands, some of them even same namespaces. Actually Visual Studio cannot know for sure even if some particular nuget will work in your project until it tries to install it.