Winforms: .NET Core project template doesn't have a manifest file

Created on 10 Oct 2019  路  7Comments  路  Source: dotnet/winforms

  • .NET Core Version: 3.1.0-preview1.19458.7
  • Have you experienced this same bug with .NET Framework?: No

Problem description:

  • It needs to add a manifest file to Core project template in order for the new app to opt-in into all the latest fixes from Windows.

Actual behavior:

  • Core project template doesn't have a manifest file

Expected behavior:

  • Core project template must have a manifest file

Minimal repro:

  • Create new .Net Core app

Manifest file:

Most helpful comment

@vladimir-krestov by default VS embeds a default manifest

@RussKie the default manifest does not include the <supportedOS Id="..."/>tags to enable Windows 7, 8, 8.1 or Windows 10 support, so .NET Core 3 applications will be switched into a compatibility mode where the OS assumes they were programmed for XP or older (Vista was the first OS which you need to declare support for in the manifest). This is what @vladimir-krestov is meaning when he says the manifest does not opt-in to the latest fixes

I agree that either the default manifest needs an upgrade, or the WinForms template should include the app.manifest template from VS. The first thing I do in every new application is to add a manifest to enable Windows 10 support. (Note that in the VS app.manifest template the supportedOS tags are still commented out by default, so it needs to be adjusted after adding it.)

This is the default manifest I'm getting (extracted from the resource in the output exe)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

All 7 comments

User can add a manifest easily to their project (add new item dialog).

Apps get the default manifests
image

Is our default manifest missing features?

@Tanya-Solyanik could you please explain this point?

@vladimir-krestov by default VS embeds a default manifest

@RussKie the default manifest does not include the <supportedOS Id="..."/>tags to enable Windows 7, 8, 8.1 or Windows 10 support, so .NET Core 3 applications will be switched into a compatibility mode where the OS assumes they were programmed for XP or older (Vista was the first OS which you need to declare support for in the manifest). This is what @vladimir-krestov is meaning when he says the manifest does not opt-in to the latest fixes

I agree that either the default manifest needs an upgrade, or the WinForms template should include the app.manifest template from VS. The first thing I do in every new application is to add a manifest to enable Windows 10 support. (Note that in the VS app.manifest template the supportedOS tags are still commented out by default, so it needs to be adjusted after adding it.)

This is the default manifest I'm getting (extracted from the resource in the output exe)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="asInvoker" uiAccess="false"/>
      </requestedPrivileges>
    </security>
  </trustInfo>
</assembly>

Thank you!

@ericstj do you know who owns the default manifest? Is this change something we can entertain to it?

Thank you @weltkante 馃憤

Was this page helpful?
0 / 5 - 0 ratings