We are using a third-party component that crashes Visual Studio 2010 when it is viewed on a designer. This in itself was not a deal breaker, as we wrote the layout code by hand.
However, last time the designer of this component was viewed by accident and Visual Studio crashed, the [Design] file was saved as open, and now whenever VS is launched and the project opened, the designer is opened by default and then Visual Studio crashes.
I have deleted all *.suo and *.user files, but somehow Visual Studio still remembers which files were open last, making it impossible to open the solution.
Comment out the code in the designer file, open the solution, the uncomment it.
First, make a backup of the file (if you don't already have one in source control), in case the designer regenerates it.
Related
I have MyProject.Publish.wpp.targets file in the root of that project folder.
When I edit this file & publish the project, it doesn't take the new changes.
I have to reopen the Visual Studio and publish for the new changes to apply.
How to fix this.
Using Visual Studio 2019.
Drag the files / folders from Windows Explorer into the Solution Explorer. It will add them all. Note this doesn't work if Visual Studio is in Administrator Mode, because Windows Explorer is a User Mode process.
How do I open I a Visual Studio Code folder in Visual Studio 2015?
If I open it as a "Web Site", it tries to treat the node_modules directory as part of the project's normal JavaScript files and hits an error when the path exceed the maximum path length.
But I can't open it as any other project type unless I first create a project of that type and then move all the VS Code files into that folder.
Should I be trying to open it as a web site?
Or should I create a new project and then copy the files + folders into it?
Is there any advantage to having it as a project?
If I do create a project, it makes it difficult to work together with someone who is just using VS Code?
And if I use a project, which project type should I select?
Finally folder view has arrived in VS 2017 :)
You can find more details in here.
Currently there is no way to open a folder directly with Visual Studio.
Why? Because Visual Studio and Visual Studio Code only shared their name, not the idea behind it. To extend Jenny O'Reilly answer:
Visual Studio Code is a folder oriented editor
This means VSC has the same Point-of-View to your Project as the File Explorer.
Visual Studio (not Code) is a solution oriented integrated development environment (short IDE)
Instead every Project in Visual Studio needs a *.sln Solution-File as Root Component. From this point Visual Studio looks at your Project. An example would, if you copy File in your Project Folder, they wouldn't be recognized from Visual Studio. You have to add them first to your sln File, to see them. It also allows the developer to combine multiple projects (*.csproj,..) into one single Solution to build.
This means the idea behind these two editors is completely different.
Visual Studio (not code) Project-types for Web
There are Node.js Tools for Visual Studio
This will provide Node.js built-in project templates
Visual Studio 2015 comes with TypeScript templates
Workaround 1
A workaround would be a Blank Solution in which you set up your Visual Studio Code Project.
Workaround 2
Another trick would be the answer to this question. You can open your Project Folder as a Website Project.
File -> Open Website -> File System and choose the folder
Update
As you mentioned, there will be errors because Visual Studio tries to build the solutions. For the next few readers of this response, the work around for this (as John Pankowicz writes in the comment) is:
Right-click Web Site in Solution Explorer -> Property Pages -> Build -> Uncheck "Build Web Site as part of solution"
Update 2
(Thanks to JC1001 for this update)
The next version of Visual Studio (Visual Studio "15") will support opening a folder. This is mentioned in the Visual Studio Blog.
Also like in Visual Studio Code, there will be a prompt command for opening Folders. Right now you can use this in the preview version:
devenv /command “file.openfolder FOLDER_PATH”
In the future you will be able to use:
devenv FOLDER_PATH
Opinion
Personally I wouldn't recommend Visual Studio (not code) for HTML/Website projects without server-side-development, because I don't see any features. Even the intellisense suggests to me sometimes bad HTML Code (it's not the IDE's fault).
After all web projects are still text files. You can easily control group projects like this with Version Control. Visual Studio Code even provides an integrated Git support.
Visual Studio Code does not create "project files" that you can open in Visual Studio 2015. Basically, when you open up a Node website in Visual Studio, you need to re-create the folder structure in VS2015 and create a "project file".
I haven't seen any better ways of doing this, but will be happy when we can open a folder just as easilly as we can with VSCode
I'm sure it's not the best way but..
Open an existing .sln with notepad, change the names, save as [name of your project].sln.
Open with Visual Studio.
I recently installed the Windows Phone 7 SDK that came bundled with Visual Studio 2010 Express for Windows Phone. I downloaded a sample app and tried to open the solution file. When I checked the solution view window, the app project was not loaded. Every time I tried to reload the project, it flash as available for a moment and then go back to being unavailable. I tried all the usual tricks like removing source control from the .csproj and deleting the .user and .suo files. Any ideas?
Ok I figured it out. When I open the solution file, it opens in Visual Studio 2010 Shell. What I needed to do was to go to Visual Studio 2010 for Windows Phone, open existing project, and then browse to the solution file and open it. Sorry for the confusion everyone!
Yesterday I edited the Global.asax.cs file of an MVC project in Visual Studio 2010 and this morning when I opened Visual Studio the file was gone. Visual Studio had deleted the file on disk including my local changes.
I restored the file from source control and restarted Visual Studio and it again deleted the file on start up. The file appears in Solution Explorer initially while VS is initialising, and after about 5 seconds it disappears... VS deletes it from the disk. Source control shows it as missing.
I can reproduce this again and again.
Things I've tried:
- Repairing VS.
- Disabling ReSharper.
- Restarting my machine.
- Fresh source control checkout.
- Opening a different MVC project to see if the same thing happens there. It doesn't.
Anyone have any further ideas? Much abliged.
I have a odd problem here I can't figure out.
alt text http://billrob.com/images/studioerror.jpg
This happens each time I open the web.config file in my project. Studio crashes immediately after clicking close. Clicking debug just opens and empty Studio with the debugger attached to nothing.
I even resorted to open studio 2008 naked, without and project or solution, and then manually browsed to the web.config. It still crashes.
Other info:
All *.config files with crash as soon as the file opens.
This occurs in both VS 2005 and 2008.
Any file named .config, whether a .cs file renamed, or an empty text file called bob.config.
Any help would be greatly appreciated.
Try looking at your packages installed for Visual Studio. They are registered in the registry under:
Visual Studio 2008
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0Exp\Packages
Visual Studio 2005
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0Exp
If you have a lot, I say kill them all. And then reinstall your specific addons (such as CodeSmith or VisualSVN).
For reference, this is my fresh new install of Visual Studio 2008 SP1 on Windows 7 RTM. Only 1 plugin, and it's for SQL Server's SSIS:
registery http://eduncan911.com/blog/thumbnail/billrob-stackoverflow.png