Issue with nuget and svn

Oct 21, 2011 at 11:54 PM


I am completely new to nuget.  I just started using VS 2010 Pro for a new MVC 3 website project and that's how I learned about nuget.  I like the concept behind nuget and I want to use it, at least for jquery, jquery-ui, etc.  The problem is when I add my code to subversion.  Subversion (using TortoiseSVN) modifies the files slightly.

Take the file MvcApplication1/Scripts/jquery-1.5.1.js, for example.  This gets added to svn along with everything else.  Then, I go to the nuget packages manager, and go to update the jquery package, it does add the latest jquery file, 1.6.4, but it complains that the file Scripts\jquery-1.5.1.js "has been modified" and so it doesn't delete it.  This takes away half of the convenience of using nuget, because now for any packages that I want to update, I have to go through and manually delete the old versions after I update.

*Note: This happens even when the packages folder itself is not added to svn.  I've seen discussions around where people are talking about solutions where the packages folder is not added to source control.  But that doesn't help me much, because the script files that are added/updated/removed in the website project cause the problem.

I am using a fully updated VS 2010 SP1 and I've updated the nuget package manager to 1.5.20902.9026.  Other than that, I am using it 'as is' out of the box - I haven't made any adjustments to configuration files or anything like that.

Can anybody give me some guidance on how I can deal with this situation?  A workaround or something?

Thanks!  Let me know if you need any more details.

Oct 22, 2011 at 12:36 AM

I think I may have found the problem.  The jquery.1.5.1.js file that is included in a newly created MVC 3 Website uses UNIX line-endings.  SVN normalizes these to Windows line endings.  So the content of the file is actually modified.  I'm going to try to test this theory and see if I can find a workaround.