Posted by Dan Rigsby on 16th April 2008
Visual Studio 2008 added a new feature to easily embed a manifest. This is available right from the project properties page. It can be used to embed UAC data for Vista or other things.
By default each project is selected to use the embedded manifest. This doesn’t sound too harmful, right?
Well, ClickOnce and Registration-Free COM applications require an external manifest. So, if you use ClickOnce, it will try to create it own external application manifest which could cause a conflict with the embedded one. Here is the error you might get when you try to install the ClickOnce application:
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of \\MyShare\MyApplication.application resulted in exception. Following failure messages were detected:
+ Reference in the manifest does not match the identity of the downloaded assembly MyApplication.exe.
This error seems a bit cryptic at first. Especially if you don’t know that Visual Studio is embedding a manifest for. Fortunately, this error is easy to get around. You simple just set this option to “Create application without a manifest”. Or manually add “<NoWin32Manifest>true</NoWin32Manifest> ” to your project file like so:
<PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.21022</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <OutputType>WinExe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>MyApplication</RootNamespace> <AssemblyName>MyApplication</AssemblyName> <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <NoWin32Manifest>true</NoWin32Manifest> </PropertyGroup>