Reputation: 997
I have been working on a new solution all evening. Building without an issue, however all of a sudden I have started to get the following error when building:
The Operation could not be completed. The parameter is incorrect.
Now, I have searched many threads, but I am yet to find a decent solution. I should also mention. I have restarted, tried to repair my VS 2015 Express install with no luck.
This is happening on EVERY solution, not just my new one, even if I close everything, start a brand new project and try and build.
Any suggestions would be welcome!
Upvotes: 62
Views: 66328
Reputation: 306
Had this issue in visual studio 2022, tired most of the recommendation and it didn't work for my case.
What worked for me was deleting the ".vs" folder.
To do this:
Upvotes: 1
Reputation: 347
Setting folder permissions for "C:\ProgramData\Microsoft\Crypto\RSA" so that it not only allows:
Read, Execute
Show Folder Contents
Read
but also allow
Write
fixed the issue for me.
I did this for the group "Everyone" that is the base group for the others. You might want to only do this for the user or group that is using Visual Studio, or even use Visual Studio as admin to sign.
I did this for the RSA Folder because I wanted to sign with RSA. Tn the Crypto folder theres other folders too, and depending on your selected process you might want to do this for the whole Crypto folder or a different subfolder.
Upvotes: -1
Reputation: 276
Close Visual Studio
Go Into Solution Folder
Remove .vs folder
If .vs folder not found then show hidden files
Open Project Again
Upvotes: 6
Reputation: 36
I know this is old but I solved it by opening the .sln file in a text editor and changing the project directory in the solution.
Upvotes: 0
Reputation: 21
I got an identical error message running Microchip Studio (VS with bits taken out). the cause was two instances of the Microchip Studio application running together. Probably because both projects were configured to use an exclusive resource - a single Atmel-ICE connected to my system.
Solution: close both/all instances of Microchip Studio and restart with just one, the one you want to compile.
Upvotes: 1
Reputation: 11
In case this helps anyone, I also had this cryptic error - when I was in the VS Resource Editor, while trying to right click on a control and "Add Class".
Fixed by:
"Add or Remove Programs", Microsoft Visual Studio Installer, Modify, Modify. Add "Universal Windows Platform development". Add "C++ MFC for latest v142 build tools (x86 & x64)" (Under Individual Components).
Upvotes: 0
Reputation: 159
In my case, the solution was far less complicated. We had given the project name instead of the path to the project file as part of the /Project flag.
Upvotes: -1
Reputation: 1828
I've had this happen in the scenario below and closing & reopening Visual Studio 2015 resolved it for me.
Even though OP mentions he already
even if I close everything, start a brand new project...
I'm posting this solution for others who hadn't tried this.
Reference - Thanks Jon Schneider
Scenario
We have a library we maintain in a private nuget repo. Instead of building betas, sometimes I'll just compile the library locally, drop the reference to the nuget package and add the reference to the local bin of the library. Upon rebuilding the project, sometimes I get this error. Closing and reopening the project resolves it and I'm able to build.
Upvotes: 7
Reputation: 11
None of the above worked for me. However restarting the computer fixed the issue.
Upvotes: 0
Reputation: 354
If none of the above works: I discovered that my problem was that I had an empty environment variable, visible in the project properties (under Debug). Removing it fixed the problem:
Upvotes: 2
Reputation: 153
I had same error when I tried to unload installer projects in solution folder. Trouble was in VS2017 and with extension Project Installer.
I had that error when tried unload projects at the time, when one installer project had unloaded already. If I reloaded it and then unloaded folder again all was good. Nevertheless I didn't found good solution. I tried to delete .suo file, it didn't help. I noticed that problem after updating VS from 15.8.3 to 15.8.4. Maybe trouble was in update.
Upvotes: 0
Reputation: 177
I tried all the options listed here and nothing worked for me. I found that another project folder had been dragged and dropped into the folder of my solution outside of visual studio. I put the folder back where it belonged and also had to delete the .suo file.
Just posting this in case anyone else runs into the dreaded drag and drop accidentally breaking the entire solution thing.
Upvotes: 1
Reputation: 439
Go figure what I've found.... Building a 2015 project with vs2015 will succeed eventually... Let's say the project has 2 configurations (for this particular case):
"Release MD|Win32"
"Release MD|x64"
Calling
devenv myProject.vcxproj /build "Release MD|x64"
will work, but calling
devenv myProject.vcxproj /build "Release MD|Win32"
WILL NOT WORK
you have to simply call the devenv with x86
instead of Win32
..... There is no reference what-so-ever in my project file to x86
.... can't even find it as a comment...
Upvotes: 1
Reputation: 509
This answer helped me: https://stackoverflow.com/a/9130257/6524796 It says to try deleting the .suo file. To find this file open the directory for your solution in File Explorer, make sure you can see "Hidden Items", and search for ".suo". Select and delete the one for the solution giving you issues building. Close Visual Studio and reopen solution.
Upvotes: 39
Reputation: 26973
Dan (the original poster) mentioned in a comment above that running Visual Stuio as admin solved this for him.
Upvotes: 52
Reputation: 129
Try checking your project references. I had this same problem and found that one of the reference was missing.
Look under: Debug > ProjectName Properties > References
Upvotes: 10