EzDevInfo.com

visual-studio-2015 interview questions

Top visual-studio-2015 frequently asked interview questions

How to disable Diagnostic Tools?

When debugging a C# application in Visual Studio 2015, Diagnostic Tools starts automatically. I unchecked both checkboxes in Select Tools, but it doesn't seem to completely disable it.

How do I turn it off (and on again later)?


Source: (StackOverflow)

visual studio 2015 vshub is spamming fiddler

I have read: How do I disable VsHub.exe in the system tray? and https://connect.microsoft.com/VisualStudio/feedback/details/1919828/hundreds-of-calls-second-to-vshub-and-browserlink-is-off

I would prefer to not disable vshub; I just want it to be more quiet when I am using fiddler. Right now it spams everything else out, and I cannot do general debugging.

Does anybody know a workaround? Can I block vshub from showing up in fiddler without blocking the rest of locahost?


Source: (StackOverflow)

Advertisements

What is vshub.exe in the system tray?

I installed Visual Studio 14. Now I have a new app VsHub in the system tray / notification area. What is it? I tried clicking and right-clicking on it, it doesn't do anything.


Source: (StackOverflow)

C# 6.0 Features Not Working with Visual Studio 2015

I am testing Visual Studio 2015 with C# 6.0 but the language features are not working. In an MVC web application, the following code does compile:

if (!string.IsNullOrWhiteSpace(Model.Profile?.TypeName))
{
    // More logic here...
}

However, when I run the application via Debug and IIS Express, I get the following error:

CS1525: Invalid expression term '.'

Is there something more I need to do to enable these features?


Source: (StackOverflow)

class name and method name dropdown list is missing (visual studio setting)

Does anyone know how to get my class name and method name dropdown lists again? It's the dropdown lists that are usually above the code. It's just a setting but i can't seem to find it. I don't want to reset my setting btw. I shouldn't have to.


Source: (StackOverflow)

Visual Studio 2015 Update 1 spamming localhost

I installed Visual Studio Update 1 yesterday and now when running ASP.NET services locally on IIS (not the express version). I am seeing hundreds of requests per second to the address

 http://localhost:49155/vshub/ca9dea4b016f45c68a6a8c1a07809eb4/DataWarehouseModule/dataWarehouse/getStatus/ 

What is causing this and is it preventable?


Source: (StackOverflow)

Where Can I Find the C# Language Specification 6.0?

I know where to find the C# 5 Language Specification but I cannot find the C# 6 Language Specification anywhere.

Where is the C# 6 Language Specification?


Source: (StackOverflow)

Can I hide the smiley in Visual Studio 2015 final?

In Visual Studio 2015 RC, there was that Feedback smiley in the upper right of the main window.

Unfortunately, it is still there in the final release of Visual Studio 2015:

enter image description here

I've searched all through the options and settings and found no way to hide this smiley.

My question:

Any option or other (Registry etc.) hack to remove the smiley?

Update 2015-12-01:

Yesterday Update 1 for Visual Studio was released.

While I still find no option to hide the smiley, they at least provided a less distracting icon for it:

enter image description here


Source: (StackOverflow)

How to fix DNX/DNVM in Visual Studio 2015?

Today I installed VS 2015 on Windows 7 x64. Mainly to test new .Net Core features and etc. And for test I created new C# "Console Application (Package)" solution and got this message:

DNX SDK version 'dnx-clr-win-x86.1.0.0-beta5' failed to install. The solution will use DNX SDK version ‘dnx-clr-win-x86.1.0.0-beta5’ for this session.

I can't compile and debug project. Also, when I have opened debug tab in project properties then VS crashed.

DNVM output when I opened solution:

Invoke-Command : The term 'x86' is not recognized as the name of a cmdlet, func
tion, script file, or operable program. Check the spelling of the name, or if a
 path was included, verify that the path is correct and try again.
C:\Program Files\Microsoft DNX\Dnvm\dnvm.ps1:1451 ????:27
+             Invoke-Command <<<<  ([ScriptBlock]::Create("dnvm-$cmd $cmdargs")
)
    + CategoryInfo          : ObjectNotFound: (x86:String) [Invoke-Command], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Co 
   mmands.InvokeCommandCommand

Invoke-Command : The term 'x86' is not recognized as the name of a cmdlet, func
tion, script file, or operable program. Check the spelling of the name, or if a
 path was included, verify that the path is correct and try again.
C:\Program Files\Microsoft DNX\Dnvm\dnvm.ps1:1451 ????:27
+             Invoke-Command <<<<  ([ScriptBlock]::Create("dnvm-$cmd $cmdargs")
)
    + CategoryInfo          : ObjectNotFound: (x86:String) [Invoke-Command], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Co 
   mmands.InvokeCommandCommand

