Generating resource files for application based on default resource files - visual-studio

I have a .net application that currently has resource files for all it's content, one per .aspx and .ascx. Currently there are only resource files for english.
I now need to add resource files for another language which means I need to replicate all the resource files with just the keys and no values, files named with the correct culture extension eg es for spainish.
My application is built against the .net 3.5 framework in VS2008.
Is there any way of automatically creating/generating the new resource files, in the format detailed above for the entire solution?

You could use this free command line tool or a more sophisticated service like Amanuens.
Disclaimer: I've built the tool and my company is behind the service I've linked.

Related

GetVersionEx function for Windows 8.1 and upper (fasm)

I am writting application in fasm and have problem with determinating Windows version 8.1 and upper. Functions GetVersionEx and Version Helper give me Windows 8. As MSDN says, I must target my application via changing manifest file in Visual Studio, but I'm not using VS, so what should I do?
Any programming environment that allows you to link resources into the compiled executable can be used to create a manifest resource. All you have to do is write a suitable .manifest file for your app that contains the desired XML values, and then link that file's content directly into your application's resources, making sure the resource type is 24 and the resource ID is 1, 2, or 3 (see this page for details about when to use which ID). You are not required to use VisualStudio for this.
If, for some reason, you cannot link the manifest directly into your app's resources, you can alternatively save the XML into a file named <myappname>.exe.manifest (where <myappname> is the actual name of your EXE file) and put it in the same folder as your app. This is not the preferred approach to manifestation, but it does work.
That being said, there are alternative APIs you can use instead of GetVersion/Ex() or VerifyVersionInfo()-based helpers to get the correct OS version without dealing with manifestation at all. Namely, RtlGetVersion(), NetServerGetInfo(), and NetWkstaGetInfo() can be used instead (and all of them have been tested as working in Windows 8.1 and 10).
The manifest file is XML file embedded as Win32 resource. It can also be external file with the name your.exe.manifest. Search for examples in internet for sample contents.

Windows Ribbon Framework: Load resource strings from different file

I wonder if anyone knows a possibility to tell the Windows Ribbon Framework to load its resource strings from a different file (or resource handle) than the rest of the ribbon resources.
That would be important for localizing the Ribbon UI. I am aware that I can specify a different resource file at runtime dependent on the user's language, but that would mean that I need to have a copy of the ribbon markup and of all images in every localized resource DLL, although they do not change in other languages in my case. This would bloat the setup and produce extra work in keeping all those resources in sync.

Run Custom Tool at build in VS

I'm creating an internal VS template to create new versions of a multilingual website with custom fields filled by a wizard. All is going well, until I try and run the program. Upon running, I receive...
Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "<My Namespace>.Global.resources" was correctly embedded or linked into assembly "<My program>" at compile time, or that all the satellite assemblies required are loadable and fully signed.
If I open up the resx files and save them, or choose to run a custom tool before building, it works fine, but if I try to build immediately after creating the project, I receive that error.
My settings on all of my resx files are...
Build Action - Embedded Resource
Copy to Output Directory - Do not coopy
Custom Tool - PublicResXFileCodeGenerator
Custom Tool Namespace - <My Namespace>
Mostly, I'm just looking for a way to run the custom tool at build. This does need to work as I've described it. This is a large company, and non-programmers/non-experts work here.
Thanks in advance,
Andrew

Multiple setup projects for different languages and brand names

I need to rebrand my application, that means create another application resource file with different strings, slash screen and icons.
My application is also localized for a second language, i have another resource file with all application string which is translated, that creates me additional, satellite dll.
I need to build 4 setup project 2 for each language and 2 for each brand name.
What will the elegant solution for this? Is there any way to create additional application resource file same way I did with language translation and how I include a satellite (resource in a second language dll) in my setup project and not including resources in the original, neutral language.
Thank you.
I assume that those branding resources are not in setup project, but in main project, and that main project is C++.
In C++ you can have several .rc files in a project. This is most likely true for C# resources too. Move all branding material to second resource file. Create another project, shallow in nature, that references all files (including .rc) from original, but uses its own versions of branding files. Apart from strings, icons, and images maybe you will have some dialogs copied and branded as well. Make sure they all have resource identifiers in sync.
Creating another project can be done by just copying original project and fiddling with paths in text editor. Just make sure you change the project GUID, so that two project can coexist in the same solution.

What is the best way to determine the path to the ISV directory?

MSCRM 4.0
Problem:
I'm currently storing xml files in the ISV directory along with my web applications. From a plugin (or potentially a seperate app), I need to find an easy way to navigate to the ISV directory to read these xml files. This routine will be called extremely often, so processing minimization should be a strong consideration.
Potential solutions:
Registry: There is a registry key called 'WebSitePath' with the data 'C:\Inetpub\wwwroot\CRM'. Could potentially use this to build the path. (Will this be the same on all systems/installations?)
IIS directory data: Looping through the DirectoryEntries of path '"IIS://localhost/W3SVC"' I could obtain the the web application where description is equal to "Microsoft Dynamics CRM". (Will this be the same on all systems/installations?)
Webservice: Create one to read and return the data contained in these xml files The webservice would have easy access to its executing directory.
Database: Store the data of these files in the database.
Help:
Can anyone suggest a simpler solution to obtaining and reading a file from the ISV directory? If not, which of the above solutions would be the quickest to process?
Thanks for any and all contributions.
If you manage your deployment, I would first try to access the file at the location that you think the file can be found (like an hint). If you can't find it, I would try to retrieve the ISV folder location using the registry.
If you are not controlling the deployment, using a file in the ISV folder is not a good solution, because CRM can be deployed using different roles, and the ISV folder is not necessarily on the same server, so I would rely on a external database.

Resources