If a project is created with NuGet 2.1 installed, and contains a PreBuildEvent which relies on a package to be installed, it will fail to build.
The problem is that since (I believe) NuGet 2.1, the NuGet.targets file that is generated upon doing "Enable NuGet Package Restore" on the solution, has been changed compared to older versions of NuGet. One of the differences (not sure which one, I don't know .targets file syntax) causes the PreBuildEvent to now happen BEFORE the package restore. This means any files the PreBuildEvent depends on from the packages does not yet exist.
A workaround is to copy over an older NuGet.targets file (luckily I still had one). This will cause the package restore to happen before the PreBuildEvents, as it should. Would very much like to see this fixed though.
The problem is that since (I believe) NuGet 2.1, the NuGet.targets file that is generated upon doing "Enable NuGet Package Restore" on the solution, has been changed compared to older versions of NuGet. One of the differences (not sure which one, I don't know .targets file syntax) causes the PreBuildEvent to now happen BEFORE the package restore. This means any files the PreBuildEvent depends on from the packages does not yet exist.
A workaround is to copy over an older NuGet.targets file (luckily I still had one). This will cause the package restore to happen before the PreBuildEvents, as it should. Would very much like to see this fixed though.