Invoke-Command : The term 'x86' is not recognized as the name of a cmdlet, func
tion, script file, or operable program. Check the spelling of the name, or if a
 path was included, verify that the path is correct and try again.
C:\Program Files\Microsoft DNX\Dnvm\dnvm.ps1:1451 ????:27
+             Invoke-Command <<<<  ([ScriptBlock]::Create("dnvm-$cmd $cmdargs")
)
    + CategoryInfo          : ObjectNotFound: (x86:String) [Invoke-Command], C 
   ommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Co 
   mmands.InvokeCommandCommand

Any ideas how to fix it?

Also, I have previously installed VS 2015 Preview and DNX/DNVM separately. But I think, I completely removed it before VS 2015 installation. Could this somehow affects current VS installation?


Source: (StackOverflow)

Did C# formatting change in Visual Studio 2015? And how can I change it back?

In past versions of Visual Studio, I could create a single-line autoproperty in C# like this:

public int Whatever { get; set; }

If I hit Control-K, Control-D to format, the property would stay that way.

But in Visual Studio 2015 RC, when I type the property, it wraps, and even if I unwrap it, formatting wraps it again:

public int Whatever
{ get; set; }

I've noticed it with constructors as well. In the past, an empty constructor (e.g. that just called a base class constructor) could look like this:

public Whatever(int stuff)
    : base(stuff) { }

Now Visual Studio 2015 insists on doing this:

public Whatever(int stuff)
    : base(stuff)
{ }

Have others noticed this? Is this a change made in Visual Studio 2015? If so, is there a way I can change it back? I looked through the C# formatting section of Tools > Options, but couldn't find any new setting that might affect this.

(It's not impossible that one of my add-ins is causing it, but I didn't find any obvious culprits.)

(Why even care? Because when I use the Collapse to Definitions outlining command, single-line properties and constructors stay as they are, whereas wrapped ones collapse. If they're collapsed, I can't tell at a glance that they're empty; I have to toggle them to uncollapsed just to see that nothing's there.)


Source: (StackOverflow)

What is the difference between a Shared Project and a Class Library in Visual Studio 2015?

I was looking at the new features for Visual Studio 2015 and Shared Project came up a lot but I don't understand how it is different to using a Class Library or a Portable Class Library. Can anyone explain?

Edit: Shared Project is a new feature in Visual Studio 2015 and is different to a Portable Class Library. I understand what a Portable Class Library is. What I'm trying to understand is how a Shared Project differs to a Class Library. See link below.

http://www.c-sharpcorner.com/UploadFile/7ca517/shared-project-an-impressive-features-of-visual-studio-201/


Source: (StackOverflow)

Visual Studio 2015 not syntax highlighting razor nor Intellisense

My Razor views in VS2015 RC are not showing the proper coloring for C# code. My project was working fine in VS2013, but it isn't in 2015, and it's not giving me any Intellisense on the C# code. The solution builds and the site runs fine.

I tried the following to no avail

  • disabling all Visual Studio extensions
  • deleting my .suo file
  • removing the project and re-adding it to the solution

How can I fix this?

Example:


Source: (StackOverflow)

How do I disable VsHub.exe in the system tray?

Starting Visual Studio 2015 also launches two other executables :

VsHub.exe

and

Microsoft.VsHub.Server.HttpHost.exe

Both of these take a considerable space in the task manager.

How can I delete this "Visual Studio Hub" option? I don't use any of VS 'top-notch' features, including the VS Hub one.


Source: (StackOverflow)

Visual Studio 2015 very slow

I just finished the installation and the whole IDE is super slow. It seems like it's making some kind of heavy cpu calls in the background where the whole IDE literally freezes and becomes unresponsive for about 2-3 seconds.

Not having this issue with VS 2013 Ultimate.
Running VS 2015 Professional.

Installed Add-Ons/Packages:

  • Node.js Tools
  • Resharper

Anyone have any ideas?


Source: (StackOverflow)

How do I disable C# 6 Support in Visual Studio 2015?

Background

We have a project that we're developing in VS 2015 with C#6 enabled that occasionally needs to be opened by developers using VS 2013 without C#6.

We have no intention to use C# 6 within this particular solution (as much as I'd like to).

Problem

Visual Studio and ReSharper suggest helpful C# 6 language constructs that render the solution inoperable in earlier versions of Visual Studio without C#6 support.

I've disabled the ReSharper C#6 support but I can't seem to disable / limit C# features across the whole solution.

Question

How do I limit C# to C#5 capabilities within a solution or within Visual Studio 2015?


Source: (StackOverflow)