locked
Issue with resource file update functionality-Angularjs RRS feed

  • Question

  • User-1599281111 posted

    Hi 

     I am using VisualStudio 2013 for developing webapplication ,using Angularjs1.0 with MVC .

    ISSUE

    I am facing an issue with resource file update functionality.

    Here my issue is when i try to update the content  to  resource file(resx) through my webapplication  the following error message is displaying in the browser can any one give solution to solve this issue.

     var path = HttpContext.Current.ApplicationInstance.Server.MapPath("~/App_GlobalResources");
                    var pathEnglish = path + "\\Strings.en-US.resx";
                    var pathSpanish = path + "\\Strings.hi-IN.resx";
                    ResXResourceWriter resxWriter;
                    resxWriter = new ResXResourceWriter(pathEnglish);
    
                    //Add an Image resource
    
                    resxWriter.AddResource("Key1", "Value1");
    
                    //Add a string resource
    
                    resxWriter.AddResource("Key2", "Value2");
    
                    MessageBox.Show("File" + pathEnglish + " created");
    
                    //Close the resxWriter
                    resxWriter.Generate();
                    resxWriter.Close();
                  

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

    Compiler Error Message: CS0042: Unexpected error creating debug information file 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\d15f5cdb\a10427d1\hi-IN\App_GlobalResources.hqb3mbew.resources.PDB' -- 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\d15f5cdb\a10427d1\hi-IN\App_GlobalResources.hqb3mbew.resources.pdb: The process cannot access the file because it is being used by another process.

    Note - I even tried with using statement but no use.

    Tuesday, December 19, 2017 2:15 PM

All replies

  • User-1599281111 posted

    Help me Plz.

    Wednesday, December 20, 2017 4:37 AM
  • User61956409 posted

    Hi Mariyavijayn,

    You can try to check which process uses that file via Process Explorer tool. And you can try to restart your VS (or restart your computer) and run your project to check if error still appears.

    With Regards,

    Fei Han

    Wednesday, December 20, 2017 8:39 AM
  • User-1599281111 posted

    Hi Fei Han,

    I am glad you replied. Actually, we are facing compilation issue on the local machine but once the build is moved to the server it will work fine.

    With Regards,

    Mariyavijayan.M

    Thursday, December 21, 2017 10:59 AM