Once setup, you can run the web application directly from Visual Studio 2010 by running with Start Debugging (F5) or Start without Debugging (CTRL+F5). Running Your Web Application with IIS Express From Visual Studio 2010 Intranet Application), you also need to modify the nfig file in C:\Users\\Documents\IISExpress\config directory (You need to replace with your real username in your computer).Įdit \My Documents\IISExpress\config\nfig If your web application uses Windows Authentication (i.e. Just click OK, Save Selected Items (CTRL+S) and close the tab. If the application is run for the first time, Visual Studio will ask if Virtual Directory can be created. Select the Web tab and make sure the radio button Use Local IIS Web server is checked. Open the solution using Visual Studio 2010.įrom the Menu, select Project, Properties. Setup Microsoft Visual Studio 2010 to use IIS Express
You can also install IIS Express from Microsoft Web Platform Installer. Keep clicking on Next until the last page. We can also load the DLL in REPL with the help of the #r command, followed by the path of the DLL to load in the C# Interactive Window.Ĭ# Interactive Window also supports error handling in both compile time as well as runtime.Download Microsoft IIS Express 7.5 MSI file.ĭouble-click on the iisexpress_1_11_x86_en-US.msi file and you’ll see the IIS 7.5 Express Setup Wizard dialog as shown below pops up. Test the method by passing the parameter value in the method. Now select the method or function you want to test in the C# Interactive window and right-click and select Execute in Interactive. Check the below example, I have created a Calculator class which has an Add, Subtract, Multiply, and Divide method. For this, we have to just select the method which we want to test/access in the C# Interactive Window. We can execute any code block in the Interactive Window. Intelligence feature is also available in the Interactive window, which makes it easy to use.
C# Interactive window supports C# 6 and C# 7 as well. In the below example, I have declared a string variable and displayed the output in the C# Interactive Window. We can execute C# code in the interactive window easily. History Next: For checking the next step/command executed in the C# Interactive Window. History Previous: For checking the previous step/command executed in the C# Interactive Window. Reset: Reset will reset all the DLLs, methods, etc., loaded in the C# Interactive window.Ĭlear: Clear will clear the screen of the C# Interactive Window. The C# Interactive window has 4 options in the window that is as below: C# Interactive mode will be available in the command prompt. cs file and then click on Execute in Interactive (shortcut is Ctrl+E, Ctrl+E).įrom Visual Studio command prompt: Open Visual Studio Developer command prompt. We can open C# Interactive window in multiple ways:įrom Menu Bar: Go to View Menu then move the cursor to Other Windows and then click on C# Interactive.įrom context box: Right click on the. Open C# Interactive window in Visual Studio. With the C# Interactive window, we can test our code snippet without compiling or running the complete code. Read-Evaluate-Print-Loop with an advanced editor. In this article, I am using Visual Studio 2017 for demonstration purposes.
The C# Interactive window has been a part of Visual Studio since the Visual Studio 2015 update 1 release.
In this article, we will learn how to use C# Interactive in Visual Studio.