Nima,
 
I assume VS.uses NET the System.Resources classes to read resx files and write resources.  However, we can't do this as this would mean that NAnt would generate resource files for the framework version on which its running, meaning we'd lose support for multiple frameworks.
 
This is probably one of the reasons why VS.NET always targets a specific version of the .NET Framework (eg. you can't create .NET Framework 1.0 applications using VS.NET 2003).
 
I reported this issue in the VS.NET Whidbey beta, and they should have added support for specifying assemblies on the command line to resgen.exe by now.  I still need to verify this in the VS.NET 2005 CP though. 
 
Thanks,
 
Gert
 
----- Original Message -----
Sent: Tuesday, April 20, 2004 3:11 PM
Subject: [Nant-users] Solution Task, resgen.exe, and external (or 3rd party) assembly

I�m using latest nightly build of NAnt (i.e. Build 0.85.1565.0) and I ran into a problem with the Solution task:

I�m using a custom UI control in my solution. It�s built in another solution and is referenced here as an external assembly.

Everything is fine when I�m building with VS.NET. But with NAnt I get the following error:

 

[solution]  - D:\...\ThemeWinLoginUI.resx

               [resgen] Starting 'C:\Program Files\Microsoft Visual Studio ..NET 2003\SDK\v1.1\bin\resgen.exe ("D:\...\ThemeWinLoginUI.resx" "D:\...\obj\Release\Pos.WinFormFW.ThemeWinLoginUI.resources")' in 'D:\...'

                        error: Invalid ResX input.

                        error: Specific exception: FileNotFoundException  Message: Invalid ResX input. ---> FileNotFoundException: File or assembly name Common.Uil.Controls, or one of its dependencies, was not found.

                        2 error(s).

 

BUILD FAILED

 

At command prompt, I tried to manually use resgen.exe in the same way NAnt uses it and sure it didn�t work. I don�t know how VS.NET resolves this problem (without needing the assembly to be in the GAC). I don�t know exactly how resgen works: where it looks for external assemblies for example. I manually copied the dll in the solution�s obj and bin directories; but as I guessed: no use.

I searched in the mailing list and noticed some similar problems with resgen.exe in NAnt but I couldn�t find the answer to my problem. Sorry anyway if this issue is already answered.

 

           TIA,

           Nima Hakami

 

Reply via email to