Visual Studio Express 2010 css file stops working after I edited while debugging - visual-studio-2010

I am using Visual studio express 2010. I downloaded it about 2 weeks ago. I have been building Asp Net WEB Site (Razor.) I have a rather simple class in a css file being referenced from a helper file that is called from a content page.
All the styles in the css files were working as planned. While using the debugger, I changed the colore value of the css class to what is shown bellow. Visual studio does not seem to see the change. I have gotten out of the debugger and tried to change it again. When I enter debug again, The original (prior to the change made while debugging) styles are shown. All other changes in the css file are being ignored as well. I have tried to use alt F5 to enter the debug to clear browser.
This is the class that I changed in the debugger:
.NavMainButtonSelected
{
background-color:Red;
}

In the browser, try Control + F5. You can also set the browser to renew every single hit on the page (not a bad idea on a development machine).

Press Ctrl+F5 in the browser to force it to ignore its cache.

Related

Visual Studio 2010 Reset Default Web Browser Everytime I (Un)Install An Extension

Why does Visual Studio 2010 change the default "View In Browser" setting back to the default browser every time I add or remove an Extension from the Extension Gallery? My default browser in Visual Studio (for use with "View in Browser") is not the same as the one I use in Windows.
The two actions seem like they should be completely unrelated.
This seems to be a known bug: https://connect.microsoft.com/VisualStudio/feedback/details/568469 . And it should be fixed in "the next version of Visual Studio" (whatever that means), as stated in other duplicates of the same bug.
In the 'alternatives' section there are some workarounds. I haven't tried them though.
There is a nice extension that can help to overcome this problem - WoVS Default Browser Switcher - you can look for it in VS gallery. That one always helps me with this issue.

Default Browser- Visual Web Developer Express 2010

I am trying to debug a Windows Azure WebRole which is an MVC3 project, but I want it to launch in any browser of my choice.
The Windows Azure is set as the Startup Project and launches the MVC3 project WebRole.
I am using Visual Studio Web Developer Express 2010.
I have previously stabbed in the dark by setting the following properties as in the image below but to no avail:
I then decided to set the project to not independently launch a page as above.
Is there a way to setup a default browser with the above scenario AND without changing my Windows default browser?
I've gotten around this in the past by adding in an ASPX or HTML page to the project and then right clicking it and selecting Browse With. You can then change the default browser in there without having to change your default browser within windows.
I haven't tried this with the Express edition however, but I don't see why they wouldn't include it in there.
You can delete the file afterwards and it will still retain the setting.
How about this:
WoVS Default Browser Switcher
http://visualstudiogallery.msdn.microsoft.com/bb424812-f742-41ef-974a-cdac607df921
You right on the page shown in solution explorer and then browse with whatever browser you want to set and add it as default browser.

Clear ASP.NET MVC3 browser debug preview in Visual Studio 2010

How can I clear the cache of the web browser in such a way that it will show me the updated page when I run a debug of a ASP.NET MVC3 application in Visual Studio 2010?
Is there some easy way to do it?
The problem is that I'm working on a project and every time I modify something in the CSS style the debug "preview" in the web browser window will not update. Even if I recompile, rebuild the solution and so on.
I normally press F5 (in the browser) to fully reload the page, and all referenced resources.
This works in any browser I know (IE, FF, Chrome, Opera).

Visual Studio 2008 doesn't generate itself code for added control in .aspx.designer.cs

I added a control on my .aspx page and set Id and runat=server for it but, it doesn't render on my page when I open it in browser as well it doesn't generate code for it in designer file.
Try that:
1) Remove your_page.designer.cs file.
2) Go to the ASPX page and cut markup, then paste it.
This should force Visual Studio code generation from scratch.
Another try would be check that your control compiles. Sometimes the whole control doesn't compile and you can't add it to the page with success.
Finally, if non of these works for you, you can clean and rebuild your Visual Studio solution.
Matias's appraoch should work another way of doing this is:
Delete the designer.cs file that is causing issues
Right click on the aspx file and "make application" (or something to that effect)
This will regenerate the file.

Visual Studio 2008 ASMX files

This is not technically a programming question but it does specifically relate to a heavily used programming tool so i think this is the correct place for it.
In Visual Studio 2008 if i have an asmx web service and i double click on the asmx file it opens the asmx.cs file, this is eminently sensible seens as there is just a single line directive in the actual asmx file. However if i click on the asmx.cs file directly, it tries to open it in "design" mode, i.e. the mode for aspx files where it shows you a visual designer rather than the markup. The result is you either get a grey screen saying that this file type cannot be viewed in design mode or you just get a wierd visual studio exception handling page. All i'm doing is double clicking on the asmx.cs page. I can post screen shots if anyone is interested. I have observed this behaviour on my coleagues machines as well so it does not seem to be some wierd quirk on my particular install. Has anyone observed this behaviour? can anyone reproduce it? Is it a bug? Is there a service pack that fixes it? Is it some wierd setting i have been unable to locate. It is not a show stopper becuase double clicking the asmx file opens the relevent code file but I would like to fix it if possible.
The .asmx file is essentially a markup file that points to a code-behind file. Since the markup is never changed, the (pre-VS2008) VS developers thought it was a good idea to display a warning screen instead.
To avoid this warning screen, you can right-click the .asmx file, select Open with... and set the Source Code (Text) editor Editor to be the default. In VS2008 and VS2010, the code-behind will display when you double-click the .asmx file in the future.
If you want to view and/or edit the markup of the .asmx file, simply right-click the .asmx file and choose 'View markup'. Not sure if this works in VS2008 (don't have it here), but it works in VS2010.

Resources