cannot read osver from CLR, what should I do

If it's not about a problem in the program
Post Reply
v2y
Posts: 50
Joined: Sun Mar 09, 2008 4:51 pm

cannot read osver from CLR, what should I do

Post by v2y » Fri Jan 12, 2018 11:45 am

build.cmd:

Code: Select all

%windir%\Microsoft.NET\Framework\v4.0.30319\csc test.cs /win32manifest:test.manifest
test.cs:

Code: Select all

using System;

namespace ConsoleApplication
{
	public class Program
	{
		public static void Main(string[] args)
		{
			Console.WriteLine("ver.{0}.{1}",Environment.OSVersion.Version.Major,Environment.OSVersion.Version.Minor);
		}
	}
}

test.manifest:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
    <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
        <application>
            <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
            <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
            <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
            <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
        </application>
    </compatibility>
</assembly>
Under Windows 10 and sandboxed, test.exe said:
ver.6.2
related: http://msdn.microsoft.com/library/dn481241

// this prevents vs_Community.exe bootsrap.

Barb@Invincea
Sandboxie Support
Sandboxie Support
Posts: 2337
Joined: Mon Nov 07, 2016 3:10 pm

Re: cannot read osver from CLR, what should I do

Post by Barb@Invincea » Mon Jan 15, 2018 3:20 pm

Hello v2y ,

I am waiting on further info from the devs to answer your question.

Regards,
Barb.-

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest