ロック済み hep moving a project

  • 2012年4月6日 17:39
     
     

    Hi,

    I have just hit a problem I dont know how to solve. I was working on a c# 2010 exp project. I have been moving the projects files back and forth between my laptop and desktop. everything was working fine. Suddenly the project was broken on the laptop. I tried numerous time to copy the projects files from the desktop, where everything is stiil working, to my laptop. I keep getting this error on the laptop:

    Error 10 Invalid Resx file. Data at the root level is invalid. Line 4053, position 8.

    When I can get it working, I lose all my controls on the form. Why cant i just move the project file and open the project?

    Any Ideas?

    Thanks

すべての返信

  • 2012年4月6日 17:43
    モデレータ
     
     回答済み

    If you're moving the entire solution directory structure then you won't have any issues.  It would seem that you have a corrupt RESX file.  Note that you should be using the same version of VS on both machines to avoid problems so if you're laptop is VS2010 SP1 then so should your desktop.  I would verify the file at the line given to determine if it was corrupted.

    Michael Taylor - 4/6/2012
    http://msmvps.com/blogs/p3net

    • 回答としてマーク progmgp 2012年4月6日 18:05
    •  
  • 2012年4月6日 17:51
     
     
    Thanks I have opened the resource file with the xml editor. The file have junk in it. It looks incrypted. This is the entire file, other than the tags looks encrypted but the error is occuring after the last </root> tag.
  • 2012年4月6日 17:52
     
     

    Ps. sorry for the speeling im typing fast and without my glasses.

  • 2012年4月6日 18:09
     
     
    Ok, I reopened the resx file and went to the </root> tag. I deleted everything below that tag. Everything will build and run now. So thanks for the answer CoolDadTx. However that raises another question. Since I copied that project folder 5 different times, I would not expect the same file to get corrupted at the same place. How does that happen?
  • 2012年4月6日 20:20
    モデレータ
     
     

    It shouldn't.  There are a couple of known cases where the generated files can get corrupted but they generally involve having one or more open in the editor and modified.  I would monitor and see if it happens again and, if so, what steps you were following.

    Michael Taylor - 4/6/2012
    http://msmvps.com/blogs/p3net