我正在研究卫星装配。将来我们需要使用资源“DLL”而不是所有文化的.Resx文件。一切都很好但是当我使用批处理编译项目时,很少有文化文件夹在obj中创建\调试。 请看下面只创建了fr-FR和gu-IN文件夹。为什么没有创建pa_IN文件夹? 我不明白为什么会出现这个问题 。请指导或建议我,我该怎么办?我需要改进代码还是需要额外的设置? 下面是我的编译代码:
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.296]
Copyright (C) Microsoft Corporation 2007. All rights reserved.
Build started 9/12/2013 3:24:35 PM.
Project "D:\MyProject\DynamicResourceDLL.csproj" on node 1 (rebuild target(s)).
CoreClean:
Deleting file "D:\MyProject\bin\Debug\makeDll.dll".
Deleting file "D:\MyProject\bin\Debug\makeDll.pdb".
Deleting file "D:\MyProject\obj\Debug\makeDll.dll".
Deleting file "D:\MyProject\obj\Debug\makeDll.pdb".
CoreResGen:
"c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\resgen.exe" /useSourcePath /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.CSharp.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll" /compile Circle\Oval5\Oval5.resx,obj\Debug\makeDll.Circle.Oval5.Oval5.resources Circle\Oval5\Oval5.pa_IN.resx,obj\Debug\makeDll.Circle.Oval5.Oval5.pa_IN.resources Circle\Oval5\Oval5.fr-FR.resx,obj\Debug\makeDll.Circle.Oval5.Oval5.fr-FR.resources Circle\Oval5\Oval5.gu-IN.resx,obj\Debug\makeDll.Circle.Oval5.Oval5.gu-IN.resources
Processing resource file "Circle\Oval5\Oval5.resx" into "obj\Debug\makeDll.Circle.Oval5.Oval5.resources".
Processing resource file "Circle\Oval5\Oval5.pa_IN.resx" into "obj\Debug\makeDll.Circle.Oval5.Oval5.pa_IN.resources".
Processing resource file "Circle\Oval5\Oval5.fr-FR.resx" into "obj\Debug\makeDll.Circle.Oval5.Oval5.fr-FR.resources".
Processing resource file "Circle\Oval5\Oval5.gu-IN.resx" into "obj\Debug\makeDll.Circle.Oval5.Oval5.gu-IN.resources".
GenerateTargetFrameworkMonikerAttribute:
Skipping target "GenerateTargetFrameworkMonikerAttribute" because all output files are up-to-date with respect to the input files.
CoreCompile:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Csc.exe /noconfig /nowarn:1701,1702 /nostdlib+ /errorreport:prompt /warn:4 /define:DEBUG;TRACE /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Microsoft.CSharp.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\mscorlib.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll" /reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.Linq.dll" /debug+ /debug:full /filealign:512 /optimize- /out:obj\Debug\makeDll.dll /resource:obj\Debug\makeDll.Circle.Oval5.Oval5.resources /resource:obj\Debug\makeDll.Circle.Oval5.Oval5.pa_IN.resources /target:library Circle\Oval5\Oval5.Designer.cs Circle\Oval5\Oval5.Designer.pa_IN.cs Circle\Oval5\Oval5.Designer.fr-FR.cs Circle\Oval5\Oval5.Designer.gu-IN.cs Properties\AssemblyInfo.cs "C:\Users\schakravorty\AppData\Local\Temp\.NETFramework,Version=v4.0.AssemblyAttributes.cs"
GenerateSatelliteAssemblies:
Creating directory "obj\Debug\fr-FR".
Creating directory "obj\Debug\gu-IN".
c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\AL.exe /culture:fr-FR /out:obj\Debug\fr-FR\makeDll.resources.dll /template:obj\Debug\makeDll.dll /embed:obj\Debug\makeDll.Circle.Oval5.Oval5.fr-FR.resources
GenerateSatelliteAssemblies:
c:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\NETFX 4.0 Tools\AL.exe /culture:gu-IN /out:obj\Debug\gu-IN\makeDll.resources.dll /template:obj\Debug\makeDll.dll /embed:obj\Debug\makeDll.Circle.Oval5.Oval5.gu-IN.resources
CopyFilesToOutputDirectory:
Copying file from "obj\Debug\makeDll.dll" to "bin\Debug\makeDll.dll".
makeDll -> D:\MyProject\bin\Debug\makeDll.dll
Copying file from "obj\Debug\makeDll.pdb" to "bin\Debug\makeDll.pdb".
Creating directory "bin\Debug\fr-FR".
Copying file from "obj\Debug\fr-FR\makeDll.resources.dll" to "bin\Debug\fr-FR\makeDll.resources.dll".
Creating directory "bin\Debug\gu-IN".
Copying file from "obj\Debug\gu-IN\makeDll.resources.dll" to "bin\Debug\gu-IN\makeDll.resources.dll".
Done Building Project "D:\MyProject\makeDll.csproj" (rebuild target(s)).
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:01.09
答案 0 :(得分:0)
您需要将资源文件名从pa_IN更改为pa.IN
来自[MSDN] [1]
文化名称,格式为languagecode2-country / regioncode2。 languagecode2是从ISO 639-1派生的小写双字母代码。 country / regioncode2源自ISO 3166,通常由 两个大写字母。
[1] http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.name.aspx