For a while now I had been frustrated by Visual Studio‘s sudden decision to be un-cooperative when saving new projects, but have finally solved the problem! Or at least, that manifestation of the problem that was afflicting me.
The issue I was experiencing was baffling. Following these steps:
- Create new project from template project
- Save solution
Visual Studio would stubbornly and unhelpfully complain that “The operation could not be completed“. Upon checking the desired save location I would find that a solution directory had been created, but that was it. There were no other project or solutions files or folders.
As far as error information went, that was it. No further information was forthcoming. Even attaching another instance of Visual Studio debugger to the IDE process shed no light, with no apparent exceptions or other output to indicate why Visual Studio would be having any difficulty with what should be a simple operation.
Windows Event Viewer was similarly bereft of useful information.
“Computer says ‘No’” would have been about as useful.
At first it only seemed to affect certain project types and I was able to work around that by working in other project types or on existing projects.
Googling the issue was an exercise in frustration in itself.
The variety of circumstances (and versions!) in which Visual Studio has exhibited this sort of stubborn refusal to complete an operation were manifold, and none of those scenarios or the proposed resolutions applied to my simple case (and unsurprisingly did not resolve my problem when I tried them out of sheer desperation).
But I made a breakthrough today!
I finally stumbled upon someone who had experienced apparently the same problem, but with a different specific project type.
It was also in an older version of Visual Studio (2010) than the one I was using (2012), but fortune favours the bold, and the suggested solution was trivial so I thought why not give it a try…
The solution being: Ensure that “Save new project when created” is enabled in Visual Studio settings.
And would you believe it, it worked!