Page 1 of 1

cannot read osver from CLR, what should I do

Posted: Fri Jan 12, 2018 11:45 am
by v2y
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.

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

Posted: Mon Jan 15, 2018 3:20 pm
by Barb@Invincea
Hello v2y ,

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

Regards,
Barb.-