118

When I'm trying to check in some code TFS and below error message is coming.

Value was either too large or too small for a UInt32.

What is causing this issue and how can I fix this issue?

Geeky Ninja
  • 6,002
  • 8
  • 41
  • 54

4 Answers4

262

I have found the solution for this issue.

Solution:

Save your files before check-in and then initiate check in. This issue will not come.

Root Cause:

It seems to be a bug in the dialog (Not sure), but certainly error message is confusing to user.

Hope this solution will resolve your issue.

Geeky Ninja
  • 6,002
  • 8
  • 41
  • 54
  • 2
    "This is fine. I'm okay with the events that are unfolding currently." –  Aug 12 '16 at 21:36
  • 4
    Please note that this does not only involve the sources being checked in; also verify any 'excluded' pending changes in the same workspace have been saved before checking in, otherwise you may still face the same error. – Ruud Helderman Jan 05 '17 at 14:44
  • 1
    I had to save the solution file itself to resolve the issue. I added a project to the solution and forgot to save. – TaeKwonJoe Feb 06 '17 at 23:18
  • 1
    File > Save All – Squazz Jun 26 '17 at 14:23
16

As Geeky Ninja mentions, the problem is that not all files are saved. Luckily VS has a handy button for this (ctrl + shift + s):

File > Save All 

Helps me every time

Squazz
  • 3,912
  • 7
  • 38
  • 62
3

Build and check in. You will not see the problem. It's always good to see your changes are actually compiled with no errors before checking in.

halfer
  • 19,824
  • 17
  • 99
  • 186
Ram Pratap
  • 1,079
  • 11
  • 8
0

Weird error. In my case it was when I tried to Shelf my code. I just ran the solution to ensure it worked before I created a shelfset. I then tried to create a shelfset in so all the files were saved, I thought.

I did the Save All and actually restarted Visual Studio. Then Chrome hung as Visual Studio was starting ... I was finally able to create my shelfset update.

halfer
  • 19,824
  • 17
  • 99
  • 186
Keenan Stewart
  • 594
  • 6
  • 9