Change to .Net Framework version 4.7.2 because 4.6.1 is not recommended

This commit is contained in:
Sam Xu 2020-01-23 16:40:57 -08:00
parent 5c185cd67c
commit 3d62ec44e6
7 changed files with 7 additions and 132 deletions

View file

@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>Microsoft.OpenApi.OData.Reader</AssemblyName>
<RootNamespace>Microsoft.OpenApi.OData</RootNamespace>
<TargetFrameworks>net461; netstandard2.0</TargetFrameworks>
<TargetFrameworks>net472; netstandard2.0</TargetFrameworks>
<PackageId>Microsoft.OpenApi.OData.Reader</PackageId>
<LangVersion Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">latest</LangVersion>
<LangVersion Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">latest</LangVersion>

View file

@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>OoasGui</RootNamespace>
<AssemblyName>OoasGui</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>

View file

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net461</TargetFramework>
<TargetFramework>net472</TargetFramework>
</PropertyGroup>
<ItemGroup>

View file

@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>Microsoft.OpenApi.OData.Reader.Tests</AssemblyName>
<RootNamespace>Microsoft.OpenApi.OData.Reader.Tests</RootNamespace>
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net472;netcoreapp2.1</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\tool\35MSSharedLib1024.snk</AssemblyOriginatorKeyFile>
<DelaySign>true</DelaySign>

View file

@ -14,7 +14,7 @@
<!-- Setup the EnlistmentRoot, without the last '\' -->
<EnlistmentRoot Condition="'$(EnlistmentRoot)'==''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))</EnlistmentRoot>
<EnlistToolPath Condition=" '$(EnlistToolPath)'=='' ">$(EnlistmentRoot)\tool</EnlistToolPath>
<EnlistToolPath Condition="'$(EnlistToolPath)'==''">$(EnlistmentRoot)\tool</EnlistToolPath>
</PropertyGroup>

View file

@ -1,5 +1,5 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="WebStack.versions.settings.targets" />
<Import Project="versioning.props" />
<PropertyGroup>
<VersionNugetNightlyBuild>$([System.DateTime]::Now.ToString("yyyyMMddHHmm"))</VersionNugetNightlyBuild>
</PropertyGroup>

View file

