Stop Visual Studio from launching a new browser window when starting debug?

[Origin]: https://stackoverflow.com/questions/716494/stop-visual-studio-from-launching-a-new-browser-window-when-starting-debug

I already have a window open with the web site I’m debugging. I don’t need VS to launch another one for me every time I need to debug.

Is there a way to stop this behavior?

shareedit

Open your startup project’s properties (Project->{ProjectName} Properties… from the main menu or right click your project in the Solution Explorer and choose Properties), then navigate to the Webtab and under Start Action choose Don’t open a page. Wait for a request from an external application.

You will still be able to use any browser (or Fiddler, whatever) to access the running application, but it won’t open the browser window automatically, it’ll just start in the background and wait for any requests.

shareedit
Advertisements

Running two projects at once in Visual Studio

[Origin]: https://stackoverflow.com/questions/3850019/running-two-projects-at-once-in-visual-studio

I created a solution in Visual C# 2010 Express that contains two projects: one is the client, the other is the server. I would like to debug both at the same time, but I can only seem to run one of the projects during debugging.

Is there a way to run both at once?

shareedit

Go to Solution properties -> Common properties -> Startup Project and select Multiple startup projects.

solution properties dialog

shareedit

Max has the best solution for when you always want to start both projects, but you can also right click a project and choose Debug > Start New Instance.

This is an option when you only occasionally need to start the second project or when you need to delay the start of the second project (maybe the server needs to get up and running before the client tries to connect, or something).

shareedit

“The breakpoint will not currently be hit. The source code is different from the original version.” What does this mean?

[Origin]: https://stackoverflow.com/questions/2468852/the-breakpoint-will-not-currently-be-hit-the-source-code-is-different-from-the

When debugging in Visual Studio, sometimes I add a breakpoint but it’s hollow and VS says “The breakpoint will not currently be hit. The source code is different from the original version.” Obviously this prevents me from being able to debug.

What on earth does the message mean? What original version? If I’ve just opened up the solution and not made any changes whatsoever to the code, how can there be an ‘original version’?

shareedit

As it says, the “source code is different from the original version”.

Right click on the project folder inside the solution explorer and choose to Clean. Build a new version of the project and the breakpoint will work again!

shareedit

Select Debug in Solution Configurations, instead of Release

screenshot of menu

shareedit

If you have more than one projects in your solution, then make sure that the correct project is set as the StartUp Project. To set a particular project as the Startup Project of your solution, Right-click the project, choose Set As StartUp Project.

After I set my StartUp Project correctly, desired break-point was reached by the thread.

shareedit

Client authentication error when starting Visual Studio 2015.3

[Origin]: https://stackoverflow.com/questions/38516736/client-authentication-error-when-starting-visual-studio-2015-3

I just performed a clean install of VS2015.3 and I’m getting this in the Output window at startup:

We were unable to automatically populate your Visual Studio Team Services accounts.

The following error was encountered: TF400813: Resource not available for anonymous access. Client authentication required.

I’m not using VSTS at all, nor have I configured any connections to it. (I do, however, have a connection configured to an on-premises TFS instance.)

How may I dispense with this error message? I’d like to instruct Visual Studio to never attempt a connection to VSTS at startup.

shareimprove this question

In the top right corner of Visual Studio, you will find a colored box with your name or your initials inside. click the down arrow and then Account Settings. In the opening window, please click “Sign out” in the upper left part of the window.

After a restart of Visual Studio and signing back in, the error should be gone.

shareimprove this answer

VS2015 The breakpoint will not currently be hit. No symbols have been loaded for this document

[Origin]: https://stackoverflow.com/questions/36445717/vs2015-the-breakpoint-will-not-currently-be-hit-no-symbols-have-been-loaded-for

I have solution with 3 projects. Project one – Library. Project two – Service (asmx). Project three – Test. In my service I have two config transform: PRODUCTION and TEST. They are equals, but name of databases is different. My solution:

Solution

If I Debug Test with PRODUCTION.config then all right – my breakpoints is active. If I Debug Test with TEST.config then bad. I get this:

The breakpoint will not currently be hit

What could be the problem? Sorry for my English.

shareimprove this question

Fixing:

  1. Right mouse click your project
  2. Select Properties
  3. Select the Build tab
  4. Make sure Define DEBUG constant and Define TRACE constant are checked
  5. Click the Advanced button at the bottom of the Build tabpage
  6. Make sure that Debug Info: is set to full
  7. Click OK and save changes
  8. Clean solution and rebuild the project

Link to source Fixing “The breakpoint will not currently be hit. No symbols have been loaded for this document.”.

(step 6 generates the .pdb files, these are the debugging symbols)

shareimprove this answer

How do you auto format code in Visual Studio?

Origin: https://stackoverflow.com/questions/5755942/how-do-you-auto-format-code-in-visual-studio

To format a selection: Ctrl+K, Ctrl+F

To format a document: Ctrl+K, Ctrl+D

See the pre-defined keyboard shortcuts. (These two are Edit.FormatSelection and Edit.FormatDocument.)

shareimprove this answer

Visual Studio 2013. You do not have sufficient privilege to access IIS web sites on your machine

[Origin]: https://stackoverflow.com/questions/20984624/visual-studio-2013-you-do-not-have-sufficient-privilege-to-access-iis-web-sites

I just installed VS2013 and turned on IIS 7 on my Windows 7 Ultimate x64 machine. When trying to open a solution I get:

Creation of the virtual directory localhost:xxxxx failed with the error: Unable to access the IIS metabase. You do not have sufficient privilege to access IIS web sites on your machine.

I tried running Visual Studio 2013 as Administrator (right click, run as administrator), still the same error. I also did aspnet_regiis -i and it didn’t help either.

shareimprove this question

Go to C:\Windows\System32\inetsrv. Click config folder. You will get a popup – “You don’t have access to this folder – Click continue to permanently get access to this folder”. Perform same for Export folder which is inside config folder. You should be able to open the solution and the web application project will be deployed on IIS.

enter image description here

shareimprove this answer