0

I primarily use JetBrains Rider, which appears to lack the option to add a manifest (though my installation of Visual Studio mysteriously lacks "Application Manifest" under the "Add Item" menu anyhow).

So, I created app.manifest and filled it with the desired XML (in my case, it's a vanilla manifest with the classic <requestedExecutionLevel level="requireAdministrator" uiAccess="false"/>)... but it didn't work.

I Changed Build Action to EmbeddedResource... but it still didn't work.

I renamed the file to sandbox.exe.manifest... still nothing!

If I open the exe in a text editor, I see two manifests - mine, and the default.

What step am I missing?

Hans Passant
  • 922,412
  • 146
  • 1,693
  • 2,536
M-Pixel
  • 3,501
  • 2
  • 16
  • 27

1 Answers1

1

You have to specify manifest file name in the project file. Open corresponding csproj file (Solution Explorer -> select your project -> F4 \ Edit sources) and add the next line to the global properties group :

<ApplicationManifest>app.manifest</ApplicationManifest>

For more information you can read this question:

How can I embed an configuration-specific manifest file in my c# app?

xtmq
  • 3,380
  • 22
  • 26