Xarzu (1) [Avatar] Offline
#1
Does anyone know how to declare Manifest Files in the Visual Studio IDE for C#?

I followed the steps outlined here for including a manifest file:
http://support.microsoft.com/kb/944276
Does it matter if the manifest file is in the directory where the
source code is or should it be in the directory where the executable
code is?

Someone has suggested I set BuildAction to "Embedded Resource". But I cannot find where this is set in the properties. Can you? In which panel is the BuildAction?

http://i67.photobucket.com/albums/h292/Athono/CSharp015.png
http://i67.photobucket.com/albums/h292/Athono/csharp016.png
http://i67.photobucket.com/albums/h292/Athono/csharp017.png
http://i67.photobucket.com/albums/h292/Athono/CSharp018.png
http://i67.photobucket.com/albums/h292/Athono/csharp019.png
http://i67.photobucket.com/albums/h292/Athono/csharp020.png

It seems there is more than one way to use Manifest Files with C#. I would like to know them all.
tomten (19) [Avatar] Offline
#2
Re: C# Manifest file question
It's very generous of Jon to allow this forum to be used for random development questions.

> Does anyone know how to declare Manifest Files in the Visual Studio
> IDE for C#?

The KB you refer to "describes how to embed a manifest file in an executable (.exe) file". Is that what you want? Technically, "declare Manifest Files" sounds like something else, but I'm not sure about the nomenclature.

> I followed the steps outlined here for including a manifest file:

Didn't that resolve your issue? If not, how so?

The screenshots you included are from the properties of the executable project itself. I can't really see how those properties are relevant here. I think the properties of the resource are the ones you want to look at.

> I would like to know them all.

A hunger for knowledge is always a good thing!
jon.skeet (451) [Avatar] Offline
#3
Re: C# Manifest file question
The bizarre thing is that I'm sure I replied earlier on... I certainly typed out a reply, but apparently it never made it to the forum.

I'm happy to use this forum for dev questions, although I think it's a better idea to post them on newsgroups - there's a much wider readership there!

I agree that the OP needs to find the properties window while the resource file is selected rather than the properties of the project itself. Personally I'm not au fait with manifest files. However, it does seem that VS 2008 has rather more support for them than VS 2005 - you can specify a resource directly in VS 2008.

Jon