Visual Studio MVC Site.css changes not taking effect - css

I tried changing some attributes of MVC application Site.css but running it doesn't seem to recognize the changes because I don't see any of them in effect. Why is this? I am just new to ASP.NET MVC project development.

Please elaborate on what are the changes you made? Makes sure you are referring the correct version of site.css. Also try Ctrl + F5 to replace your cached version of css.

Related

Bootstrap update only working on Debug configuration (Visual Studio)

So I recently update from bootstrap 2 to bootstrap 4. I then changed the syntax, grids and such. The website was running/building fine in debug, however, when it comes to release, it won't work. It can build without errors, but when I run it, it seems like the site has the new syntax and classes (the code running is the one i changed) but bootstrap is still at v.2. I checked multiple times, there are no bootstrap 2 files left, nor any cdn references. I can see it still is running bootstrap 2 by changing classes from col-12 to, say span12. It works fine in debug, but not in release. Any clue why ?
Also, the site is running Asp.NET Core MVC Razor.
I think you might have a bundle-ing configuration issue.
Please verify your bundle configuration (App_Start\BundleConfig.cs) and the web.config settings and pertinent web.config transform.
You can find documentation on how to configure your bundles here : Bundling and Minification (assuming you're not using ASP.NET Core)
For ASP.NET Core it a bit more complicated because you can have multiple ways of doing the budleing. Documentation for it can be found here: Bundle and minifiy static assets in ASP.NET Core.
However, I think that is pretty probable that the production version of your app is still targeting the old Bootstrap version because of the bundle-ing configuration

asp.net MVC Bootstrap, replacing the .min.css file

This should work and I have no clue why it doesn't, literally all I am doing is creating a new ASP.NET MVC Web application in VS15 Community, and then I replace the existing min.css file with another one (from bootswatch). And it doesn't change anything.
I have practiced mvc for a bit and every time I tried to change my layout later on in the project, it worked every time, but now as I just decided to get it out of the way straight up it just doesn't do anything.
You'll want to change the non-minified version as well.
Edit: Because the minified version is used when you publish and the non-minified version is used during debug, generally.

Asp.net web application with vb.net in codebehind VS2005

I´d like to know if there is any way to edit the codebehind of an Asp.net web application while debugging?
When I try this, a message is displayed on the status bar saying "cannot currently modify this text in the editor. It is read-only".
The application is actually running off of a compiled version of your code. If you modify it it will have to recompile it in order for your changes to work, which means that it will need to swap out the running version for the new compiled version. This is a pretty hard problem - which is why I think Microsoft has made it impossible to do. It's more to protect you from THINKING some changes were made when they really weren't.

Website running .NET 3.5 cannot use feature not part of ISO-2 specs

I am getting this error a lot:
Feature '{insert feature here}' cannot be used because it is not part of the
ISO-2 C# language specification
I am working on a .NET 3.5 website that I've worked on on and off for about two years. I've never seen this error before my most recent around of updates. I'm using a decent amount of LINQ coding throughout and I get these errors related to much of the LINQ code. Based on what I've read it seems like even though I'm using .NET 3.5, for some reason it thinks I'm using 2.0. But I can't find anything that says how to fix it.
One example of a problem is that if I try to add a new item to the App_Code directory, I do not get the option to add a LINQ to SQL dbml file.
If anyone can shed some light on how exactly I would fix this, I would much appreciate it.
I was unable to locate an "Advanced" option under the build tab. I have a feeling it is probably because it is a web app. I looked through the web.config and found 2 parts that may be important. Most things referenced 3.5.0.0 or v3.5. The settings are consistent with older backups of the web.config from when there were no errors. By the way, only intellisense and things within VS2010 are giving me problems. The website is running error free.
I have completed a total uninstall and re-install of VS2010 and I'm still having the same issue. I fired up my old install of VS2008 and I am NOT having this issue there. However, I would MUCH prefer to use VS2010 on this project.
I opened the website in VS2010 on my work computer, and there are no errors reported. This is making me think that there is something on my laptop that is causing the problem. As I noted above, I completely reinstalled Visual Studio 2010 and I am still having the problem. What does this leave? I have only one extension installed in VS, and it's the same one at work and on my laptop. Also, I did not reinstall the extension after reinstalling VS, and the problem persists.
Both PC's run Win7 Ultimate. Have VS2008 and VS2010 installed. VS2010 has the same extension installed on both. On my laptop I have the full version of SQL Server 2008 installed, but only the Management Studio on my desktop (we have a server in the office). Would SS2008 have anything to do with it?
Go to your project properties, the Build tab, Advanced - that should allow you to set which version of C# you want to use. It should default to the latest version supported by the version of Visual Studio you're using, but it sounds like at some point you've switched it to ISO-2.
(That's certainly true for Windows projects and class libraries - there may be a different location in a web app. In particular, have a look in Web.config.)
If this has only started happening recently, I'd have a look through your source control history at changes to any configuration files. Also try creating a new project of the same type, and see if that has the same problem.
Jon Skeet's answer is mostly correct. The location for the update is in the "Property Pages" which I got to by right-clicking on the name of the website, clicking Property Pages, the Build item, then target framework.
The extension I use, Solution Navigator, has it's own heading for the solution. Right-clicking on it DOES NOT give me the Property Pages option. By chance I right clicked on the title of the website under the solution heading and was presented with the Property Pages option. In there was the Build tab which contained the target framework option.
Once I finally found the target framework option, it was indeed set to .NET 2.0 for some reason. I changed it to 3.5, reloaded the solution, and now it works great.
Thanks a million Jon for your help and time working with me!!

UpdatePanel in upgraded project vs new 3.5 project

I can get an UpdatePanel control working(partial postbacks) no problem with a new fresh .net 3.5 project. I've overcome many of the pitfalls that are answered here on this site. (scriptmanager on the page, using triggers, or placing the button within the panel itself.)
If I have try to use the UpdatePanel on a project that was originally a .net 1.1 project, upgraded to 2.0, now recently upgraded to 3.5, I can't get partial post backs for anything. At this point the code is exactly the same within the form. My relevant web.config parts are the same, and from what I can tell my .proj files too are the same.
Anyone have any ideas here?
Have you checked to make sure you aren't still caching the assemblies? I know the AJAX control toolkit required you to "copy local". Make sure you eliminate that as a possibility.
I've checked, and the copy local is set to false on all references. Any other check to see if caching is a problem?

Resources