NuGet updates packages only after compilation (compiles with old versions)

Topics: General
Apr 21, 2013 at 8:56 AM

After long time taking out all binaries from source control and adding them to a NuGet feed this our final solution:
1) 180 solutions and 1300-1400 projects
2) each csproj has one packages.config file next to it
3) We are using only one .nuget folder and only one packages folder for all projects
4) For nuget.config to be used properly, we have one for all projects and it is located
under the root folder of our workspace. That way, it'll be the one to be used in both cases:
a. From solution file
b. Using nuget.exe
5) nuget update is being executed from an internal .targets file that is being executed before
compilation. From the build log I can see that it does run before compilation. Moreover,
after the update command I can see that nuget.targets is being executed with a nuget
install command. Only then I see the compilation log messages.
What we are still facing is:
1) If for example, in one of the packages.config files, we have a package with the version In the NuGet feed we have the same package with and is not there.
NuGet will NOT update the package to the newer version.
2) If does exists, when compiling the project, we run "nuget update" and "nuget install"
before compilation but for some reason project is being compiled with and only 
then packages.config file is being changed to the newer version ( The next 
compilation will work properly but unless I'll commit the changes to our SC, compilation
will be using next time again.
3) Sometimes only packages.config is being updated with the new version but csproj hintPath
leaves the
Because we want to avoid csproj and packages.config files source control conflicts, we would like to create a baseline version ( and when that version will be created for all packages, we will stop updating the package version but only the DLL that is inside this package. I know that there's a reinstall flag for that but this flag only works with the manage nuget console. Is that correct?

Thanks in advance