Search code examples
visual-studio-2010

When compiling, "Incorrect function" error


I'm trying to build a VS 2010 web project and I'm getting this error:

Could not write to output file 'C:\Users\me\myProject\obj\Debug\myProject.dll' -- 'Incorrect function.'

I've tried everything from reinstalling to editing folder permissions to running visual studio as system to moving it to a different folder and nothing resolves this error. Has anyone seen it before, or know what to do about it?


Solution

  • Sometimes antivirus software "decides" that the .dll or .exe that we are building is malware. Many such apps also have some sort of a white-list of files for which you can tell the antivirus to ignore them.