So I can't seem to be able to create any new projects or solutions. I can navigate and open existing solutions but cannot create any new solutions. All help is appreciated. See screenshot below:
Some how I was stuck in "Project Management mode!"
Don't know how I got there, but it was hell.
I reset my settings and it was all good.
You can do that by going to Tools > Import & Export Settings > Reset all settings
I had the same problem. I changed my project location, template location and item templates location to a local drive that VS could find. This seemed to fix my problem. These settings can be found under Tools->Options. Select projects and Solutions and then General.
Small workaround: simply press Ctrl+Shift+N and 'New Project' window will appear.
You could try going to Tools>Options>Source Control then change it to none and see if it works. It seems like you are using TFS or something and not allowed to add new projects to the source control.
The Way I got around this was the basically the same as Stag, but in 2010 the reset all settings can be found under Help> Import & Export settings> Reset All Settings
Have you stopped debugging?
If you are not sure, try this:
Debug->Stop debugging
(or)
Ctrl+F5
Then you can create New Project
Related
I had my solution in Visual Studio 2012 (which is under TFS source control) open and the TFS server (2010) was down. When I then made a change to one of the files and attempted to save it I got a prompt to ask whether I wanted to Overwrite the file saying the TFS server was down (can't remember the exact words) and the following message appeared in the Output window:
This solution is offline. [Team Foundation Server: http://tfs1:8080/tfs/server]
The solution was offline during its previous session and will remain offline.
How do I get the file change to be recognised as being among Pending Changes and the whole solution back online?
I searched for the solution online and found this solution but wasn't too keen on the registry change.
I found a better way: right-click on the solution name right at the top of the Solution Explorer and select the Go Online option. Clicking this allowed me to select the files that had been changed when I was offline and make the solution online again.
After finding the solution, I found the following msdn forum thread which confirmed the above.
Go to File > Source Control > Go Online, select the files you changed, and finish the process.
Rename the solution's corresponding .SUO file. The SUO file contains the TFS status (online/offline), amongst a host of other goodies.
Do this only if the "right-click on the solution name right at the top of the Solution Explorer and select the Go Online option" fails (because e.g. you installed VS2015 preview).
(Additional step from solution above for if you are missing the AutoReconnect or Offline registry value)
For Visual Studio 2015, Version 14
Turn off all VS instances
HKEY_CURRENT_USER\SOFTWARE\Microsoft\VisualStudio\14.0\TeamFoundation\Instances{YourServerName}\Collections{TheCollectionName} (To get to this directory on Windows, hit the Windows + R key and search for "regedit")
Set both the Offline and AutoReconnect values to 0.
If you are missing one of those attributes (in my case I was missing AutoReconnect), right click and and create a new DWORD(32-bit) value with the desired missing name, AutoReconnect or Offline.
Again, make sure both values are set to zero.
Restart your solution
Additional info:
blog MSDN - When and how does my solution go offline?
I am using Visual Studio 2017 15.4.0 version. Especially when i started use lightweight solution option, this offline thing happened to me. I tried to above solutions which are:
Tried to regedit option but can not see appropriate menu options. Didn't work.
Right click on solution, there is go online option and
when i choose it that gives this error message: "The solution is
offline because its associated Team Foundation Server is offline.
Unable to determine the workspace for this solution."
Then from File -> Source Control -> Advanced -> Change Source Control. I saw my files. I select them and then chose bind option. That worked for me.
You can go use registry editor.
Turn off all VS instances.
Open registry editor and go to:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\TeamFoundation\Instances
Find proper server e.g: team32system1
Go to Collection and nex DefaultCollection:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\TeamFoundation\Instances\team32system1\Collections\DefaultCollection
Set Offline key to 0
Open solution in VS. Afterwards pop up should appear which question would you like bring solution to online mode.
Neither of the above solutions worked for me on Visual Studio Community 2017 v15.7.1. Somehow, there was no "Go Online" option in the context menu. I tried registry edit as suggested here, but that only displayed me error that it could not find the binding. What worked for me is rebinding solution to the server from Change Source Control menu.
Go to File->Source Control->Advanced->Change Source Control and make sure that your solution is binded to your source control. If not (like mine) then click on bind button, it will automatically search online TFS server and rebind your solution to it.
i found another way without much effort.
Just simply right click your solution and then click undo pending changes.
Next, VS will ask you for acutally changed file where you want to undo or not specific file.
In this you can click no for such a file where actual change is happende, rest is just undoing. This will not lost your actual changes
You will need to do two steps here for a complete solution
First click on the Solution that you have open and then go File-> Source Control -> Go Online Then uncheck all the files that are being shown as being modified while you were offline.
Don't do the Get Latest version from Source Control Explorer. That will result in a dialog potentially showing a bunch of files asking you to resolve conflicts. Instead do this
In source Control explorer right click on the folder you want to get latest of and then Advanced - Get Specific Version. In the dropdown for version type choose Latest and then choose the first check box that says Overwrite writable files that are not checked out. This will automatically bring your folder in sync with latest on the server
One method I did with mine, is to "Add to Source Control", and select 'Git'.
This project was working fine, then I restarted my computer to install a new GPU, and now it is producing the following error when I try to run it:
Error while trying to run project: Unable to start program:
"E:\Workspace\...\....exe"
Cannot find the file specified.
I have confirmed that the file mentioned does exist at the path specified by the error message.
I have tried to "Clean Solution" and "Rebuild Solution".
Navigating to the executable file manually and running it works. The error above is produced when I press the "Run" button in VS2010.
Does anyone know why this might be happening?
I had this issue on VS2008: I removed the .suo; .ncb; and user project file, then restarted the solution and it fixed the problem for me.
Using the repair tool in the VS Management fixed everything.
(I.e. right click Visual Studio 2010 and select Change/Remove from the Uninstall Programs tool in the Windows Control Panel, and click Repair in the Visual Studio Management window when it loads.)
The only way that I was able to get over this (reinstall wasn't an option) was to set the project properties->web->start action->"don't open a page. wait for a request from an external application."
BTW, I think that at some point this started because of a mod that I made to machine.config. :) And no, I don't remember what it was. It does seem to be this very apocalyptic bug where once you get it never goes away.
So if you found this page from Google, you should know that you are doomed. :)
For me it was the virus scanner not liking the fact I have in my exe filename multiple periods.
i.e
project.class.console.exe <- won't run
console.exe <- will run
Hope it helps.
I found a related thread:
Debugging Visual Studio 2010/IE 8 - Unable to start program - Element not found.
Here the best suggested answer was:
Tools > Internet Options > Advanced Under the Browsing Section
then uncheck the
"Disable Script Debugging (Internet Explorer)
I personally have this issue in Visual 2012 with x64 applications when I check the option "Managed C++ Compatibility Mode" of Debugging->General options of Tools->Options menu.
=> Unchecking this option fixes the problem.
For me, it was... the AntiVirus! Kaspersky Endpoint security 10. It seems that the frequent compilations and the changing of the exe, caused it to block the file.
I encountered this error when "" was added by mistake to my command line arguments when altering properties for "All Configurations". Removing them from RightClickProject->Properties->Configuration Properties->Debugging->Command Arguments allowed it to run in the debugger again.
I think that VS is no longer able to resolve the path for some reason.
You can try going to the "Project Properties" dialog, select the "Debug" tab, select "Start external program" on the "Start Action" group and type the full path to the executable.
Reset the diagnostics and the static analysis under the, for example, Properties -> FORTRAN -> diagnostics. Particular be careful the 'Level of Static Security Analysis' and set it none. Good luck!
I had the same problem.
The cause for me was that the Command option in Configuration Properties | Debugging had been reset to its default value.
I encountered a similar problem. And I found the solution to be totally unrelated to the error. The trick was renaming the assembly name. Solution: VS 2013 -> Project properties -> Application tab -> AssemblyName property changed to new name < 25 chars
I had similar problem while using Silverlight web project...
I got resolved issue by setting startup page (In silverlight .aspx is the startup page).
In project browser right click your startup page and set it.!
see here my screen shot
I just re-ran into the same issue: Console App, Visual Studio 2013, 64 bit OS. The project's settings was set to "Any CPU", I created a new configuration for x86 and VS was happy.
In Your Solution Explorer, Right Click your solution (.sln), choose "Configuration Manager"
Active Solution Platform: If it's saying "Any CPU", click the drop down arrow and choose ""
In the "Type or select the new platform", enter "x86"
Now, make sure that the "Active solution platform" is set to x86
Run (F5)
I've tried deleting .suo; .ncb; .sdf; rebuild etc. Nothing helped.
The message was:
Unable to start program
'C:\Users\some user\Downloads\project name\.\Debug\fil_name.exe'
The system cannot find the file specified.
The problem was mismatched file name and wrong path to that file.
1. So went to Project->Properties->Linker->General-> and on the right pane in 'Output file' changed the name from 'fil_name.exe' to 'file_name.exe'
The file_name.exe was in deeper folder like -> \Debug\crv.
2. Also did Project->Properties->Configuration Properties-> and on the right pane in 'Output Directory' edited '.\Debug\' to '.\Debug\crv'
in my case we solved from project debugging settings like
Deleting and restoring the entire solution from the repository resolved the issue for me. I didn't find this solution listed in any of the other answers, so thought it might help someone.
I had a similar problem, but none of the solutions listed here helped. My problem was that my solution has multiple projects and the wrong one was selected as the StartUp Project, once I changed that, it worked.
In case of Windows applications, the error is solved changing the running project properties.
Right click on current running project, select Properties
Debug -> Check Enable unmanaged code debugging and press save button in menu.
This configuration is not saved to [CurrentProject].csproj (or [CurrentProject].vbproj).
It is saved to:
[CurrentProject].csproj.user (or [CurrentProject].vbproj.user)
If you use a code repository, usually this file is not saved undo version control.
I am only posting this because I had a specific issue with the command line arguments I was passing in. Being inexperienced with the command line I was using "<" and ">" in my arguments and it was redirecting the file on me. Hope this helps someone.
I had similar trouble in Visual Studio 2019.
I need rebuilding old project to new framework.
I change framework with 3.5 to 4.7 it very simple, but application not started.
I had try change project and solution settings long time and many position it is not helped me.
Solution will be simle:
Open config file to text edit.
And delete and section <system.web>
Run project.
From the top menu "Build" -> "Rebuild Solution", the .exe file was somehow deleted or corrupted, the "Rebuild Solution will create a new one!
I am experiencing trouble with the following:
In VS 2010, I followed these steps:
File -> Source control -> Open from source control
I selected a solution file from a project in TFS, and opened the project (obviously).
Unfortunately I opened the project in an incorrect folder, and I thought "If I delete the folder(s) and reopen the solution from TFS, everything will be fine". My bad!
TFS "reminds" that I checked out the project to this specific location, so now when I want to check it out again, the location box is greyed out.
Anybody got any clue how to fix this???
Thanks in advance!
Nico
Thanks for your answer Richard! Unfortunately this wasn't exactly what I needed, but I found the solution.
In Source Control Explorer, browse to the mapped source, right click and select "remove mappings".
Here you can edit the mappings to your local sources :)
Check out again and everything is in the right place!
There is a force option with get which will override TFS's knowledge odf the state of the workspace:
In Team Explorer use Get Specific Version: select latest as the version and tick "Overwrite all files ..."
With tf.exe use /force.
open source control. Go to the folder right click and select Add/ Edit Mapping whichever is available. This will prompt to download the new version. Do so and you will be good to go.
I am having problems with VS2008 moving the windows around and losing tabs when I close it and open again, or when I go from coding to debugging and back. (Yes, I know that it is supposed to save different layouts for coding and debugging). I have tried exporting my settings, but it informs me helpfully that
Your settings were exported, but there were some errors. Error 1: Some command bar settings were not exported correctly due to an internal error.
Importing them again gives a similar error, and doesn't solve the problem. Does anyone know where VS saves the layout info? Or how to reinitialise the layout, without changing all my other settings?
Some of the layout information is stored in the registry for the current user.
HKCU:\Software\Microsoft\VisualStudio\9.0
If you're really having a lot of problems you can take the desparate step of deleting or renaming this key. Personally, I would rename it, start VS and see if that fixed my import export settings problem.
This is what you're after:
Tools > Import & export settings
You will need to make it work though. Maybe manually saving it from
My Documents\Visual Studio 2008\Settings
Export your current settings. Don't choose to export the layout settings.
Reset IDE settings to your favorite
Import your exported settings
You might want to try Window > Reset Window Layout. This will reset the windows the way they were configured the last time you imported a layout.
It sounds like you might have a permissions problem trying to export the files.
Another possibility that's a little less likely is that your *.suo files are being versioned, and so when you update your projects your layout for that project is updated as well.
As far as the export bug goes this seems to be a longstanding bug in VS, they can't seem to fix it. When you export your settings uncheck the check box for menu and command bar. That seems to be the one that usually is throwing the error. Then you will at least have almost everything backed up, before you reset all your settings.
I added a project to an existing solution that is currently under source control using TFS, but for some reason I cannot check in the new project. When I view my pending changes, none of the files in the new project show up. None of the files have a plus (for a new file) next to them. What did I do wrong? How do I fix it? It's time to check in.
The problem is the solution has lost its binding. That's why it's not checking out automatically when you add the new project.
In order to restore the binding in VS 2010, go to File->Source Control->Change Source Control. Look for the "Solution: your solution name" and if it's not bound it will say "no server". Click on it and then click "Bind" from the toolbar.
in Visual Studio 2012/2013 it's File->Source Control->Advanced->Change Source Control (Thanks to danglund).
This should create a new vssscc file that is correctly bound. Now add the new project and everything should work correctly.
I was also having the same problem, this is how I fixed it:
Go to Visual Studion: File->Source Control->Change Source Control
Find your project there, its status would be "Invalid", Click on it and press "Unbind". Now go back to Solution Explorer and Remove your project. Add this project again into the solution explorer solve the problem.
Good Luck!
Click on the Team Project name in Source Control Explorer
File -> Source Control -> Add Items to Folder...
Follow the wizard.
Head over to Source Control Explorer and browse to the place in the tree which matches where the new project is at for your solution. Add the files there.
However, I'd be concerned that you modified the solution file and it didn't ask you to check that out. What you may want to try doing is manually checking out the solution file, then readding the project to the solution and seeing if it takes then.
You shouldn't need to drop to the command line - this is a pretty straightforward operation.
Open the solution. Select the project (make sure it is in the solution).
File -> Source Control -> Properties will bring up the binding dialog.
Bind the project to source control.
You should now see + signs next to all your files. The key is that that a .vssscc is added for your project to version control.
If that fails, open your csproj in notepad (after making a backup), and ensure any version control bindings are removed, then try again.
Unfortunately, I'd wager that your best bet is to manually do the check-ins through the command line. I've ran into situations where the Team Explorer UI grows out of sync with what's actually happening in source control, and manually fixing things through tf.exe was the only way to resolve it.
That said, normally, adding a new project to a solution isn't a hassle.
TFS can simply do not know about your project existed. Just add your project files through Source Control Explorer and re-load the solution.
While loading of a solution it can ask you to bind your project to source control. Let it do so by clicking Bind button - it should do all the magic for you.
Make sure you get the latest version of the solution
Check out the solution file
Add the new project
If the newly added project was previously under (another) source control, that might mess things up, make sure to "unbind" it before adding it. (See source control bindings somewhere under the "file" menu in Visual Studio)
You shouldn't need the command line.
I had this same problem in VS 2019, where I had added a new project to an existing solution, and the project wasn't showing up in pending changes. Right-clicking on the project and going to Source Control only had an option to "Add Solution to Source Control".
Using the above answers, I started down the File --> Source Control path, which then yielded an option to directly "Add selected projects to source control". Taking that option solved the problem, so that now the new project shows up in pending changes. NOTE: I'm adding this answer since it's still an issue in VS 2019, but has an easier solution now than in the past.