Visual Studio 2015 Preview - Keep IIS Express Running - iis

I'm trying to get a decent development experience with Visual Studio 2015 Preview.
To do that I'd love to have my IIS Express running all the time instead of requiring me to start debugging.
Anyway to do that? Tried command line:
IISExpress.exe /path:pathmyproject/wwwroot
IISExpress.exe /site:SiteName
and
IISExpress.exe /path:pathtomyproject
First two give me:
Unable to locate project.json
Third one
HTTP Error 403.14 - Forbidden

Not exactly an answer, but if you can view in browser instead of Debug.
The command for view in browser is: CTRL+ SHIFT + W (or right click on project and select View -> View in broswer.)
IIS Express will start but will not close when you exit your browser.
Hope this helps, this is what I do (specially now that build/compile is no required with roslyn).

Similar to VS 2013, if you disable Edit and Continue IIS Express will continue to run when you stop your debug sessions.
Open the menu item Tools/Options, look for the Debugging/General option. Scroll down and uncheck "Enable Edit and Continue"

in the Debug menu > Start without debugging (Ctr + F5)

Visual Studio 2015 Update 3 adds the support to keep IIS Express Running
For ASP.NET Web Application projects, when "Enable Edit and Continue" checkbox is unchecked, the IIS Express process will no longer stop working every time you stop debugging.
Visual Studio Update 3 RC Release Notes

"Enable Edit and Continue" checkbox does not exist in visual studio 2015 update 2!this is best solution for this problem

I just unchecked Edit & Continue option under project properties -> Web -> Debugger.
I'm using VS2015. It is working for me.

This problem occurred to me when trying to run a cloned project. The solution that worked to me was installing Microsoft.NET Core 1.0.1 VS 2015 Tooling Preview 2.
Go to Tools --> Extensions and Updates --> click Updates
Look for Microsoft.NET Core 1.0.1 VS 2015 Tooling Preview 2 and install the update if it is available.

Related

Opening Project from TFS Dashboard causes Visual Studio Web Handler Exception

I'm trying to open a project from TFS 2018 (on-premises installation but I guess that would happen with any version or VSTS as well) dashboard but I can't.
I click on url Open in Visual Studio:
And an error form shows up:
The error description says:
Input args:/openurivsweb://vs/Product=Visual_Studio&EncFormat=UTF8&tfslink=dnN0ZnM6Ly8vRnJhbWV3b3JrL1RlYW1Qcm9qZWN0L2I1MjI0OWRjLTdhMDUtNDI1Yi1iZTE5LWNmMDM5YzE1YTJlND91cmw9aHR0cHM6Ly90ZnMubWFucG93ZXIuaXQvTmV4dEcv
Exception thrown:'Microsoft.VisualStudio.VSWebHandler.VSWebHandlerException'.
I have installed both VS2012 and 2017.
I tried also this workaround, but with no success:
Launch Developer Command Prompt for VS 2017 as Administrator
Go to VS 2017 installation folder, for example: pushd C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise
Launch command: gacutil -if Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.Shell.Interop.8.0.dll
In the Windows Default Apps panel open the protocol handlers and scroll down to the vsweb: and the vstfs: protocol handlers. It could have multiple instances of the handler, one of which has to have the 2017 icon. Mine is showing 2 2017 icons because I have the 2017 preview installed side by side.
Change the default, restart the browser and try again.
In addition to jessehouwing answer, that works for Windows Metro UI systems (8 and superiors), this is what you need for Windows 7.
Go to Control Panel, select Default Programs and click the second option:
Then it opens the window where you have to change the association between Visual Studio Web Handler Selector and TFS Procotol Handler (vstfs:):
From the icon, as suggested, you can see that's Visual Studio 2012 symbol.
Now we change it:
Sorry bout Italian language, but procedure would be the same with any localization.

Visual Studio 2015 can't start IIS Express

