What Visual Studio extension do I need to view real-time changes to my code? - asp.net-mvc

I am building a project using ASP.NET MVC CORE. I want to be able to run my project and see the impact of my code changes in real time, i.e., I see the changes on the browser as I tweak things in Visual Studio 2022.
What extension do I need for this?
I realise this question has probably been asked before but I haven't been able to find the answer here or through Google.

I discovered the answer to this question this morning. I only need to hit F5 in the browser and the code changes will show.

Related

How to remove the older projects entries/list/history from the Visual Studio Opening Window?

All the Recently worked projects will be available in Visual Studio Opening window.
Even if the projects are removed from our file explorer, those names will exist in the VS Opening Window.
I'm able to delete those recent projects entries/history one at a time by using this option:
My Question is:
How to delete all those history/entries at a time to see like the below window (screen)?
I have posted the same question on Super User and that answer helped me to clear the recent projects history after opening the Visual Studio IDE.
Also, while searching for this information, I learnt a lot from many other solutions like How many recent entries we have to keep when opened the VS and the other ways to delete them.
One of the references contains many ways to this issue is C#Corner Article.
But the ClearRecent extension in Visual Studio is a better solution as given in the above answer.

Visual studio unable to evaluate anything in debug in any page of my blazor webassembly

I have a blazor webassembly app that is working fine and it is split in webassembly talking to a web api version all .Net Code
I use VS community Edition 2019 and suddenly after many modifications to my code I noticed that I am not able to debug and see any variable content(unable to Evaluate) at any break points anywhere in my web assembly app. I tried with an old version of my code which I know it was working then and same issue, so it is not the code.
I tried upgrading VS to 16.11.75.64347 ( from 16.6 something) without success and even uninstall & reinstall VS with no success.
The only new thing on my station was a windows update this week.
Is someone had something similar happening this week?
ps: What is weird is that I do not not have this problem in my web API solution portion just the webassembly solution.
I think I've been badluck to find many not working thread but finally it was simply to close VS . delete the .vs directory tehn relod the solution and it was OK. It is weird though that many old version of my code that never had this issue had the same problem. It was impossible to have all those .vs not working although I had not touched them in weeks. Anyway it is now working.

Publishing from visual studio to windows server 2012

i have a Mvc 4 project i would like to publish on a windows server 2012. On the windows server 2012 i have setup IIS 8 and Sql express. Do you know of a good guide to set this up? My issue is that i can't get the database working. I would like to make it so i can easily publish changes to the website. Any ideas how to do this?
is it possible to setup Visual studios on the server for the nuget package console?
the only way i have got this working was to copy the entire database to sql express but if i change anything i have to do it agian. Not a very stable solution.
Best regards John,
It's not exactly clear what the problem is, but I'll try to give a couple of pointers.
First, nuget shouldn't be involved in the deployment per se; it's involved when building the project, but once you get a deployment package it should contain everything the project needs - look at setting up the deployment using the visual studio built in tools, i.e. see this MSDN link.
The database is a separate side of this. You say you can't 'get it working' which I can't really help with since there's no details - you need to be familiar with connection strings and change your connection string during the deployment so your app can connect to the right database. The publishing wizard linked above can help with this as well, or you can use config transforms, or any number of other mechanisms.
Documentation here has details about what you can do on the database side. The publishing wizard (when using web deploy) can read the database schema and even make schema comparisons so you can deploy schema updates, but I've never actually used that solution - I usually need more control over what happens so I manage my schema upgrade and downgrade scripts myself.
Since there are many problems compounded in this question I suggest you ask a separate, more focused, question about each one.

How do teams work on VB ASP.NET MVC sites?

