Enable cross platform compilation of the solution. (#31)
Without a targeting pack running dotnet build on a mac/ubuntu will fail with a "Reference assemblies were not found".Adding these targeting pack will allow happy roundtripping between windows and mac or ubuntu. See https://github.com/dotnet/sdk/issues/335 for more details
This commit is contained in:
Родитель
ce8ba711b5
Коммит
b4ba1fc9e9
|
@ -4,5 +4,6 @@
|
|||
<add key="SteeltoeDev" value="https://www.myget.org/F/steeltoedev/api/v3/index.json" />
|
||||
<add key="OpenCensusDev" value="https://www.myget.org/F/opencensus/api/v3/index.json" />
|
||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
|
||||
<add key="DotnetCore" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
|
||||
</packageSources>
|
||||
</configuration>
|
||||
|
|
|
@ -19,6 +19,7 @@ using Steeltoe.Management.Endpoint.Info;
|
|||
using Steeltoe.Management.Endpoint.Info.Contributor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Http;
|
||||
|
||||
namespace Steeltoe.Management.EndpointOwin.Info
|
||||
|
@ -79,9 +80,10 @@ namespace Steeltoe.Management.EndpointOwin.Info
|
|||
|
||||
private static IList<IInfoContributor> GetDefaultInfoContributors(IConfiguration config, ILoggerFactory loggerFactory = null)
|
||||
{
|
||||
var gitInfoPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "git.properties");
|
||||
return new List<IInfoContributor>
|
||||
{
|
||||
new GitInfoContributor(AppDomain.CurrentDomain.BaseDirectory + "\\git.properties", loggerFactory?.CreateLogger<GitInfoContributor>()),
|
||||
new GitInfoContributor(gitInfoPath, loggerFactory?.CreateLogger<GitInfoContributor>()),
|
||||
new AppSettingsInfoContributor(config)
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,6 +14,9 @@
|
|||
<PackageProjectUrl>https://steeltoe.io</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNet.WebApi.Owin" Version="$(AspNetVersion)" />
|
||||
<PackageReference Include="Microsoft.Owin" Version="$(OwinVersion)" />
|
||||
|
|
|
@ -14,6 +14,8 @@
|
|||
<PackageProjectUrl>https://steeltoe.io</PackageProjectUrl>
|
||||
<PackageLicenseUrl>https://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Autofac" Version="$(AutofacVersion)" />
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="..\..\versions.props" />
|
||||
|
||||
|
||||
<PropertyGroup>
|
||||
<Description>Steeltoe Management Endpoints for ASP.NET 4.x</Description>
|
||||
<Authors>Pivotal;dtillman</Authors>
|
||||
|
@ -17,7 +17,7 @@
|
|||
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
|
||||
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
<PropertyGroup>
|
||||
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\Steeltoe.Management.EndpointWeb.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<Project>
|
||||
<PropertyGroup Condition="! $(OS.Contains('win')) AND '$(TargetFramework)'== 'net461'">
|
||||
<FrameworkPathOverride>$(NuGetPackageRoot)microsoft.targetingpack.netframework.v4.6.1/1.0.1/lib/net461/</FrameworkPathOverride>
|
||||
<RestoreAdditionalProjectSources>https://dotnet.myget.org/F/dotnet-core/api/v3/index.json</RestoreAdditionalProjectSources>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition="! $(OS.Contains('win')) AND '$(TargetFramework)'== 'net461'">
|
||||
<PackageReference Include="Microsoft.TargetingPack.NETFramework.v4.6.1" Version="1.0.1" ExcludeAssets="All" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -4,6 +4,8 @@
|
|||
<PropertyGroup>
|
||||
<TargetFrameworks>netcoreapp2.0;netcoreapp2.1;net461</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="xunit.runner.json">
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace Steeltoe.Management.Endpoint.Env.Test
|
|||
Assert.Equal(provider.GetType().Name, name);
|
||||
|
||||
builder = new ConfigurationBuilder();
|
||||
builder.AddJsonFile("c:\\foobar", true);
|
||||
builder.AddJsonFile("foobar", true);
|
||||
config = builder.Build();
|
||||
|
||||
ep = new EnvEndpoint(opts, config, new TestHosting());
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
<PackageProjectUrl>http://steeltoe.io</PackageProjectUrl>
|
||||
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="empty.git.properties">
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
<PackageProjectUrl>http://steeltoe.io</PackageProjectUrl>
|
||||
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="empty.git.properties">
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
<Description>Unit test project for Steeltoe.Management.EndpointOwin</Description>
|
||||
<TargetFrameworks>net461</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="empty.git.properties">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
|
|
|
@ -7,6 +7,14 @@
|
|||
<TargetFrameworks>net461</TargetFrameworks>
|
||||
<AssemblyName>Steeltoe.Management.EndpointAutofac.Test</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="! $(OS.Contains('win')) AND '$(TargetFramework)'== 'net461'">
|
||||
<FrameworkPathOverride>$(NuGetPackageRoot)microsoft.targetingpack.netframework.v4.6.1/1.0.1/lib/net461/</FrameworkPathOverride>
|
||||
<RestoreAdditionalProjectSources>https://dotnet.myget.org/F/dotnet-core/api/v3/index.json</RestoreAdditionalProjectSources>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition="! $(OS.Contains('win')) AND '$(TargetFramework)'== 'net461'">
|
||||
<PackageReference Include="Microsoft.TargetingPack.NETFramework.v4.6.1" Version="1.0.1" ExcludeAssets="All" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Steeltoe.Management.EndpointOwinAutofac\Steeltoe.Management.EndpointOwinAutofac.csproj" />
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
<PackageProjectUrl>http://steeltoe.io</PackageProjectUrl>
|
||||
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Steeltoe.Management.ExporterBase\Steeltoe.Management.ExporterBase.csproj" />
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
<PackageProjectUrl>http://steeltoe.io</PackageProjectUrl>
|
||||
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Steeltoe.Management.ExporterCore\Steeltoe.Management.ExporterCore.csproj" />
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
|
||||
<RootNamespace>Steeltoe.Management.Census</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="xunit.runner.json">
|
||||
|
|
|
@ -12,8 +12,9 @@
|
|||
<PackageProjectUrl>http://steeltoe.io</PackageProjectUrl>
|
||||
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Steeltoe.Management.TracingBase\Steeltoe.Management.TracingBase.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -12,8 +12,9 @@
|
|||
<PackageProjectUrl>http://steeltoe.io</PackageProjectUrl>
|
||||
<PackageLicenseUrl>http://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<Import Project="..\..\targetframework.props" />
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\Steeltoe.Management.TracingCore\Steeltoe.Management.TracingCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
Загрузка…
Ссылка в новой задаче