When I am trying to run an ASP.Net Core project in Visual Studio 2015, a Microsoft Visual Studio dialog appears "The project doesn't know how to run the profile IIS Express".
Does anyone know anything about this message, or how to fix it? I've searched Google and the MSDN. There's nothing in the build logs, or the Windows event log.
This dialog showed up for me when I had migrated a project from dotnet RC1 to RC2.
Before the fix I could still run it using dotnet run and from Visual Studio choosing the profile other than "IIS Express".
I had misread this guide and forgot the .Web
\DNX\Microsoft.DNX.targets –> \DotNet.Web\Microsoft.DotNet.Web.targets
After fixing this and restarting Visual Studio(not sure if needed) I could run the project using the IIS Express profile.
Should also be noted that as per the comments, adding .Web in the top level node is required in the xproj. <Project Sdk="Microsoft.NET.Sdk"> should be <Project Sdk="Microsoft.NET.Sdk.Web">.
In my case the issue was solved after added the ASP.NET and web development tool extension to my VS instalation.
To clarify the answer from hultqvist, it is a problem with the xproj. To fix it, edit the xproj directly and change this
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets"
Condition="'$(VSToolsPath)' != ''" />
to this
<Import Project="$(VSToolsPath)\DotNet.Web\Microsoft.DotNet.Web.targets"
Condition="'$(VSToolsPath)' != ''" />
That is, insert Web twice.
There is an associated issue in the aspnet tooling repo.
I had the same issue and found a very simple solution for Visual Studio 2017. In Visual Studio 2017 go to Solution Explorer then right click on your project file. In the menu you will see "Set as StartUp Project". If you can select it then select it. Now run your project again.
I had a similar issue but with "MyProjectName" instead of IIS Express.
In my case, I was trying to start as a standalone application, so I cleaned the launchSettings.json
I inadvertently changed the "commandName" parameter from "Project" to "MyProjectName" and that caused the popup to show up.
Resetting it back to "Project" solved my issue, silly me 😁
I had a similar issue, In my case ASP.NET and web development is enabled but Development time IIS support is not checked in the optional sections.
Once I enable the Development time IIS support solved my issue.
You can get this error with RTM if <BaseIntermediateOutputPath gets corrupted or is incorrect in your .xproj file.
I had this same issue and after digging around for a while I discovered that I had dotnet preview v1.0.0-preview2 installed under Programs Files (x86) and a non-preview version in x64. I think VS is launching the x86 (preview) version but expecting to see the full version. To fix this, I did the following.
from programs and feature uninstall every visible dotnet core. (note: this did not remove the x86 preview)
go to https://www.microsoft.com/net/download/core#/sdk and install BOTH x86 and x64 SDK packages
open command line and from the root directory check run: dotnet --version (at the time of writting it was 1.0.4
fire up .net core project in VS 2017 and run.
When I did all of the above, I was able to start up the site in IIS Express from VS.
This happened to me after a failed update of visual studio 2017 15.9.4
Setup completed with warnings and when I checked the problems saw that .NET core SDK 2.1 installation is failed.
I will try to install it manually.
Otherwise currently the only solution I found is to uninstall visual studio and re-install it.
In visual Studio 2017, i fixed this error by doing the following two steps.
I went to add or remove a program in windows, and deleted everything ending with ".net". I then reinstalled them in the visual studio installer. Then loading the project again produced a new error, which condiosluzverde provided the solution to here:
How Can I Fix the Microsoft Visual Studio Error: "Package Did Not Load Correctly"?
Same thing happened to me, my project was working fine. I didn't do any RC1 to RC2 update & this popup appeared from nowhere.
I fixed the problem by updating visual studio. You can also consider repairing VS.

VS 2012 could not start debugger error

I hope some one can help me it is bothering me this issue for 2 days for now. When I try to debug an app I allays receive the following message:
Unable to start debugger error code(0x80040154), It this problem persists may be a faulted instalation. Please go to control panel add remove programs and reapir instalation.
This happened after installing the VS 2012 Update 2.
So I uninstalled the update 2 but the issue remained.
I did a VS repair, the Issue remain.
I did re install of the VS (uninstall-> re install from scratch) + the update 1 but after this, the VS could not start simply (VS stopped responding...checking solution on line...closing the app).
So I do not do a complete format of the PC because I have a lot of stuff in it.
If any one can suggest a way to resolve the issue I will be very grateful.
UPDATE:
Uninstall the update 2 of the VS 2012 and then start the repair tool, then install the Update 1, start the VS in safe mode, uninstall the extensions, and re install the exensions...it works...but do not install the update 2
I have similar problem. I cannot start debugger after installation update 2 for Visual Studio 2012.
I cannot find any dependency on other things. This ocuring only on my PC, another comupers in my office are OK although they have same HW and SW (OS and other programs installed from same deployment image).
This error is firing because of an administrator rights issue.
Please right click the shortcut of Visual Studio 2012 and click "Run as Administrator".
If you want to permanently enable "Run as Administrator" option:
Right click shortcut and select properties
Click Advanced
Check "Always run as administrator" option and click OK to close dialog box.
go to registration and delete microsoftvisualstudio registration file
Removed the registry entries.
Note that I did not delete or clean up HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\11.0 which contained the license key
best regards

there was an error attaching the debugger to the role instance

I am getting an Exception when I am trying debug my application on Emulator (Web Role).
you can see exception by clicking following link
Configuration which I am using Windows 7 pro, VS 2012 Pro, Azure SDK 1.8
Hope it might help others.
I Also had the similar problem and I restarted PC and **Run Visual Studio as Administrator**.
And let Visual Studio start the emulator with same privilege resolved the issue.
I was using Visual 2013 and Web API application under IIS Express.
Do you have IIS added? Most likely it's already installed but you've to enable it via Add Windows Compoenents on Control Panel...
I had this same issue all of a sudden, luckly I remember changing the ServiceDefinition.csdef file. I rolled this back to an earlier version and the debugger ran again correctly. The only thing I changed in the 'broken' version was instance size from small to medium.
Go to visual studio installer(search it from window's start)
and update the visual studio.
After updating, hit modify
button, after that on right side you will find a box named
debug (or something like that), select that box
Then hit install.
Restart your visual studio and debugger will start working.
In my case it worked perfectly.

Start debugging button unavailable in a VS2012 project

I'm using visual studio 2012 and I don't find the button start for debugging.
Instead, there a button "Attach".
How is it possible to enable Start button.
I have only one project in the solution that I imported from vs2010.
When a create a new project from scratch, Start is available.
You can solve this issue by right clicking the project in Visual Studio and setting it as the 'StartUp Project'.
I had this problem and it turned out that, even though the status bar was blank, it was still building (reeeeally slowly).

Resources