开发者

Write Resource file for .net project using the command line

开发者 https://www.devze.com 2023-01-20 07:37 出处:网络
I need to create a resource file for a .net project (by hand) and compile it using the ResGen.exe tool provided by the .NET framework. I can\'t find any documentation for this. I need to write the res

I need to create a resource file for a .net project (by hand) and compile it using the ResGen.exe tool provided by the .NET framework. I can't find any documentation for this. I need to write the resource file by hand because I'm in a situation where I don't want to download/buy extra tools (like VS) to generate this resource file, and also I feel more productive throug开发者_如何学Pythonh the command-line (helps me understand how things really work).

So I need to write a resource file by hand to store an ICON in the executable and use it from within my program. I would also like to use this icon to represent my executable in Windows Explorer.

Any references would be great!


Visual C# Express Edition will do what you want for free. If nothing else you can download that, create the resource file and then use that as a subject for your admirable curiosity about 'how it really works'. This may also save you some time in manual experimentation to get it right the first time around.


These 2 links in conjunction provide information on using that tool to create and embed an icon file, it seems specific to C#. Of course i'm guessing at your full intention, let me know if this points you in the proper direction.

http://www.xtremedotnettalk.com/showthread.php?t=75449

specifically there is a post which states; I think you should first create a *.resources-File from the Icon with the tool named "Resgen.exe"...

resgen App.ico App.ico.resources

the next step would be compiling...

csc /t:winexe /out:Keygen.exe /res:App.ico.resources /r:Crypto.dll /win32icon:App.ico Keygen.cs AssemblyInfo.cs

I'm sure you were here already. http://msdn.microsoft.com/en-us/library/ccec7sz1(VS.80).aspx


You should check this link: http://msdn.microsoft.com/en-us/library/ekyft91f.aspx

It explains what formatter is used and gives some code samples to generate one from code. You could then write a small wrapper app that you can call from the command line. No downloads needed!

0

精彩评论

暂无评论...
验证码 换一张
取 消