TOOLS: Visual Studio.NET 2003
.NET SDK
GOAL: Reproduce the DLL's that our Visual Studio.NET development boxes
create, by using the SDK command line compilers
DILLEMA: RESX Files, how to handle
How does VS.NET handle RESX files when a developer builds the solution?
Does VS.NET use the "/res:filename.re sx" command line option? Does it
invoke the RESGEN and AL programs? If a RESX file appears empty, is it
ignored by the compiler? (I would guess yes) If so, how does it know the
file is empty?
My command line DLL's are about 2x the size of a VS.NET DLL when I use the
"/res:" command line option.
When I exclude the RESX files, my command line DLL's are 10-15% smaller than
the VS.NET DLL's.
Our RESX files are in the default state the VS.NET created them. We have
not added any information to them, but may have to soon.
Our build box does not have VS.NET installed on it, so it is not an option
at this time.
Any insight you can provide would be most helpful and appreciated.
-Todd 4 3108
Hi Todd,
The VS.NET uses a hub and spoke model to package and deploy resources. The
hub is the main assembly that contains the nonlocalizable executable code
and the resources for a single culture, called the neutral or default
culture. The default culture is the fallback culture for the application.
Each spoke connects to a satellite assembly that contains the resources for
a single culture, but does not contain any code.
The hub and spoke model requires that you place resources in specific
locations, so that they can be easily located and used. If you do not
compile and name resources as expected, or if you do not place them in the
correct locations, the common language runtime will not be able to locate
them. As a result, the runtime uses the default resource set.
Best regards,
Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Jacob,
Thanks for the reply. I am somewhat aware of the hub and spoke model. But
I think my question still remains unanswered.
How does VS.NET handle resx files, and technically, how can I replicate this
action with the command line compilers, so that my resulting DLL's are the
same as what Visual Studio produces?
-Todd
"Jacob Yang [MSFT]" <ji***@online.m icrosoft.com> wrote in message
news:k8******** ******@cpmsftng xa07.phx.gbl... Hi Todd,
The VS.NET uses a hub and spoke model to package and deploy resources. The hub is the main assembly that contains the nonlocalizable executable code and the resources for a single culture, called the neutral or default culture. The default culture is the fallback culture for the application. Each spoke connects to a satellite assembly that contains the resources
for a single culture, but does not contain any code.
The hub and spoke model requires that you place resources in specific locations, so that they can be easily located and used. If you do not compile and name resources as expected, or if you do not place them in the correct locations, the common language runtime will not be able to locate them. As a result, the runtime uses the default resource set.
Best regards,
Jacob Yang Microsoft Online Partner Support Get Secure! ¨C www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights.
Hi Todd,
Thank you for your update.
As I mentioned above, the VS.NET will compile with a default culture, which
causes the compiled assembly a little bigger than what generated with the
command line without /:resource option.
You can do the same thing with the command line by specifying a non-culture
(neutral) resource file.
Please let me know if the information above helps.
Best regards,
Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Jacob,
Thanks for the info. You have put me on the path I was seeking.
Looking at the Output window in VS.NET, I can see the following feedback as
the assembly is built:
Preparing resources...
Updating references...
Performing main compilation...
Building satellite assemblies...
From my limited knowledge, and the knowledge you have supplied, I think I
have been able to replicate what VS.NET is doing in all these steps.
If I build *.resource file(s) from all my RESX pages, and then include these
new *.resource with the /resource: option, my DLLs are now almost identical.
My mistake previsously was to include the RESX file by themselves, without
running resgen.exe.
Thank you!
-Todd
"Jacob Yang [MSFT]" <ji***@online.m icrosoft.com> wrote in message
news:AP******** *****@cpmsftngx a07.phx.gbl... Hi Todd,
Thank you for your update.
As I mentioned above, the VS.NET will compile with a default culture,
which causes the compiled assembly a little bigger than what generated with the command line without /:resource option.
You can do the same thing with the command line by specifying a
non-culture (neutral) resource file.
Please let me know if the information above helps.
Best regards,
Jacob Yang Microsoft Online Partner Support Get Secure! ¨C www.microsoft.com/security This posting is provided "as is" with no warranties and confers no rights. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Frank Jones |
last post by:
When manually running resgen.exe from the command prompt (Visual Studio .NET
2003 command prompt) I get the following error:
error: Invalid ResX input.
error: Specific exception: SerializationException Message: Invalid
ResX input. ---> SerializationException: Cannot find the assembly Common,
Version=1.0.1905.1173, Culture=neutral, PublicKeyToken=null.
2 error(s).
The file within the project it is erroring on is a custom control.
|
by: qh0st |
last post by:
Hi all.
I have an windows form application that will have multiple language
..resx files per form. Is there anyway I can bundle these .resx files
into ONE .dll per form? If not, do you have any suggestions as to how
these .resx files should be packaged with the application? Thanks in
advance.
- Lay
|
by: Mark Kamoski |
last post by:
Hi.
This is an error that comes up fairly regularly when trying to run the
"Rebuild All" command in a Solution that contains more than one project.
C:\VSS\WebAppDev\INVOICING\web\site\detail_grid.ascx.resx A failure
occurred writing to the resources file. Access is denied.
The offending file or files are always RESX files.
|
by: Paul |
last post by:
I have plugged the ExceptionManagement app block into our framework and have
a question about resource files. ExceptionManagerText.resx is one of
resource files in the project. When you look at .dll's manifest in the
disassembler the file is ExceptionManagerText.resources. When/How is the
file transformed from it's text form, .resx, to it's binary form,
..resources?
HTH: I was getting the error: "Could not find any resources appropriate...
|
by: Chad |
last post by:
Is there a command line to convert, compile...etc .vb files to .resx
files without having Visual Studio.net installed.
Chad
| |
by: Emmanuel |
last post by:
Hi,
I am using VS 2003 to build my (csharp) solution.
1. Is there a way to reveal the command line options that VS is using during
compilation of a project file, in order to build a batch file/makefile ?
2. Is there an option in the command line compiler that builds a VS project
?
|
by: mdh |
last post by:
Well, K& R has finally gotten to header files!!!
May I ask this. (Have checked out the FAQ)
I am using "Xcode" to compile the program, so it may well be that this
is doing something strange.
What is unique to a header file?
For example, if I define an integer thus:
|
by: schaf |
last post by:
Hi All!
I would like to have additional information (ResourceBuildDate) in the
*.resx and afterwards in the *.resources to ensure the
right .resources would be used for the satellite assemblies.
Adding a new unused string to a custom generated .resx is easy, but it
would be a problem for forms.resx files because these files will be
generated by the system and so I will lost my entry.
So I though I could use the resheader and add there a...
|
by: raylopez99 |
last post by:
I have the latest version of Visual Studio 2008 Professional, which
allows you to create resource files (this is the .resx file, no?),
unlike the Express version, which does not.
I am trying to cut and paste code that MSDN recommends for playing a
simple wav file from inside an embedded file, like presumeably the
'resources' file .resx is. I want to embed the .wav file in a
'resource file' since I don't want the user storing the file on...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |