Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application Manifest Not Taking Effect #26

Open
danem opened this issue Jan 24, 2018 · 4 comments
Open

Application Manifest Not Taking Effect #26

danem opened this issue Jan 24, 2018 · 4 comments

Comments

@danem
Copy link

danem commented Jan 24, 2018

I'm attempting to use this library on Windows 10 with Visual Studio Community 2017 Version 15.4.2. I installed VirtualDesktop through NuGet:

PM> Install-Package VirtualDesktop -Version 2.0.0-beta3

I've copied the app.manifest file from the example project, and have verified in the csproj file that it's looking at the correct manifest file. I run the application in release mode, yet I get the System.NotSupportedException.

Any idea what's wrong?

If I comment out the VirtualDesktopHelper.ThrowIfNotSupported() calls, things work as expected.

@MrX13415
Copy link

MrX13415 commented Feb 14, 2018

I'm having the same Issue here. Interestingly the same issue occurs with the sample project included while using the NuGet Version. It works while referencing the source code directly. But removing the source code and adding the NuGet Version resulting in the same behaviour. There seems to be something different in the NuGet Version.

@MrX13415
Copy link

Ok I think this could be declared as "bug" because its very misleading. The actual issue is, that an exceptions is been raised about a missing STA-Thread. It should return another message then "not supported" because it's an implementation issue not an compatibility issue.

The solution to this is as following: Add "[STAThread]" to your main method like so:

    [STAThread]
    static void Main(string[] args)
    {
    ...
    }

@nimeshvaghasiya
Copy link

I'm using PM> Install-Package VirtualDesktop -Version 4.0.0.
It throws "You must target Windows 10 in your app.manifest and run without debugging.", I have checked app.manifest is correct.

I want to run this in DEBUG mode but at line number 100 (

if (Environment.OSVersion.Version.Major < 10) return false;
) : It return false even my major version is 10.

I have checked Major version number by adding Environment.OSVersion.Version.Major in my local code and it returns 10.
But while using Nudget package reference there is something wrong and returns false as per above link

Note: If I add VirtualDesktop as Project reference it works correctly with DEBUG mode.

@Chaoses-Ib
Copy link

Same problem on Win10 20H2 with .NET 5, VS 2019. And adding [STAThread] doesn't help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants