Visual Studio: The Operation could not be completed. The parameter is incorrect

52,307

Solution 1

Dan (the original poster) mentioned in a comment above that running Visual Stuio as admin solved this for him.

Solution 2

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.

Solution 3

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

Solution 4

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.

Solution 5

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...

Share:
52,307
Harambe
Author by

Harambe

Updated on July 07, 2021

Comments

  • Harambe
    Harambe almost 3 years

    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!

    • Harambe
      Harambe over 8 years
      Fixed this by always running as administrator.
    • Richard Logwood
      Richard Logwood almost 8 years
      Please consider trying to raise the visibility of this problem with Microsoft. See visualstudio.uservoice.com/forums/121579-visual-studio-2015/‌​…
    • claudiu.nicola
      claudiu.nicola over 7 years
      Check the solution from thread: stackoverflow.com/questions/9079466/…
    • deniz
      deniz over 7 years
      This question mentions that restarting Visual Studio was tried, but for anyone landing here who hasn't tried that yet, do. See: stackoverflow.com/q/20407304/12484
    • Mustafa Tığ
      Mustafa Tığ over 5 years
      in my case, i have restarted VS and the issue is fixed.
    • Zhang
      Zhang about 4 years
      For me, it's becaues I had adjusted the time zone and date (for testing time and dst problem.)
  • Phil3992
    Phil3992 almost 7 years
    What reference?
  • Samuel
    Samuel over 6 years
    This worked for me after I closed the instance of visual studio and removed the .suo file
  • aaroncatlin
    aaroncatlin over 5 years
    This happened to me in VS2017 following a code merge operation where AutoMerge had removed a project from the solution file. Simply adding the project back into the solution solved the issue.
  • Gustav
    Gustav almost 5 years
    If an admin login is required for VS to run, you are facing other issues.
  • Hamid Mayeli
    Hamid Mayeli almost 5 years
    Running as admin could help you to see more detail but it could not be the solution.
  • NielW
    NielW almost 5 years
    Already running as admin when the problem started. Deleting .suo was what fixed it for me.
  • Matthias Raes
    Matthias Raes over 4 years
    I already had it running as admin as well, simply restarting VS did the trick for me.
  • Underground
    Underground almost 4 years
    In my case I removed and re-added the folder mapping on the workspace and that seems to have cleared it up.
  • Brian Clink
    Brian Clink almost 4 years
    Run as Admin fixed this error for me. I did not have a .suo file in the folder.
  • Brian Boyd
    Brian Boyd almost 2 years
    My computer crashed from overheating while working in my problem solution, and I then received this error after restarting. Deleting the suo file fixed the issue, thanks!