dcsimg
Results 1 to 18 of 18

Thread: [RESOLVED] Visual Studio 2005 is truncating my vb files

  1. #1

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Resolved [RESOLVED] Visual Studio 2005 is truncating my vb files

    Hi,

    Firstly sorry if this is the wrong forum to post this but I searched for awhile and couldn't find an obvious one.

    What has turned into a couple of times a day, when I open a solution in visual studio 2005, one or more files has the last 5, 8, 10, sometimes 15 lines just deleted.
    I have searched all over to no avail trying to find if anyone has even heard of this.

    Specifics
    1. VS 2005 ( v8.0.50727.4039 )
    2. .NET v2.0.50727
    3. We use TFS but this has happened in both checked-out and non revisioned, non-tracked code.
    4. I am a local admin on the box
    5. Has happened across several projects, solutions, and no obvious common thread
    6. The laptop was given a new standard image when I got it 2 months ago
    7. I have uninstalled and reinstalled VS2005 and TFS explorer
    8. We use Infragistics but not any other 3rd party libs or plugins
    9. Win7
    10. Apps are compiled for x86
    11. No other developers in the office are experiencing the issue... or have ever heard of it.
    12. We wont be upgrading anything for another few months

    Any help or ideas would be huge here so please, no idea is too small.

    TYIA,
    Tim

  2. #2
    Android OpenGL ES Guru Jacob Roman's Avatar
    Join Date
    Aug 2004
    Location
    Miami Beach, FL
    Posts
    5,249

    Re: Visual Studio 2005 is truncating my vb files

    The solution....don't use VS 2005. Its very old now. Matter of fact, you can get the express editions for free for VS 2010 (if you don't like the IDE of 2012), VS 2012, and the new one thats out VS 2013. I'm getting the professional edition of 2013 now since i am a student in college. They are major upgrades over the old VS's. And the framework is up to 4.5 now. However VB6 is optional if you want that "BASIC" feel and not all the .NET syntax. People still widely use it surprisingly....

    /Looks at self

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    34,064

    Re: Visual Studio 2005 is truncating my vb files

    I've used VS2005 for a fair amount of time....I think, though I believe I used both 2003 and 2008 even longer, without spending inordinate time in 2005 (not more than three years). I've never seen or heard of the problem you are having. I also don't use any of the other things you mentioned, so I suspect those ancillary items rather than VS.

    One thing to note is that .vb files, which is largely what comes out of VB.NET, are nothing more than text files. You can open them in Notepad. If you have not done so, go to one of the files and take a look with Notepad. This is not a particularly valuable test, but it sure would be interesting if you saw the whole file in Notepad and only a partial file in VS. More likely, you will see a partial file in both places. A better test would be to look at the files in Notepad before opening them in VS. That would tell you whether the file was there before hand, or not, but since you say it's unpredictable, it might well be impossible to try this test.

    By the way, while it isn't clear to me, either, which forum is most appropriate (perhaps General Developer would be best), Chit-Chat is likely to be the worst, though it has gotten mellow in old age.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Re: Visual Studio 2005 is truncating my vb files

    Yeah, in a perfect world I would agree with you. Unfortunately when a company you have recently been hired on to is currently standardized on vs2005 it doesn't leave you a whole lot of options. We're starting the conversion to 2010 and .NET 4 but I will likely be a customer to that project and thus subject to their timeline.

  5. #5

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Re: Visual Studio 2005 is truncating my vb files

    Quote Originally Posted by Shaggy Hiker View Post
    I've used VS2005 for a fair amount of time....I think, though I believe I used both 2003 and 2008 even longer, without spending inordinate time in 2005 (not more than three years). I've never seen or heard of the problem you are having. I also don't use any of the other things you mentioned, so I suspect those ancillary items rather than VS.

    One thing to note is that .vb files, which is largely what comes out of VB.NET, are nothing more than text files. You can open them in Notepad. If you have not done so, go to one of the files and take a look with Notepad. This is not a particularly valuable test, but it sure would be interesting if you saw the whole file in Notepad and only a partial file in VS. More likely, you will see a partial file in both places. A better test would be to look at the files in Notepad before opening them in VS. That would tell you whether the file was there before hand, or not, but since you say it's unpredictable, it might well be impossible to try this test.

    By the way, while it isn't clear to me, either, which forum is most appropriate (perhaps General Developer would be best), Chit-Chat is likely to be the worst, though it has gotten mellow in old age.
    I'll try the General Developer forum. thanks. Also, looking back over all my efforts to root this out I never looked at the .vb files before opening VS. I have opened them after and during to try and find hidden characters in Notepad++ with no luck. I've also cleansed my vb files with copy and paste using Notepad. In any event. thanks for the idea.

  6. #6
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    34,064

    Re: Visual Studio 2005 is truncating my vb files

    So, when you look at the files in Notepad (is that the same as Notepad++, or different?) are the files truncated, or not? Hidden characters would be quite the find, so I'm not too surprised that you didn't find them, but it is kind of sounding like you are saying the files look fine and aren't truncated when opened in Notepad, yet they are when opened in VB. That would be a cool result (though understandably pretty frustrating for you).
    My usual boring signature: Nothing

  7. #7

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Re: Visual Studio 2005 is truncating my vb files

    Quote Originally Posted by Shaggy Hiker View Post
    So, when you look at the files in Notepad (is that the same as Notepad++, or different?) are the files truncated, or not? Hidden characters would be quite the find, so I'm not too surprised that you didn't find them, but it is kind of sounding like you are saying the files look fine and aren't truncated when opened in Notepad, yet they are when opened in VB. That would be a cool result (though understandably pretty frustrating for you).
    Sorry for the confusion, I meant to say when a file in Visual Studio is showing up truncated, and I then view it in Notepad or Notepad++ it is also truncated. The lines are removed ... and sometimes mangled together.

  8. #8
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    34,064

    Re: Visual Studio 2005 is truncating my vb files

    That's data, but it's unfortunate data. It would have been much more interesting had the files not been truncated in Notepad. As it is, there are two possibilities:

    1) VS is doing the truncating.

    2) The files were truncated before VS even got started.

    Determining which is which may be impossible, or at least unreasonably tedious, unless you have a copy of one of the truncated/mangled files from somewhere prior to the first time you opened it in VS. If you have such a file, then you could open it again and see whether or not it gets mangled. Of course, if the problem is fairly random, even that may not be a solid test.

    I'd say that at this point I fall into category #11 in your original post. Have you tried uninstalling and reinstalling VS? I'm leaning towards this being caused by VS, though I've never heard of such a thing. What I HAVE heard of, though not often, is corrupted installations of VS, and those can act in very strange ways.
    My usual boring signature: Nothing

  9. #9
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,697

    Re: Visual Studio 2005 is truncating my vb files

    Do you have any addons or plugins in VS that may be corrupting your file(s)? When doing your reinstall I would keep it simple and clean without any 3rd party controls / addons
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,448

    Re: Visual Studio 2005 is truncating my vb files

    are you sure it's VS that's mangling them?
    "when a file in Visual Studio is showing up truncated, and I then view it in Notepad or Notepad++ it is also truncated. "
    But what about viewing them in N++ BEFORE trying to open them in VS? Have you tried opening the files in notepad or something else, immediately after getting them from TFS?
    How big are the files in question?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  11. #11

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Re: Visual Studio 2005 is truncating my vb files

    Quote Originally Posted by Shaggy Hiker View Post
    That's data, but it's unfortunate data. It would have been much more interesting had the files not been truncated in Notepad. As it is, there are two possibilities:

    1) VS is doing the truncating.

    2) The files were truncated before VS even got started.

    Determining which is which may be impossible, or at least unreasonably tedious, unless you have a copy of one of the truncated/mangled files from somewhere prior to the first time you opened it in VS. If you have such a file, then you could open it again and see whether or not it gets mangled. Of course, if the problem is fairly random, even that may not be a solid test.

    I'd say that at this point I fall into category #11 in your original post. Have you tried uninstalling and reinstalling VS? I'm leaning towards this being caused by VS, though I've never heard of such a thing. What I HAVE heard of, though not often, is corrupted installations of VS, and those can act in very strange ways.
    I have done a reinstall of VS and TFS. ...I was out yesterday with sick kids and I come back to everyone's replies. Sure appreciate it. Also, and this is unbelievable to me, when I fired up one of the solutions that always has the issue, no issue. I worked a few hours from home yesterday, wonder if it's something on the work network. Okay, I'm creating some red herrings. I'll review what everyone has written, try what I can and post whatever I find. I would love to root this out and have it available to some other poor soul out there who experiences it.
    Thanks again for your replies.

  12. #12

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Re: Visual Studio 2005 is truncating my vb files

    Quote Originally Posted by techgnome View Post
    are you sure it's VS that's mangling them?
    "when a file in Visual Studio is showing up truncated, and I then view it in Notepad or Notepad++ it is also truncated. "
    But what about viewing them in N++ BEFORE trying to open them in VS? Have you tried opening the files in notepad or something else, immediately after getting them from TFS?
    How big are the files in question?

    -tg
    That's a good idea to check the files before opening VS. I will surely try that. I'll have to break the morning routine of just firing up the solution. The latest file that has had it happen the most is only around 150 lines of code, so not big. The solution it's in is only 6 projects. I've had it happen in our main solution too, which is 26 projects, and I never even edited a single line of code in it when it did happen which really concerned me. I'll post what I find, thanks for the reply.

  13. #13

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Re: Visual Studio 2005 is truncating my vb files

    Quote Originally Posted by RobDog888 View Post
    Do you have any addons or plugins in VS that may be corrupting your file(s)? When doing your reinstall I would keep it simple and clean without any 3rd party controls / addons
    Another good idea, I'll try this too. I'm relatively new to TFS, which is our only plugin, so not sure the specifics on how I can work offline and keep a common project committed but I'll consult one of the other team members here as I'm sure it can be done. Thanks for the reply.

  14. #14
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,574

    Re: Visual Studio 2005 is truncating my vb files

    I vaguely remember something similar happening to me. Do you have Service Pack installed?
    Slow as hell.

  15. #15

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Re: Visual Studio 2005 is truncating my vb files

    I do for.NET, SP2 v 2.0.50727
    VS is 8.0.5727.4039

    just fyi, today there was no error. I looked at the typical files in notepad++ that have the issue before opening them in VS. They were not truncated/mangled. Opened them in VS and no problems. It happened last night however while I was working. It happened to a file I didn't have open at the time. Idk, this all means nothing I suppose.
    Last edited by thetimmer; Jan 17th, 2014 at 09:17 AM.

  16. #16
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,574

    Re: Visual Studio 2005 is truncating my vb files

    If service pack haven't done anything for you then i don't know. Virus? That correct your poorly written code? :P
    Slow as hell.

  17. #17

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Re: Visual Studio 2005 is truncating my vb files

    In case anyone comes across this thread we stumbled on some permission issues in my development folder that may have been the issue. If the truncation stops I will come back here and resolve the thread.

  18. #18

    Thread Starter
    Addicted Member thetimmer's Avatar
    Join Date
    Jan 2014
    Location
    Plano, Texas
    Posts
    243

    Re: Visual Studio 2005 is truncating my vb files

    so after a complete re-image of the drive and re-install of all the apps I found 1 item that may have been the source of the issue
    http://social.msdn.microsoft.com/For...?forum=vssetup

    Although I remember doing the above process during the original install, I did it again and now the problem is resolved so it's the only advice I can offer should anyone ever come across this issue again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width