In PHP, you can just log in to the FTP and see all of the files. I notice in VB ASP.NET MVC when I publish a site it doesn't include the controllers or models. Rather, it seems to compile them into DLLs. How can the files be modified with out access to the originals? Would a developer have to publish the files in a separate directory and then the other developer pull them down and open the project in visual studio?
Keep your SourceCode in a Version Control System like SVN /GIT /TFS etc.. Whenever you want to make an update , Get the specific version you want to update and make update to that.
Having a Version control gives you so many advantages
1) Collaborative working. Many members of a team can work on same code base without overwriting conflict
2) Restore to a Previous Version : Something wrong with the current production move ?. Just get the Previous version (Label) which is working fine (and was running in prod) and rollback to that till you fix the issue.
Keeping the Previous versions of code will save a lot of time in a Programmers / Team's life.
This SO question has good points about why we should use version control.
Version control is not only for Teams. Individual developers can keep their code in Version controls and sleep nicely
Btw, Your MVC project's Model classes and Controllers classes are compiled into the DLL files.
I've seen a lot of companies that work with Visual Studio implement Visual Source Safe.
information can be found here http://msdn.microsoft.com/en-us/library/3h0544kx%28v=vs.80%29.aspx
otherwise it's pretty much what Shyju said.
In a professional environment, there is a very clear distinction between editing source code, and deploying to production. You seem to make no distinction.
Usually developers make changes under careful control using a source control system like SVN.
Build & deployment is then done separately by a dedicated team member. Developers do not touch the production servers willy-nilly.
How can the files be modified with out access to the originals?
I don't understand. If you want developers to have full access to the production environment, why not give them full access to the source code as well? In your PHP example this is a given.

ASP.NET MVC Razor designer

I am introducing ASP.NET MVC to a new team and one of the questions that comes up often is "Is there a designer view"
Even if it's not for layout is there an IN visual studio design view for ASP.NET MVC3 using the razor view engine.
No, there is no designer. It would likely be difficult for a designer to even know what is meant by Razor code in many cases.
It's really not so difficult to just use your web browser as a viewer. You can make changes to the HTML without having to recompile, just make the change, save, and refresh your browser.
EDIT (8/2/2013)
Since this answer was originally written, Microsoft has released Visual Studio 2012 which includes a feature called Page Inspector, which while not a true "designer" in the way that the question was written, it does give a much nicer semi-live preview mode. This has been improved in Visual Studio 2013 (which was RTM'd today, 10/17/13).
I use a web browser window and set the url my localhost in place of the designer.
view > "other windows" > "web browser". I then split the windows vertically or horizontaly.
I was able to work using the following trick:
change the razor file's extension to .html
Open the document
with the document open, change file extension back to .cshtml
Congratulations, you now have a designer's view of the razor file. If you need razor intellisense, close and re-open it.
No, in general you should try and steer clear from visual designers. The combination of HTML/CSS/Javascript is something that just cannot be done well with visual designers and the short term pain of learning these manually will be well worth it. Once you know these well you will be coding in a cleaner and quicker way. I often use Expression Web to do initial layouts before copying it to Visual Studio.
I know I am late to the party, but..
You can trick the IDE as mentioned above, but if you are building applications in MVC, you should be comfortable in code view. It is more productive and most of the responsive design and css implementation can give you false results in design view. Designer is useful in WebForms. But with the Browser Link feature in Visual Studio 2013, there is no longer any reason to trick your IDE, you can have one-to-many browsers open and get live updates back and forth from browser to visual studio. Can't beat that! The browser is where it's at!
Browser Link!
Install the following and you will be golden!
Microsoft Visual Studio 2013 Update 3
Web Essentials (Dependent on VS Update 3)
I think they are working on that as a feature for Expression Blend 5 Developer Preview .
They clearly recognise the issue of designing JS in the designer so I suspect they realise the same applies to some designers working on MVC applications.
I was told by someone from Microsoft "I think in Blend for HTML, using interactive mode, you would probably be just fine with designing MVC or MVVM patterns"
Also check out Visual Studio Page Inspector it looks like it will do what is needed
In Visual Studio 2013 added browser link this allows two way communication between browser and Visual Studio. It means you can refresh browser when you change code and instantly see how it looks. Also you can change Css in the browser and have it saved in Visual Studio
There is workaround it is mentioned here http://www.codeproject.com/KB/aspnet/EnablingDesignerSupport.aspx

Resources