makefile?

L

Lee

Hi, For C/C++ project, when I needed the translation stored in the resource
file, I used to build the solution and created a makefile using .OBJ so that
the customers can change the resource strings or dialog/font etc. For C#, all
I can find is csc.exe. Since it doesn't create .OBJ equivalent, Do I have to
provide all the CS source codes to them?

For example, I have
myForm.cs
myForm.resx
myForm.csproj
myForm.sln

VStudio.NET runs the following command to generate myForm.dll:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig /unsafe-
/checked- /nowarn:1701,1702 /nostdlib- /errorreport:prompt /warn:4
/baseaddress:285212672 /define:TRACE
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
/debug- /filealign:4096 /optimize+ /out:blush:bj\Release\myForms.dll
/resource:blush:bj\Release\myForms.resources /target:library /warnaserror-
myForm.cs

And that generates myForms.dll and myForms.resources.
How can I regenerate myForms.dll without using the source file, i.e.
myForm.cs?
 
J

Jon Skeet [C# MVP]

<=?Utf-8?B?TGVl?= <Lee>> wrote:

And that generates myForms.dll and myForms.resources.
How can I regenerate myForms.dll without using the source file, i.e.
myForm.cs?

You can't, as far as I'm aware. Why would you want to? If you want your
customers to be able to customise things, store the customised settings
in a separate resource file, rather than as part of the DLL.
 
L

Lee

Excellent suggestion!!!

What would be the best practise for C# external resources?
In C/C++, I used the resource-only DLL.
 
J

Jon Skeet [C# MVP]

Excellent suggestion!!!

What would be the best practise for C# external resources?
In C/C++, I used the resource-only DLL.

Well, you could use a resource-only DLL in .NET as well, or you could
just load a .resources file IIRC using ResourceManager.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top