468,168 Members | 1,477 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,168 developers. It's quick & easy.

Trying to use nant to build and link resource files into final product

Here are my steps:

create resource files from resx files:

<resgen todir="product\resources_en" verbose="true">
<include name="${AppName}\**.en.resx" />
<include name="${AppName}\Global.asax.resx" />

use AL to build a DLL that holds the *.en.resource and *.es.resource

<echo message="ALINKING en/GTPCardWeb.resources.dll" />
<al output="product/en/GTPCardWeb.resources.dll" target="lib">
<include name="product/resources_en/*.resources" />

here is the csc compiler build

<csc target="library" output="product\${AppName}.dll"
<include name="${AppName}\**\*.cs" />
<include name="${AppName}\**\Global.aspx.cs" />
<include name="product\GTPLIB.dll"/>
<include name="System.Data.OracleClient.dll"/>
<include name="product\Infragistics.WebUI.Misc.v5.2.dll"/>
<include name="product\Infragistics.WebUI.Shared.v5.2.dll"/>
name="product\Infragistics.WebUI.UltraWebGrid.v5.2 .dll"/>
name="product\Infragistics.WebUI.UltraWebNavigator .v5.2.dll"/>
name="product\Infragistics.WebUI.UltraWebTab.v5.2. dll"/>
name="product\Infragistics.WebUI.WebDataInput.v5.2 .dll"/>
name="product\Infragistics.WebUI.WebDateChooser.v5 .2.dll"/>
</resources -->
<resources dynamicprefix="true">
<include name="GTPCard/**/*.resx" />

These nant target creates nice resource files inside the
${AppName}.dll. However when I run the App, I get this:

Could not find any resources appropriate for the specified culture (or
the neutral culture) in the given assembly. Make sure
"MyApp.ASPXPage.resources" was correctly embedded or linked into
assembly "MyApp". baseName: MyApp.ASPXPage locationInfo: <null>
resource file name: MyApp.ASPXPage.resources assembly: MyApp,
Version=1.0.2300.17395, Culture=neutral, PublicKeyToken=null

The ONLY way I can get this to work is to take the
bin/en/MyApp.resource.dll and bin/es/MyApp.resource.dll generated from
the VS 2003 build and place them appropriately into my ant built
/MyApp/bin/en and /MyApp/bin/es directories and all of my problems go
away. My question.. Is there a way to generate these
bin/en/MyApp.resource.dll correctly such that IIS doesn't barf at
runtime? I attempted to build these with AL (see above) and I moved
them into the appropriate ant built directory.

Apr 20 '06 #1
1 3105
I figured it out. My nant build file is correct. My problem was in the
ResourceManager call of my aspx.cs file and the namespace for the
aspx.cs. I cleaned up the name space to reflect the directory the aspx
lives in, change the ResourceManager accordingly and it worked:

Apr 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Nigel Currie | last post: by
reply views Thread by muesliflakes | last post: by
3 posts views Thread by Me | last post: by
2 posts views Thread by Brett Romero | last post: by
reply views Thread by Thomas Klein | last post: by
reply views Thread by Brett Romero | last post: by
1 post views Thread by Spam Catcher | last post: by
reply views Thread by james.mcdonagh | last post: by
1 post views Thread by gcdp | last post: by
reply views Thread by gcreed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.