@ -1,125 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Set the version number: major, minor, build and release (i.e. alpha, beta or blank for RTM)-->
<PropertyGroup>
<VersionMajor Condition="'$(VersionMajor)' == ''">1</VersionMajor>
<VersionMinor Condition="'$(VersionMinor)' == ''">0</VersionMinor>
<VersionBuild Condition="'$(VersionBuild)' == ''">1</VersionBuild>
<VersionRelease Condition="'$(VersionRelease)' == ''"></VersionRelease>
</PropertyGroup>
<!-- For NuGet Package Dependencies -->
<PropertyGroup>
<OpenApiCorePackageDependency>[1.1.4, 2.0.0)</OpenApiCorePackageDependency>
<ODataEdmPackageDependency>[7.6.1, 8.0.0)</ODataEdmPackageDependency>
</PropertyGroup>
<!--
Revision number is a date code. Note that this only work for 6 years before the year part (year minus 2020)
overflows the Int16. The system convert below will throw errors when this happens.
-->
<PropertyGroup>
<VersionStartYear Condition="'$(VersionStartYear)' == ''">2020</VersionStartYear>
<VersionDateCode>$([System.Convert]::ToInt16('$([MSBuild]::Add(1, $([MSBuild]::Subtract($([System.DateTime]::Now.Year), $(VersionStartYear)))))$([System.DateTime]::Now.ToString("MMdd"))'))</VersionDateCode>
<VersionRevision Condition="'$(VersionRevision)' == '' OR '$(VersionRevision)' == '0'">$([System.Convert]::ToString($(VersionDateCode)))</VersionRevision>
</PropertyGroup>
<!-- Product Version -->
<PropertyGroup>
<VersionFullSemantic>$(VersionMajor).$(VersionMinor).$(VersionBuild)</VersionFullSemantic>
<VersionFull>$(VersionFullSemantic).$(VersionRevision)</VersionFull>
</PropertyGroup>
<!-- For NuGet Packages -->
<PropertyGroup>
<VersionNuGetSemantic>$(VersionFullSemantic)</VersionNuGetSemantic>
<VersionNuGetSemantic Condition="'$(VersionRelease)'!=''">$(VersionFullSemantic)-$(VersionRelease)</VersionNuGetSemantic>
</PropertyGroup>
<!--
==================================================================================================
Property Groups to define version information. Do not modify this section.
================================================================================================== -->
<PropertyGroup>
<VersionFileGenerationEnabled Condition="'$(VersionFileGenerationEnabled)' == '' AND '$(MSBuildProjectExtension)' == '.csproj'">true</VersionFileGenerationEnabled>
<VersionFileGenerationEnabled Condition="'$(VersionFileGenerationEnabled)' == ''">false</VersionFileGenerationEnabled>
</PropertyGroup>
<PropertyGroup>
<VersionStartYear Condition="'$(VersionStartYear)' == ''">2020</VersionStartYear>
<VersionMajor Condition="'$(VersionMajor)' == '0'">INVALID_VersionMajor</VersionMajor>
<VersionMajor Condition="'$(VersionMajor)' == ''">INVALID_VersionMajor</VersionMajor>
<VersionMinor Condition="'$(VersionMinor)' == ''">INVALID_VersionMinor</VersionMinor>
<VersionBuild Condition="'$(VersionBuild)' == ''">INVALID_VersionBuild</VersionBuild>
<VersionRevision Condition="'$(VersionRevision)' == '' OR '$(VersionRevision)' == '0'">$([MSBuild]::Add(1, $([MSBuild]::Subtract($([System.DateTime]::Now.Year), $(VersionStartYear)))))$([System.DateTime]::Now.ToString("MMdd"))</VersionRevision>
<VersionRevision Condition="'$(VersionRevision)' == ''">0</VersionRevision>
<VersionRelease Condition="'$(VersionRelease)' == ''"></VersionRelease>
</PropertyGroup>
<PropertyGroup>
<AssemblyVersion>$(VersionMajor).$(VersionMinor).$(VersionBuild).$(VersionRevision)</AssemblyVersion>
<AssemblyFileVersion>$(VersionMajor).$(VersionMinor).$(VersionBuild).$(VersionRevision)</AssemblyFileVersion>
<AssemblyInfoVersion>$(AssemblyFileVersion)</AssemblyInfoVersion>
<AssemblyVersionFile>$(IntermediateOutputPath)$(MSBuildProjectName).version.cs</AssemblyVersionFile>
</PropertyGroup>
<ItemGroup Condition="'$(VersionFileGenerationEnabled)' == 'true'">
<Compile Include="$(AssemblyVersionFile)" />
</ItemGroup>
<ItemGroup>
<Clean Include="$(AssemblyVersionFile)" Condition="'$(MSBuildProjectExtension)' == '.csproj'"/>
</ItemGroup>
<PropertyGroup>
<AssemblyCompany>Microsoft Corporation.</AssemblyCompany>
<AssemblyCopyright>© Microsoft Corporation. All rights reserved.</AssemblyCopyright>
</PropertyGroup>
<!-- GenerateVersionFile target: generates assembly attributes into a source file that is included -->
<Target Name="GenerateVersionFileCore" Condition="'$(ShouldGenerateVersionFile)' == 'true'">
<ItemGroup>
<LinesToWrite Include="// $(SourceFileCopyright)" Condition="'$(SourceFileCopyright)' != ''"/>
<LinesToWrite Include="// &lt;auto-generated&gt;" />
<LinesToWrite Include="// This code was generated by a tool." />
<LinesToWrite Include="// &lt;/auto-generated&gt;" />
<LinesToWrite Include="[assembly: System.Reflection.AssemblyCompany(&quot;$(AssemblyCompany)&quot;)]" Condition="'$(AssemblyCompany)' != ''"/>
<LinesToWrite Include="[assembly: System.Reflection.AssemblyCopyright(&quot;$(AssemblyCopyright)&quot;)]" Condition="'$(AssemblyCopyright)' != ''"/>
<LinesToWrite Include="[assembly: System.Reflection.AssemblyVersion(&quot;$(AssemblyVersion)&quot;)]" Condition="'$(AssemblyVersion)' != ''"/>
<LinesToWrite Include="[assembly: System.Reflection.AssemblyFileVersion(&quot;$(AssemblyFileVersion)&quot;)]" Condition="'$(AssemblyFileVersion)' != ''"/>
<LinesToWrite Include="[assembly: System.Reflection.AssemblyInformationalVersion(&quot;$(AssemblyInfoVersion)&quot;)]" Condition="'$(AssemblyInfoVersion)' != ''" />
<LinesToWrite Include="[assembly: System.Resources.SatelliteContractVersionAttribute(&quot;$(SatelliteContractVersion)&quot;)]" Condition="'$(SatelliteContractVersion)' != ''"/>
<LinesToWrite Include="@(VersionFileAttribute)" Condition="'@(VersionFileAttribute)' != ''" />
</ItemGroup>
<WriteLinesToFile File="$(AssemblyVersionFile)" Lines="@(LinesToWrite)" Overwrite="true" Encoding="Unicode"/>
<Message Text="Assembly Version File: $(AssemblyVersionFile)" />
</Target>
<!-- ShouldGenerateVersionFile target: determines whether a version needs to be generated. -->
<Target Name="ShouldGenerateVersionFile">
<ReadLinesFromFile File="$(AssemblyVersionFile)" Condition="Exists('$(AssemblyVersionFile)')">
<Output ItemName="VersionText" TaskParameter="Lines"/>
</ReadLinesFromFile>
<PropertyGroup>
<VersionText>@(VersionText)</VersionText>
<ShouldGenerateVersionFile>!$(VersionText.Contains('$(AssemblyFileVersion)'))</ShouldGenerateVersionFile>
</PropertyGroup>
</Target>
<Target Name="ValidateVersionValues">
<!-- Throw if any of the version values is not int16 -->
<PropertyGroup>
<VersionMajor>$([System.Convert]::ToInt16('$(VersionMajor)'))</VersionMajor>
<VersionMinor>$([System.Convert]::ToInt16('$(VersionMinor)'))</VersionMinor>
<VersionBuild>$([System.Convert]::ToUInt16('$(VersionBuild)'))</VersionBuild>
<VersionRevision>$([System.Convert]::ToInt16('$(VersionRevision)'))</VersionRevision>
</PropertyGroup>
</Target>
<PropertyGroup Condition="'$(VersionFileGenerationEnabled)' == 'true'">
<BeforeCompileDependsOn>ValidateVersionValues;ShouldGenerateVersionFile;GenerateVersionFileCore</BeforeCompileDependsOn>
</PropertyGroup>
<Target Name="BeforeCompile" DependsOnTargets="$(BeforeCompileDependsOn)" />
</Project>