Question

I've got a C# .exe that requires side-by-side deployment of a hand-built manifest. I need to use a different manifest for each of my release and debug builds.

I set my application's manifest in the Application settings. However, this seems to be Configuration independent (the Configuration selector at the top of my Application settings is grayed out with N/A as its content).

I found some tips for doing this for C++ projects, but I'm C#.

Am I missing something obvious here? Are my google skills rusty? I can't find a thing out there about how to address this for a C# project, and I can't figure out how to tweak this in Visual studio.

Was it helpful?

Solution

No way. THAT SAID: put in a meaningless faulty one, put in properones, use post build steps to copy them correctly. Finished.

OTHER TIPS

I know its a little late, however I solved a similar issue by modifying the csproj file like so.

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <ApplicationManifest>app.manifest</ApplicationManifest>
  </PropertyGroup>

This is that I only wanted a app.manifest on a release build but not on a debug build. If you need different app.manifest files for different configurations you could create a different app.manifest file in a different folders and then use the condition to know which one to use like so.

  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <ApplicationManifest>Manifests\Release\App.manifest</ApplicationManifest>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <ApplicationManifest>Manifests\Debug\App.manifest</ApplicationManifest>
  </PropertyGroup>

You leave the ItemGroup that has the None elements for these files alone:

<None Include="Manifests\Debug\App.manifest" />
<None Include="Manifests\Release\App.manifest" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top