Search Unity

Incremental building UWP not regenerating ProjectName.vcxproj

Discussion in 'VR' started by flintmech, Jun 26, 2020.

  1. flintmech

    flintmech

    Joined:
    Sep 29, 2011
    Posts:
    32
    I'm using Unity 2018.4.23, and have noticed that if I export a UWP build (e.g. for HoloLens) from Unity - in this example to an output folder named BuildFolder, and then create another build without first deleting my previous build output, the file BuildFolder/ProjectName/ProjectName.vcxproj does not get re-created when it already exists.

    This was discovered because in between two builds, I modified my project's PlayerSettings for UWP by making changes to the Tiles and Logos texture assignments. These settings are used to populate your Package.appxmanifest file as described in the docs, and the texture files you are using are copied into BuildFolder/ProjectName/Assets. Both of these are performed every build as expected, even if the .appxmanifest or Assets folder already exist. However references to the files under the Assets folder are also supposed to be added to the vcxproj file in the <ItemGroup> array tag. Because successive builds don't re-generate the vcxproj file if it already exists, any file references to that Assets folder that need to be changed don't get changed.

    The reason I'm performing "incremental" building instead of deleting my BuildFolder contents every single time is because I'm using the IL2CPP backend and want to optimize my build times - it should only be recompiling things that need to be recompiled.

    Until this gets fixed, can anybody suggest a list of things inside BuildFolder that can be deleted in between builds without negatively affecting my incremental build times? I'm sure there are possibly other files in the ProjectName folder or maybe the sln file that aren't being re-exported from Unity every single time that might potentially cause issues just like the vcxproj file.

    Should I just be deleting everything except the Il2CppOutputProject folder?