none
Sharing violation during copy

    Question

  • Hi all,

    when i compile my OsDesign i receive this error:

    Sharing violation

    Debugging around i discovereed that the problem is in the buildrel phase, after platformcommon copy, when it runs:

         if exist %_PROJECTOAKROOT%\pbpostbuildrel.bat call %_PROJECTOAKROOT%\pbpostbuildrel.bat

    This batch contains some copies of files one of that is not present:

    xcopy /q /c C:\WINCE600\OSDesigns\EosOSDesignSi14_640480\EosOSDesignSi14_640480\Wince600\EosSi14_ARMV4I\oak\Files\nlscpg.txt C:\WINCE600\OSDesigns\EosOSDesignSi14_640480\EosOSDesignSi14_640480\RelDir\EosSi14_ARMV4I_Release

    Some other files are under 'if exist' then I guess this file should be present.

    How can i get it ?

    Thanks


    SteMMo
    Wednesday, September 15, 2010 10:42 AM

All replies

  • All my projects have nlscfg.inf instead of nlscpg.txt in that batch file.

    Does all of your projects have the same problem ? Have you tried to create another one ? With the same and differente BSP ?

    Curiously, projects older than February, 2009 do not have this batch file and nlscfg.inf either.

    Does somebody have any info about it ?

    Wednesday, September 15, 2010 12:19 PM
  • You shouldn't get a sharing violation for an attempt to copy a file that isn't present.  Errors like this are sometimes caused by Antivirus software, try turning that off.  Also, ensure you are running as administrator.
    Dean Ramsier eMVP BSQUARE Corporation
    Wednesday, September 15, 2010 1:00 PM
  • I'm administrator without AV !
    SteMMo
    Wednesday, September 15, 2010 1:22 PM
  • Wow, that is weird. I've only ever seen this error when using anti virus
    software that was allowed to scan and monitor the WINCE tree. Since you
    are not using AV, could it be that you're infected with something nasty?
    Something is definitely accessing the file you're reading at the same
    time...
     

    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: http://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    http://guruce.com
    Consultancy, training and development services.
    Thursday, September 16, 2010 3:55 AM
    Moderator
  • Do not you have to create it by yourself ?

    http://msdn.microsoft.com/en-us/library/ms834426.aspx

    This document for image localization was released by MS for CE 3.0, but as it reffers to the file you are missing...

    Thursday, September 16, 2010 2:30 PM
  • I rebuilt the project deleting the C:\WINCE600\OSDesigns\EosOSDesignSi14_640480\EosOSDesignSi14_640480\Wince600\EosSi14_ARMV4I\ folder.

    The error is still there and stops the image compilation.

    Now i note that:

    - nlscpg.txt is present and contains '437\n'

    - this osdesign has only 'English (United States)' as locale and the same as default locale

    - other osdesign, that finishes well, has more than one locales and it doesn't have the nlscpg.txt file

    Hope this helps...


    SteMMo
    Thursday, September 16, 2010 2:54 PM
  • Again ....

    If i run the xcopy command on a console window, i have the same error if the exists.

    I'm able to go to the Release folder and delete the file without problems.

    Then if i run 'Copy files to Release directory' the problem still there and the file exists !!

    From the console I'm able to delete and copy the file. If i copy again the file there are no problem !!

    Could it be locked by VS ???


    SteMMo
    Monday, September 20, 2010 9:56 AM
  • I have the same "Sharing violation" when the BuildRel.bat calls the pbpostbuildrel.bat during "Copy Files to Release Directory".

    The pbpostbuildrel.bat is recreated every time I execute the "Copy Files to Release Directory" and it must be this recreation process in the platform builder that is causing this locking and the sharing violation.  The output is:

    .....

    BUILDREL: Copying PLATFORM binaries from C:\WINCE600\platform\ECM_LX800
    BUILDREL: Copying PLATFORM files from C:\WINCE600\platform\ECM_LX800\files
    BUILDREL: Copying PLATFORM cesysgened files from C:\WINCE600\platform\ECM_LX800\cesysgen\files
    BUILDREL: Copying PLATFORMCOMMON binaries from C:\WINCE600\platform\common
    1 File(s) copied
    Sharing violation

     

    Friday, December 03, 2010 1:29 PM
  • One of the common error messages is 'sharing violation' 
    It can be easily fix. Download “LongPathTool” guaranteed fix for your problem.
    Saturday, August 03, 2013 7:12 PM