Search Unity

Unable to build my projects in 2018.2.0b7 after receiving fatal build error

Discussion in 'Editor & General Support' started by jakedemian, Jun 12, 2018.

  1. jakedemian

    jakedemian

    Joined:
    Jan 20, 2014
    Posts:
    3
    When I try to build my game to an .exe file, I receive three fatal errors. I'm unable to create a build of my game at the moment no matter what I try.

    The settings I'm using for my build are the following:
    https://i.imgur.com/ZlYX9Mk.png

    The errors I'm receiving upon building are:


    1.
    UnityException: Build path contains project built with "Create Visual Studio Solution" option, which is incompatible with current build settings. Consider building your project into an empty directory.
    UnityEditor.WindowsStandalone.WindowsDesktopStandalonePostProcessor.CheckSafeProjectOverwrite (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/WinPlayer/Extensions/Managed/WindowsDesktopStandalonePostProcessor.cs:58)
    DesktopStandalonePostProcessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/DesktopStandalonePostProcessor.cs:38)
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

    2.
    Build completed with a result of 'Failed'
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()


    3.
    UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (BuildPlayerOptions options) [0x0021f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:187
    at UnityEditor.BuildPlayerWindow.CallBuildMethods (Boolean askForBuildLocation, BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:94
    UnityEditor.BuildPlayerWindow:BuildPlayerAndRun()

    I have no idea how to resolve this issue and I've found nothing after a long time searching. Strangely, the first error is referencing the Create Visual Studio Solution being checked, but you can clearly see in the build settings that it's not active. Even if I try to build into an empty directory I'm still seeing the exact same errors.

    Can I get some help debugging this issue so I can build my game?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Try running Unity as Administrator, and/or build to your C:\Users\[name]\Documents folder as a test.
     
    iwanaga_tak and unitynewbie987 like this.
  3. legitgamesco

    legitgamesco

    Joined:
    Nov 16, 2017
    Posts:
    6
    I ran into this issue as well when upgrading to 2018.2.0f2. Deleting the .sln file in your project's folder did the trick.
     
  4. LEGENDARY_L

    LEGENDARY_L

    Joined:
    Dec 31, 2015
    Posts:
    7
    I had the same thing happen to me but I fixed it. What I did is that I opened the project folder and created a new subfolder.
    upload_2018-8-1_14-47-32.png
    I named the new folder, "Build Versions", to make it easier to store game versions and keep the visual studio error from appearing.

    I ran a new build of the game from the new folder and everything worked as expected.
    If you get a windows firewall pop up, just ignore it. It pops up because it's considered an unknown application from an unknown publisher. Just click on "Allow Access".
     
  5. BitzenBoy

    BitzenBoy

    Joined:
    Jun 28, 2018
    Posts:
    2
    Helpful!
     
  6. Berika

    Berika

    Joined:
    Dec 2, 2018
    Posts:
    1
    I also have the same mistake. I can not find a solution. Did you decide?
     
  7. hypermatt

    hypermatt

    Joined:
    Jan 27, 2019
    Posts:
    2

    THIS WORKS OMG THANKS
     
  8. jhughes2112

    jhughes2112

    Joined:
    Nov 20, 2014
    Posts:
    178
    FYI, If none of these above help, which it didn't in my case, through trial and error I discovered that calling BuildPipeline.BuildPlayer() with BuildPlayerOptions.locationPathName set to a FOLDER will trigger this error. It expects a file ending in .exe, not a folder. So if you have a custom build step or tools to perform your build written, check the inputs. The error reported is not helpful.
     
    Beebyte, hg001, pekarmarian and 3 others like this.
  9. bazevent

    bazevent

    Joined:
    Feb 13, 2015
    Posts:
    4
    Fixed it fo me thank you very helpful
     
  10. seldom7649

    seldom7649

    Joined:
    Apr 17, 2019
    Posts:
    1
    I had the same thing happen to me but I fixed it. What I did is that I opened the project folder and created a new subfolder.

    I named the new folder, "Build Versions", to make it easier to store game versions and keep the visual studio error from appearing.

    I ran a new build of the game from the new folder and everything worked as expected.
    If you get a windows firewall pop up, just ignore it. It pops up because it's considered an unknown application from an unknown publisher. Just click on "Allow Access".

    Thank you
     
  11. satan_inside

    satan_inside

    Joined:
    Dec 21, 2018
    Posts:
    5
    This worked perfectly for me, thx a lot! :D
     
  12. vikassharma333666

    vikassharma333666

    Joined:
    Jun 6, 2019
    Posts:
    1
    Thanks it worked
     
  13. That1phillps

    That1phillps

    Joined:
    May 16, 2018
    Posts:
    10
    For me, I had not selected the scene in the "Scenes in Build." I clicked "Add Open Scenes.." and it built just fine...
     
  14. abdellahbachiri0

    abdellahbachiri0

    Joined:
    Nov 18, 2019
    Posts:
    1
    Try to remove .sln file, should work
     
    JonKim likes this.
  15. SmithySFC

    SmithySFC

    Joined:
    Jan 15, 2021
    Posts:
    11
    THANK GOD FOR YOUR COMMENT - Build my project into a new build project - Boom - it now compiles - Thanks
     
  16. cficara

    cficara

    Joined:
    Sep 27, 2017
    Posts:
    35
    Doing the trick "Build Versions" worked perfectly fine, thank you!
     
  17. himannew1

    himannew1

    Joined:
    Apr 19, 2021
    Posts:
    1
    I tried some solutions but didn't work, who can help me?
     
  18. Pricklety

    Pricklety

    Joined:
    May 22, 2021
    Posts:
    1
    Try removing the .sln file, it has worked with me
     
  19. manxboz

    manxboz

    Joined:
    Dec 10, 2021
    Posts:
    1

    This worked a charm for me. Thanks
     
  20. vertexx

    vertexx

    Joined:
    Mar 18, 2014
    Posts:
    379
    First post June 12th 2018. Last post 10th December 2021!
    Looks like nothing's fixed!
    Hey Unity...anyone at home?
     
  21. phuongtieustartx6

    phuongtieustartx6

    Joined:
    Feb 23, 2021
    Posts:
    1
    thank you ^^
     
  22. LEGENDARY_L

    LEGENDARY_L

    Joined:
    Dec 31, 2015
    Posts:
    7
    Looks like the problem was more common than I thought. Glad my solution is helping even after all these years ^^.
     
  23. Robi77

    Robi77

    Joined:
    Oct 31, 2022
    Posts:
    1
    You are a legend for this.
     
  24. LEGENDARY_L

    LEGENDARY_L

    Joined:
    Dec 31, 2015
    Posts:
    7
    Well my username is Legendary L so thanks ^^!
     
  25. Seahorseshoes

    Seahorseshoes

    Joined:
    Aug 21, 2019
    Posts:
    2
    This worked for me!! Thank you
     
  26. InfiniteStates

    InfiniteStates

    Joined:
    Sep 30, 2019
    Posts:
    6
    My hero!