开发者

Deploy ASP.NET app without .resx file?

开发者 https://www.devze.com 2022-12-22 23:17 出处:网络
I have an ASP.NET web application with a .resx file in App_GlobalResources whose resources are typically accessed like this:

I have an ASP.NET web application with a .resx file in App_GlobalResources whose resources are typically accessed like this:

ASPX: <asp:Literal ID="l1" runa开发者_StackOverflow中文版t="server" Text="<%$ Resources:GalleryServerPro, Admin_Tab_Hdr %>" />

Code-behind: string msg = Resources.GalleryServerPro.Successfully_Restored_Msg;

Is there any way to compile the .resx values directly into the DLL so that I can deploy the app without the .resx file and not have to edit any of the existing code?

I ask this because I am porting an existing app to a DotNetNuke module and DotNetNuke does not allow .resx files, so I am looking for a workaround.

Thanks, Roger Martin Gallery Server Pro


You do not need to change your code. You need to look at creating satellite assemblies.

This is covered in better detail in blog postings such as: http://blogs.msdn.com/pedram/archive/2007/08/04/automated-build-of-satellite-assemblies-in-visual-studio-with-msbuild.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号