I'm working on a "Website Project" (as opposed to an ASP.NET Web Application) which we received from another company as part of an acquisition.
In general it works fine, however every time I close the project ("File" -> "Close Project" or just "File" -> "Exit"), the IDE crashes.
If I create a new project this doesn't happen, and it doesn't happen for any other project/solution file I have handy.
The other information I have that might be useful is that this project may have stared out as a VS2008 project, and previously it was under Microsoft source control (it's under Subversion now).
This is a reported VS bug from 2008 to vs 2010.
Here is a direct link: http://connectppe.microsoft.com/VisualStudio/feedback/details/577369/vs2010-crashes-when-closing-project-or-ide
Ya I had a project like that once. Chances are there are 1001 possible reasons. Just start a new website project, copy over your source files, and cross your fingers. It's not worth trying to figure it out, since it works fine otherwise.
Related
Ok, so I start a new project in Visual Studio (currently updated to update 3) and choose ASP.NET Web Application (.NET Framework).
Then I choose the Empty template and to add the folders and core references for Web Forms.
Ok, great, so I add a webform to the project and then find there's a problem:
Design view or even Split view is not available for the new aspx page.
Pressing the buttons 'Design' or 'Split' do nothing and only the source is seen, which also becomes uneditable.
Now I have seen this issue before and searched and searched for an answer. But the only solution was a complete reinstall - this means a few GB download and then hours of the install program doing whatever it does (it is the slowest install for anything on any platform).
This issue seems to occur randomly, and once it occurs, it seems to be permanent, short of a complete reinstall of VS.
Is this a fault in Visual Studio that will never be fixed?
Does someone actually know how to fix this other than a complete reinstall?
Please do not suggest to try 'Open With' on the aspx file - yes I have tried every option and the original default is the correct one.
Answers from the Microsoft forum are about as helpful as giving wheels to a tomato, such as here. It has even been highlighted for Visual Studio 2008 here. Someone seems to have tried to raise the issue last year here.
I'm working on a large-ish web forms application and VS has stopped updating .aspx.designer.cs files in the last few days.
It seemed like the designer updates initially became flaky (sometimes update, sometimes not) then stopped updating altogether. Now I have to manually edit the designer file after adding a control to a page before I can compile.
I've searched and tried all the suggestions like switching from markup to design view and back etc - no change. The only thing that kind of works is this but even then the generated designer file often doesn't contain references to all the controls on the page. And also that only works on a per-file basis. Ideally I would like the whole project to update/generate designer files correctly again.
I've tried cleaning the solution - no change.
VS details:
Microsoft Visual Studio Professional 2013
Version 12.0.40629.00 Update 5
Microsoft .NET Framework Version 4.6.00079
Installed Version: Professional
Any suggestions appreciated - thanks.
Make sure you're not running the application/site while adding controls. I've noticed that VS will lock the designer files while in debug mode and doesn't sync up when you exit debug mode.
Also, your link is broken, doesn't point to anything so I can't see what you were referencing to.
I think what caused this was a somewhat flaky local install of the project from TFS. It compiled but still had red squiggly lines under a few namespaces at design time. Once the project references were all clean the designer files were also updating correctly.
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!!
I have been working on a MVC 3 application on my laptop, which now has crashed. I have uploaded the newest edition of the site through the "Publish" method in VS2010. Is it possible to retrive the source code of the application? Because i cant see the Models or Controllers on the FTP.
Thanks
I have used a decompiler before to get back source code from a compiled website.
It doesnt give you the files all nicely ready to start developing again, it is a bit pain staking going through the decompiler and getting all the code you need out. But it can be done.
I cant remember which one i used, im sure a quick google will give you loads to choose from. I think there might even be one shipped with vs.
i have problem with Visual Studio 2010 on Windows 7 x64. When i started asp.net site debugging, it stoped working. Only solution is restarting IIS.
Have anyone experiences with this?
Thanks
As Peter mentioned, manually attaching through the Attach to Process dialog should work.
Another option is to temporarily update your project to .NET Framework v4.0. In the IDE, this can be done in 'Build' section of under project properties.
We are still investigating the issue to find a longer term solution.
Sorry for the inconvenience that this problem has caused.
This M$ Connect article points straight to the topic: http://connect.microsoft.com/VisualStudio/feedback/details/556000/vs-2010-hangs-when-debugging-asp-net-3-5-web-application-or-website
Apart from the different intermediate solutions proposed, there seems to be an official Microsoft VS 2010 HotFix available here: http://archive.msdn.microsoft.com/KB2106584/Release/ProjectReleases.aspx?ReleaseId=4834.
HTH
Here's a workaround that helped me:
Go to Debug->Attach to Process. If the 'Attach To' box says 'Automatic: Native code' then click the 'Select...' button. In the 'Select Code Type' dialog change the option from 'Automatically determine the type of code to debug' to 'Debug these code types' and choose ONLY the options for you project. For me this was 'Managed (v2.0, v1.1, v1.0)'. Click OK. Then click Cancel in the 'Attach to Process' dialog.
At this point I'm now able to do F5 Debugging.
I hope this helps!
For what it is worth I had this problem this morning out of nowhere. In my case I am converting a database into webpages and one of the folders of one of the projects in my solution now has over 200 thousand html web pages. As soon as I one off'd my solution and removed the project with the giant folder debugging worked again.
This is not unlike what happens when performing a global search and vs 2010 tries to search a folder with an enormous # of files.