Code: Select all
%windir%\Microsoft.NET\Framework\v4.0.30319\csc test.cs /win32manifest:test.manifest
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);
}
}
}
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>
related: http://msdn.microsoft.com/library/dn481241ver.6.2
// this prevents vs_Community.exe bootsrap.