locked
On Publish Web App Project, "Could not find file" error, adds another "bin" folder, "specified multiple times" errors RRS feed

  • Question

  • User-1944102562 posted

    I am trying to publish a web app project with Visual Studio 2013 Pro. All these errors started popping up today, without changing anything from when I last opened the solution.

    In the bin folder, there are numerous Antlr3, Newtonsoft, and other .dlls. The project builds without error, but then I get "Could not find file 'bin\Newtonsoft.Json.xml'." when trying to publish to the web server. It seems like the xml files are getting deleted in there somewhere.

    I set properties of the .dlls in the bin folder to "copy to output". Now I get "CSC : warning CS2002: Source file 'obj\Debug\\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs' specified multiple times". What does this mean?

    Visual Studio creates a bin folder inside the projects existing bin folder (bin\bin) with all the dlls listed in the project. But in the solution explorer, it doesn't include the new bin subfolder. What is doing on here?

    What am I doing wrong?

    Tuesday, July 5, 2016 11:34 PM

Answers

  • User-166373564 posted

    Hi,

    From your description above, find those temp (problematic) generated files, remove the file references from the .csproj file. Rebuild the solution.

    Please check whether it can fix it.

    Regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, July 9, 2016 5:30 AM

All replies

  • User1992938117 posted
    Do a clean and re build your application and then publish using file system to a folder in local drive.
    Wednesday, July 6, 2016 9:10 AM
  • User-1944102562 posted

    Nope, I did that before and it still shows the same behavior when trying to publish to a local drive.

    Also, in Solution Explorer in the bin folder, it shows several files with a yellow exclamation alert icon next to them.  When you click on it, VS tells you that the file does not exist in the project directory.  But they do exist. 

    Tried closing VS, deleting .suo file, then reopen and publish.  Same result.

     

    Thursday, July 7, 2016 9:56 PM
  • User1992938117 posted
    Ah.. If you can then try to remove and add those references manually to project.
    Friday, July 8, 2016 5:38 PM
  • User-166373564 posted

    Hi,

    From your description above, find those temp (problematic) generated files, remove the file references from the .csproj file. Rebuild the solution.

    Please check whether it can fix it.

    Regards,

    Angie

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, July 9, 2016 5:30 AM