Questions about manifest

This forum is meant for questions about the Visual FoxPro Language support in X#.

Post Reply
User avatar
xinjie
Posts: 112
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

Questions about manifest

Post by xinjie »

Hi, everybody

I'm having trouble with the manifest file.

Here's the thing:
I am using the WIN32API SetLocalTime function in my test code. I have to start the executable in administrator mode if I need to get the expected results.

Following my experience in VFP, I create an external manifest file. But it doesn't seem to work. The contents of the manifest are as follows(It's the AI that gives):

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <!-- A list of the Windows versions that this application is designed to work with. -->
      <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" /> <!-- Windows 10 -->
      <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" /> <!-- Windows 8.1 -->
      <supportedOS Id="{4f476d8e-5e6e-4d8a-8e8e-8d7b2e3c5b1e}" /> <!-- Windows 8 -->
      <supportedOS Id="{1e1f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" /> <!-- Windows 7 -->
      <supportedOS Id="{d8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" /> <!-- Windows 11 -->
    </application>
  </compatibility>
</assembly>
Well, I checked “Suppress default Win32 manifest” in the project properties and Re-build the project。
But when I start the EXE, I see the message: could not start the application the parallel configuration is not correct

By this point, I hadn't given up. I tried to use the internal application manifest to solve the problem, but found no clue in the help documentation.

I then created a console project in C#. Following a web search, I added the manifest file to the project (actually, in the project reference, I added app.manifest)

By this point, I was confused. I'm not sure if simply adding it to the X# project reference is the right thing to do. Also, I noticed in the C# project reference that there is also an App.config file. I'm not sure if X# needs this file.

Okay, I'm confused. Is anyone willing to show me clear steps in order for me to complete this test?
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
User avatar
xinjie
Posts: 112
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

Re: Questions about manifest

Post by xinjie »

Okay, I've solved the problem via -win32manifest
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
User avatar
Chris
Posts: 5018
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Questions about manifest

Post by Chris »

Hi xinjie,

Sorry, I am not familiar with how manifests work, so was hoping someone else might step in. Thanks for letting us know how you solved this, I will also open a feature request, so that manifest files can be specified in a visual way, maybe as in c# or with an extra project option.
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
User avatar
xinjie
Posts: 112
Joined: Wed May 20, 2020 10:05 am
Location: China
Contact:

Re: Questions about manifest

Post by xinjie »

Hi, Chris

I am simply addressing the reality of the problem that exists. I appreciate you submitting a feature request.

I noticed a difference in the X# project properties and the C# project properties.
Although the problem can be solved by manually changing the file or in the existing UI interaction situation, it is after all not.

For developers like me, who are not familiar with dot net and don't know C#, the only way to get answers is to search the web. However, the content of the search is basically C#. Therefore, a property window as close as possible to the C# project will greatly reduce the difficulty of using X#. This is just my personal opinion.
简单的东西重复做,你能成为专家;重复的东西用心做,你能成为赢家!
User avatar
Chris
Posts: 5018
Joined: Thu Oct 08, 2015 7:48 am
Location: Greece

Re: Questions about manifest

Post by Chris »

Hi xinjie,

Yes, I agree, especially in VS, things in X# should work in a similar way as in c#, for the reason you mentioned. Most things already do, but this was missed indeed, thanks for reporting!
Chris Pyrgas

XSharp Development Team
chris(at)xsharp.eu
Post Reply