I have a Solution is Visual Studio 2003 that has a website and a Web Deployment Project.
If the site is uncompiled I can change the app_globalresources resx files and this is shown in the site.
If I do a basic precompile then I can use ResGen.exe and AL.exe and add updated dll's to the site.
If I use this same technique with the web deployment project build then the dll's do now work and the new translations are not picked up.
I have the follow VB script that is allowing me to build the dll's that work with the precompiled build and I would like to know what to do the change this to work with the web deployment project build.
My website is called Sprint3 and my web deployment project is called Sprint3_deploy and I have the Output_Assemblies set to Merge all outputs to a single assembly and the Assembly name is Sprint3_deploy.
The output dll for the languages is called is called Sprint3_deploy.resources.dll and the manifest looks something like
Dim objShell
Set objShell = CreateObject("WScript.Shell")
dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
dim ResGen
ResGen = "..\Utilities\ResGen.exe"
Dim al
al = "..\Utilities\al.exe"
Dim ResFile
Dim Region
Region = "it"
ResFile = "..\..\LocalizationKit\" + Region + "\resources.strings." + Region + ".resx"
OutPutFile = "..\..\LocalizationKit\" + Region + "\resources.strings." + Region + ".resources"
dim newCommand
newCommand = ResGen + " " + ResFile + " " + OutPutFile
objShell.Run "%ComSpec% /c " + newCommand + ">> c:\Output1.txt",1,true
newCommand = al + "/nologo /t:lib /culture:" + Region + " /embed:..\..\LocalizationKit\" + Region + "\resources.strings." + Region + ".resources /out:..\..\bin\" + Region + "\App_GlobalResources.resources.dll >> c:\Output2.txt"
objShell.Run "%ComSpec% /c " + newCommand ,1, true
I've been stuggling with this for a while now and would be really greatful if someone could advice what I need to do.
None
0 Points
22 Posts
Web Deployment Project and Global Resources
Dec 17, 2008 07:49 AM|heretic03|LINK
Hi.
I have a Solution is Visual Studio 2003 that has a website and a Web Deployment Project.
If the site is uncompiled I can change the app_globalresources resx files and this is shown in the site.
If I do a basic precompile then I can use ResGen.exe and AL.exe and add updated dll's to the site.
If I use this same technique with the web deployment project build then the dll's do now work and the new translations are not picked up.
I have the follow VB script that is allowing me to build the dll's that work with the precompiled build and I would like to know what to do the change this to work with the web deployment project build.
My website is called Sprint3 and my web deployment project is called Sprint3_deploy and I have the Output_Assemblies set to Merge all outputs to a single assembly and the Assembly name is Sprint3_deploy.
The output dll for the languages is called is called Sprint3_deploy.resources.dll and the manifest looks something like
// Metadata version: v2.0.50727
.assembly extern System
{
.publickey = (00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 )
.hash = (03 B0 6D F3 99 D9 90 73 C0 AE 2C 6F 1A 69 EB AE // ..m....s..,o.i..
C4 4F 52 66 69 55 7F 59 39 46 9E CE BD A2 5F 0A // .ORfiU.Y9F...._.
8A 4F CD AB 14 9E AF 8F 52 4C AE 7B A8 BC 8E F1 // .O......RL.{....
13 A7 8A FF 82 A1 45 43 C8 AA 0D DF F3 97 D9 73 // ......EC.......s
19 D0 C5 14 8C FB E2 46 38 3A B6 08 BE 3C 21 D9 // .......F8:...<!.
BA 2C F7 65 E8 96 90 81 2C 2F C7 48 AB 42 57 C2 // .,.e....,/.H.BW.
86 10 9D D6 00 D9 43 46 61 EA DC AD A4 15 1A 48 // ......CFa......H
97 01 6D 34 2C B8 C7 DC 44 95 38 E9 AE CC 56 2E ) // ..m4,...D.8...V.
.ver 2:0:0:0
}
.assembly extern mscorlib
{
.publickey = (00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 )
.hash = (DA E6 B5 80 3B DB 9A 18 23 FF F0 41 0A DA 12 DC // ....;...#..A....
05 EC A2 04 9B 16 84 20 99 00 66 F3 9D 4C C1 77 // ....... ..f..L.w
66 ED 80 2A 57 B6 B9 7E 68 B5 E9 7B 4F 85 24 EF // f..*W..~h..{O.$.
48 B4 11 8D 51 99 4B A3 E8 BD A8 48 34 EC BD BF // H...Q.K....H4...
E9 39 37 C9 CF 16 DA 85 F8 EF AA 51 3C 22 73 41 // .97........Q<"sA
24 80 3E B5 56 63 E7 A5 0F 5A F0 A5 DA 2D 71 0F // $.>.Vc...Z...-q.
62 44 2C 38 04 4D D3 5F 0D 2F 74 0F E5 C8 38 BD // bD,8.M._./t...8.
2A 78 DF 96 0B B8 93 EC AD 32 F0 91 1A DD 32 3C ) // *x.......2....2<
.ver 2:0:0:0
}
.assembly Sprint3_deploy.resources
{
.custom instance void [System]System.CodeDom.Compiler.GeneratedCodeAttribute::.ctor(string,
string) = ( 01 00 07 41 53 50 2E 4E 45 54 0E 32 2E 30 2E 35 // ...ASP.NET.2.0.5
30 37 32 37 2E 31 34 33 33 00 00 ) // 0727.1433..
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
.hash algorithm 0x00008004
.ver 0:0:0:0
.locale = (65 00 6E 00 00 00 ) // e.n...
}
.mresource public resources.resources.strings.en.resources
{
// Offset: 0x00000000 Length: 0x0000CDFF
}
.module Sprint3_deploy.resources.dll
// MVID: {F9528E9B-06CD-418F-A283-A8BBF9B0BAE5}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x04580000
Here is the VB script I use:
I've been stuggling with this for a while now and would be really greatful if someone could advice what I need to do.
Regards,
Michael
None
0 Points
22 Posts
Re: Web Deployment Project and Global Resources
Dec 19, 2008 08:46 AM|heretic03|LINK
So after I change my web deployment project to compile the code into seperate assemblies I can get the assembly to look like:
// Metadata version: v2.0.50727
.assembly extern System
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly App_GlobalResources.resources
{
.custom instance void [System]System.CodeDom.Compiler.GeneratedCodeAttribute::.ctor(string,
string) = ( 01 00 07 41 53 50 2E 4E 45 54 0C 32 2E 30 2E 35 // ...ASP.NET.2.0.5
30 37 32 37 2E 34 32 00 00 ) // 0727.42..
// --- The following custom attribute is added automatically, do not uncomment -------
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
.hash algorithm 0x00008004
.ver 0:0:0:0
.locale = (65 00 6E 00 00 00 ) // e.n...
}
.mresource public resources.resources.strings.en.resources
{
// Offset: 0x00000000 Length: 0x0000CDFF
}
.module App_GlobalResources.resources.dll
// MVID: {7C78419F-0ADB-4D6C-960A-329DE6B166A9}
.imagebase 0x00400000
.file alignment 0x00001000
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x042E0000
and my assembly to look like:
// Metadata version: v2.0.50727
.assembly App_GlobalResources.resources
{
.hash algorithm 0x00008004
.ver 0:0:0:0
.locale = (65 00 6E 00 00 00 ) // e.n...
}
.mresource public resources.strings.en.resources
{
// Offset: 0x00000000 Length: 0x0000CE07
}
.module App_GlobalResources.resources.dll
// MVID: {AFD960F4-C220-48C6-AD48-3F51CF94B793}
.imagebase 0x00400000
.file alignment 0x00001000
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x04230000.
I think the lines I need included are :
.custom instance void [System]System.CodeDom.Compiler.GeneratedCodeAttribute::.ctor(string,
string) = ( 01 00 07 41 53 50 2E 4E 45 54 0C 32 2E 30 2E 35 // ...ASP.NET.2.0.5
30 37 32 37 2E 34 32 00 00 ) // 0727.42..
[mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
Anyone have any idea's how to do this with resgen and al?
Thanks
Michael