I'm developing a ASP.Net MVC 5 application using Visual Studio 2019. I also am using Git and GitHub with this project (first time - previously I have used TortoiseSVN).
I've noticed that when I make a change to a Razor View, a red tick will appear beside the file in Visual Studio to signify that something has changed within the View.
However, I can only see the changes I've made within the View if I stop debugging, and then restart. Normally I could make a change to the Razor View whilst debugging, e.g. a text change, Save the Razor View within Visual Studio, and then F5 or Ctrl F5 within the browser and the page with refresh with the latest text change.
For some reason I believe this is related to Git because I have other MVC 5 applications on my laptop within the same folder structure which are not using Git, and this problem does not exist.
Surely I don't have to stop debugging and restart every time I want to see a change to a View?
Could someone please help?
Thanks.
Related
There are many aspects of Visual Studio which are irritating, but one of the most frustrating is that the start page changes whenever a page or folder is clicked in the solution explorer. When the start page is set it should stay as the start page unless the user specifically changes it. What is the point of having 'Set as start page' in the right-click menu if you can do this just by clicking the folder or page?
I'm fed up of constantly having to correct the start page every time I want to run the code. Does anybody know if there is a way to fix this behaviour?
Edit: Looks like it's not just clicking in solution explorer that does this, but clicking an open file as well
I'm creating new User Story (WIT), I have installes tool: Process Editor under VS2018, connected to the project and exported WIT ( User Story ) then i have made some changes. While using previe window under VS2019 i see that changes has been made:
But while using Web portal i can't see my changes, there is only default Agile User Story view:
I have found information what could be the problem ( Enable the new form found on M$): https://learn.microsoft.com/en-us/azure/devops/reference/manage-new-form-rollout?view=tfs-2017&viewFallbackFrom=azure-devops
I've checked all permissions and groups I'm in, inclding Administrator groups, for projects, whole collection ext. On the M$ web site is information that i should click "Enable the new work item form" to be able to use customization i did. But i don't have this option :( :
Can you please tell me what Am I doing wrong ? What have I missed ?
TFS2018 installed on premise.
Thanks.
Please take a look at this ticket: TFS work items opened inside Visual Study no longer open in the web browser, they always open in the Visual Studio editor
According to the response from MSFT:
We have re-design the default landing page for work items in Visual
Studio 2019 which only works with server >= 2019. If server is <
2019, work items will be open in Visual Studio only.
Since you are using TFS 2018 with VS2019, you may have to open work item in web portal from browser directly right now.
But work item in Visual Studio IDE is still using the old Layout forms. Work item in Web Portal is using the new layout. That's why you have seen different behavior.
The using of the new work item form is already updated in your server. On VS you see the old style but on web you have the new style. On the Process editor download page you can find the following:
Process Template: Open and edit a process template (you can only edit
the old-style work item forms, those that don’t reflect the new web
layout)
To update the new form check this page: New web form layout-WebLayout and Control elements
I'm currently playing with Razor and MVC in VS 2017, but, unlike aspx pages, I can't simply view in browser to see what it looks like when rendered, instead I have to copy it to the host and view it live on the internet.
Is there a way to view in browser without publishing it remotely?
Thanks
In Visual Studio, from the main menu select:
View -> Toolbars -> Standard (Make sure Standard is checked)
Just below the main menu, you should see a row, or many rows, of icons. You want to look for a green arrow icon. After locating the green arrow and clicking on it, Visual Studio will attempt to first build your project, which if successful, will then proceed to run your project in localhost. If it doesn't build you will be notified and you can review the Error List tab at the bottom of Visual Studio as to the reasons why.
After a successful build, Visual Studio will open your default browser automatically and redirect itself to the localhost and port number of where your application is running. You should now see your application running. It will have a url in the browser something similar to the following https://localhost:5000/
New_bie_developer_from_php_background.
I am developing an asp.net MVC web app using vs2017 community edition.
I want to make my development environment in such a way that I can edit code, build and refresh the browser to see the changes and again you can edit without stopping the server.
But in VS the approach is different. You have to stop the server, edit code, start server again (which makes the server code uneditable).
Does the vs can be modified to match my requirements? ie to edit, build and refresh the browser.
Partial solution can be to start your app in a Launch without Debug mode (Ctrl+F5).
That way, ASP.NET will be automatically picking up changes you are making in your code. However, in this mode you will lose debug features (hitting breakpoints, getting debug-related messages etc.).
There are two ways to do this. First is to click on pause
or use keyboard shortcut keys (Ctrl+Alt+Break). Edit your code and click continue.
Second is by go to Properties of your project (by right clicking project in visual studio's solution explorer) => select Web from left nav and check the Enable Edit and Continue checkbox. Now you can add break point and when it get hit you can edit your code. Now Refresh your browser.
One of my project build in MVC5 where I need to modify in view, but in this project I could not able to add view by right click option ( both from view folder as well as from particular controller). I copied another existing view and rename it as per my requirement, but in that view Intelsence is not working.
Can anyone suggest me any patch up missing anywhere?
Thanks in advance..
You have to modify your vs2012 asp.net-mvc-5-vs2012
Visual Studio 2012 update 4
Web Tools 2013.1