Click here to Skip to main content
15,889,852 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralRe: Why .NET CLR so slow compared to JVM or Dart or V8 ? Call for help Pin
Antonino Porcino2-Sep-14 1:30
Antonino Porcino2-Sep-14 1:30 
AnswerRe: Why .NET CLR so slow compared to JVM or Dart or V8 ? Call for help Pin
Ben M Watson4-Sep-14 5:43
Ben M Watson4-Sep-14 5:43 
GeneralRe: Why .NET CLR so slow compared to JVM or Dart or V8 ? Call for help Pin
Antonino Porcino4-Sep-14 7:10
Antonino Porcino4-Sep-14 7:10 
QuestionLocalization based on namespace Pin
Moreno Airoldi27-Aug-14 23:18
Moreno Airoldi27-Aug-14 23:18 
AnswerRe: Localization based on namespace Pin
Bernhard Hiller28-Aug-14 21:10
Bernhard Hiller28-Aug-14 21:10 
GeneralRe: Localization based on namespace Pin
Moreno Airoldi1-Sep-14 2:35
Moreno Airoldi1-Sep-14 2:35 
AnswerRe: Localization based on namespace Pin
Eddy Vluggen29-Aug-14 7:56
professionalEddy Vluggen29-Aug-14 7:56 
GeneralRe: Localization based on namespace Pin
Moreno Airoldi1-Sep-14 2:51
Moreno Airoldi1-Sep-14 2:51 
Of course you can andd a .res file to a project and name it as you like.
What I'm asking is a whole different thing.
I'll try to be more specific. Smile | :)

In a Visual Studio solution, the standard way to add localization is by creating a set of resource files named "Localization" plus the culture ID. So for example you will have "localization.resx", "Localization.it.resx", "Localization.de.resx" for your default language, Italian and German, and so on.

Then, you can use a ResourceManager to get your localized strings:

C#
ResourceManager LocalizationResourceManager = new ResourceManager(Assembly.GetExecutingAssembly().GetName().Name + ".Localization", Assembly.GetExecutingAssembly());
...
string LocalizedString = LocalizationResourceManager.GetString(ResourceName, Culture);


Now this is perfectly fine and of course does not stop me from doing what I need to, even if I share code by copying over source files. But as you see clearly in the ResourceManager constructor, it's tied to the assembly name, simply because the resource file is compiled together with the project's main assembly.

I was simply wondering if there was a way to somehow change this so that the DLLs compiled from the resource files will be tied to a different namespace.

What I'm asking basically is: can I have VS compile a resource file in a project and not automatically assign the resources to the project's main namespace ?

Hope it's more clear now. Smile | :)

EDIT: Just to be even more clear - nothing stops me from naming my resource files "Localization_MYNAMESPACE" or something similar, that's actually what I would most likely do (haven't actually tried this but I'm pretty sure there is no reason why it should not work). I'm just wondering if there are different approaches, and found it quite interesting to investigate how one can configure the way the compiler acts on resource files.
In theory, there is no difference between theory and practice, but not in practice. - Anonymous

A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match. - B. Bryson

AnswerRe: Localization based on namespace Pin
jschell29-Aug-14 8:00
jschell29-Aug-14 8:00 
GeneralRe: Localization based on namespace Pin
Eddy Vluggen29-Aug-14 11:55
professionalEddy Vluggen29-Aug-14 11:55 
GeneralRe: Localization based on namespace Pin
Moreno Airoldi1-Sep-14 2:55
Moreno Airoldi1-Sep-14 2:55 
QuestionHosting a small dot net app and SQL Server Express db Pin
MarkB12327-Aug-14 21:41
MarkB12327-Aug-14 21:41 
Question32 Bit app calling a 64 Bit .Net object - possible? Pin
Ed The C26-Aug-14 6:35
Ed The C26-Aug-14 6:35 
AnswerRe: 32 Bit app calling a 64 Bit .Net object - possible? Pin
Paulo Zemek26-Aug-14 6:48
mvaPaulo Zemek26-Aug-14 6:48 
QuestionNeed Salted MD5 technique for login Pin
demoninside921-Aug-14 19:22
demoninside921-Aug-14 19:22 
AnswerRe: Need Salted MD5 technique for login Pin
Bernhard Hiller21-Aug-14 21:21
Bernhard Hiller21-Aug-14 21:21 
AnswerRe: Need Salted MD5 technique for login Pin
Richard Deeming22-Aug-14 2:10
mveRichard Deeming22-Aug-14 2:10 
QuestionDropTiles ASP.NET MVC Pin
Bain McKay21-Aug-14 9:17
Bain McKay21-Aug-14 9:17 
AnswerRe: DropTiles ASP.NET MVC Pin
Eddy Vluggen22-Aug-14 6:57
professionalEddy Vluggen22-Aug-14 6:57 
Questionpassword is in clear text after implementing SSL Pin
demoninside920-Aug-14 23:50
demoninside920-Aug-14 23:50 
AnswerRe: password is in clear text after implementing SSL Pin
Eddy Vluggen21-Aug-14 0:33
professionalEddy Vluggen21-Aug-14 0:33 
GeneralRe: password is in clear text after implementing SSL Pin
demoninside921-Aug-14 0:48
demoninside921-Aug-14 0:48 
GeneralRe: password is in clear text after implementing SSL Pin
Eddy Vluggen21-Aug-14 2:59
professionalEddy Vluggen21-Aug-14 2:59 
QuestionDll injection VB.NET Pin
3a©roub20-Aug-14 13:29
3a©roub20-Aug-14 13:29 
AnswerRe: Dll injection VB.NET Pin
Dave Kreskowiak20-Aug-14 13:44
mveDave Kreskowiak20-Aug-14 13:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.