adjust the build scripts
This commit is contained in:
parent
35e53bb35e
commit
a20aabf999
16
Build.props
16
Build.props
|
@ -1,12 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
<!--
|
||||
|
||||
This file defines the top level external dependencies used by this repo.
|
||||
This file might be updated by automation.
|
||||
|
||||
-->
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Global settings that apply unconditionally. -->
|
||||
<EnlistmentRoot>$(MSBuildThisFileDirectory.TrimEnd('\'))</EnlistmentRoot>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
<EnlistmentRoot>$(MSBuildThisFileDirectory.TrimEnd('\'))</EnlistmentRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(EnlistmentRoot)\tool\Build.props" />
|
||||
|
|
|
@ -12,7 +12,7 @@ using System.Runtime.InteropServices;
|
|||
using System.Runtime.Versioning;
|
||||
using System.Security;
|
||||
|
||||
[assembly: AssemblyCompany("Microsoft Corporation")]
|
||||
// [assembly: AssemblyCompany("Microsoft Corporation")]
|
||||
// If you want to control this metadata globally but not with the VersionProductName property, hard-code the value below.
|
||||
// If you want to control this metadata at the individual project level with AssemblyInfo.cs, comment-out the line below.
|
||||
// If you leave the line below unchanged, make sure to set the property in the root build.props, e.g.: <VersionProductName Condition="'$(VersionProductName)'==''">Your Product Name</VersionProductName>
|
||||
|
@ -20,15 +20,12 @@ using System.Security;
|
|||
[assembly: AssemblyCopyright("Copyright (c) Microsoft Corporation. All rights reserved.")]
|
||||
[assembly: AssemblyTrademark("Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries.")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
/*
|
||||
#if (DEBUG || _DEBUG)
|
||||
[assembly: AssemblyConfiguration("Debug")]
|
||||
#endif
|
||||
|
||||
#if ASSEMBLY_ATTRIBUTE_PRODUCT_VS
|
||||
[assembly: AssemblyProduct("Microsoft (R) Visual Studio (R) 2010")]
|
||||
#else
|
||||
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
|
||||
#endif
|
||||
*/
|
||||
|
||||
// disable CLSCompliant as the common extensions library decided not to support this
|
||||
// see https://github.com/aspnet/AspNetCore/issues/2689#issuecomment-354693946
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
//---------------------------------------------------------------------
|
||||
// <copyright file="AssemblyMetadataAttribute.cs" company="Microsoft">
|
||||
// Copyright (C) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
|
||||
// </copyright>
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
namespace System.Reflection
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
|
||||
internal sealed class AssemblyMetadataAttribute : Attribute
|
||||
{
|
||||
public AssemblyMetadataAttribute(string key, string value)
|
||||
{
|
||||
Key = key;
|
||||
Value = value;
|
||||
}
|
||||
|
||||
public string Key { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
}
|
|
@ -1,13 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!--
|
||||
|
||||
This file defines the external properties used by this src.
|
||||
|
||||
-->
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
<EnlistmentRoot>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))\</EnlistmentRoot>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="..\Build.props" />
|
||||
<!-- <Import Project="$(EnlistToolPath)\versioning.props" />
|
||||
-->
|
||||
<Import Project="$(EnlistToolPath)\versioning.props" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<AssemblyName>Microsoft.OpenApi.OData.Reader</AssemblyName>
|
||||
<RootNamespace>Microsoft.OpenApi.OData</RootNamespace>
|
||||
<TargetFrameworks>net461; netstandard2.0</TargetFrameworks>
|
||||
<Company>Microsoft</Company>
|
||||
<Product>Microsoft.OpenApi.OData.Reader</Product>
|
||||
<!-- <Company>Microsoft</Company> -->
|
||||
<Product>Microsoft OData Extensions for Open API</Product>
|
||||
<PackageId>Microsoft.OpenApi.OData.Reader</PackageId>
|
||||
<Version>1.0.0</Version>
|
||||
<Authors>Microsoft.OpenApi.OData.Reader</Authors>
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!--
|
||||
|
||||
This file defines the common targets before the build.
|
||||
This file might be updated by automation.
|
||||
|
||||
-->
|
||||
<Project>
|
||||
<!-- Ensures that if this file changes it forces a rebuild -->
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
|
@ -90,10 +95,8 @@ using System.Resources;
|
|||
</GenerateAssemblyAttributeTemplateCSharp>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Language)' == 'C#'">
|
||||
<PropertyGroup>
|
||||
<GenerateAssemblyAttributeTemplate>$(GenerateAssemblyAttributeTemplateCSharp)</GenerateAssemblyAttributeTemplate>
|
||||
<AssemblyMetadataAttributeFile>$(VersionOutputPath)\AssemblyMetadataAttribute$(DefaultLanguageSourceExtension)</AssemblyMetadataAttributeFile>
|
||||
<DefineAssemblyMetadataAttribute Condition="'$(TargetFrameworkVersion)' == 'v3.5' or '$(TargetFrameworkVersion)' == 'v4.0'">true</DefineAssemblyMetadataAttribute>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -115,7 +118,6 @@ using System.Resources;
|
|||
|
||||
<ItemGroup>
|
||||
<Compile Include="$(AssemblyAttributeOutputFile)" />
|
||||
<Compile Include="$(AssemblyMetadataAttributeFile)" Condition="'$(DefineAssemblyMetadataAttribute)' == 'true'" />
|
||||
</ItemGroup>
|
||||
|
||||
</Target>
|
||||
|
@ -126,7 +128,7 @@ using System.Resources;
|
|||
<!-- *** Generate a file with version constants and hook it into the build -->
|
||||
<!-- ********************************************************************************************* -->
|
||||
<Target Name="GenerateVersionConstantsFile"
|
||||
Inputs="$(MSBuildProjectFile);$(CustomBuildExtensionsPath)\Versioning.props"
|
||||
Inputs="$(MSBuildProjectFile);$(EnlistToolPath)\Versioning.props"
|
||||
Outputs="$(IntermediateOutputPath.TrimEnd('\'))\VersionConstants$(DefaultLanguageSourceExtension)"
|
||||
Condition="'$(ShouldGenerateVersionConstantsFile)' == 'true'">
|
||||
|
||||
|
@ -140,22 +142,12 @@ internal static class VersionConstants
|
|||
internal const string AssemblyVersion = "%VersionFullSemantic%";
|
||||
}
|
||||
</GenerateVersionConstantsTemplateCSharp>
|
||||
<GenerateVersionConstantsTemplateVB>
|
||||
Friend Class VersionConstants
|
||||
Friend Shared ReleaseVersion As String = "%VersionFullSemantic%"
|
||||
Friend Shared AssemblyVersion As String = "%VersionFullSemantic%"
|
||||
End Class
|
||||
</GenerateVersionConstantsTemplateVB>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Language)' == 'C#'">
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<GenerateVersionConstantsTemplate>$(GenerateVersionConstantsTemplateCSharp)</GenerateVersionConstantsTemplate>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Language)' == 'VB'">
|
||||
<GenerateVersionConstantsTemplate>$(GenerateVersionConstantsTemplateVB)</GenerateVersionConstantsTemplate>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<VersionConstantsOutputFile>$(IntermediateOutputPath.TrimEnd("\\"))\VersionConstants$(DefaultLanguageSourceExtension)</VersionConstantsOutputFile>
|
||||
<VersionConstantsFileContentsTransformed>$([System.String]::Copy('$(GenerateVersionConstantsTemplate)').Replace("%25VersionFull%25",$(VersionFull)).Replace("%25VersionFullSemantic%25",$(VersionFullSemantic)))</VersionConstantsFileContentsTransformed>
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!--
|
||||
|
||||
This file defines the common targets before the build.
|
||||
This file might be updated by automation.
|
||||
|
||||
-->
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<VersionRunBeforeTargets>$(VersionRunBeforeTargets);CoreCompile</VersionRunBeforeTargets>
|
||||
<VersionOutputPath>$(EnlistmentRoot)\src\AssemblyInfo</VersionOutputPath>
|
||||
<AssemblyInfoCommonFile Condition="'$(AssemblyInfoCommonFile)'==''">AssemblyInfoCommon$(DefaultLanguageSourceExtension)</AssemblyInfoCommonFile>
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!--
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
</PropertyGroup>
|
||||
This file defines the tool external dependencies used by this repo.
|
||||
This file might be updated by automation.
|
||||
|
||||
-->
|
||||
<Project>
|
||||
|
||||
<PropertyGroup Label="Define Basic Properties">
|
||||
<EnlistmentRoot Condition=" '$(EnlistmentRoot)'=='' ">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))</EnlistmentRoot>
|
||||
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
||||
<EnlistmentRoot Condition=" '$(EnlistmentRoot)'=='' ">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), build.root))</EnlistmentRoot>
|
||||
<EnlistmentRoot>$(EnlistmentRoot.TrimEnd({'\\'}))</EnlistmentRoot>
|
||||
<EnlistToolPath Condition=" '$(EnlistToolPath)'=='' ">$(EnlistmentRoot)\tool</EnlistToolPath>
|
||||
<EnlistToolPath Condition=" '$(EnlistToolPath)'=='' ">$(EnlistmentRoot)\tool</EnlistToolPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
Loading…
Reference in a new issue