Precompile App_LocalResources in Visual Studio

The project) has been translated into 15 different languages ​​using the built-in ASP.NET resource engine, which means that I have tons of * .aspx.resx in the App_LocalResources folder.

All of these resources are precompiled by ASP.NET when you first start the application, and this takes a lot of time. I mean LOT. 5-10 minutes. I have to wait 5-10 minutes every time I make a small change in my code, just to see how it works.

Is there a way to precompile this resource in Visual Studio? Changing the "Build Action" for all these resx files to the "Embedded resource" does not work :( (or am I doing this wrong?)

PS. I know that I can write a batch file that will launch aspnet_compiler.exe with a lot of command line options and manually compile the application with all the resources, but it’s a “hack”. For this I need a documentary "Visual Studio". Because I have a project project for this application in the same solution that picks up the "project exit" of this web application (and it will not collect any manually precompiled files that I made)

+3
source share
2 answers

Create a post-build event that fires the ASP.NET compiler Aspnet_compiler -p "src_folder" -v / "dest_folder"

+1
source

, .

+1

Source: https://habr.com/ru/post/1747734/


All Articles