Skip to content

Commit

Permalink
Enable building on macOS and Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
bricelam committed Jul 31, 2019
1 parent 0b7e7ce commit c8082cc
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 42 deletions.
16 changes: 0 additions & 16 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,3 @@ jobs:
artifactName: packages
artifactType: Container
parallel: true

# UNDONE: Blocked by NuGet/Home#7341
#- job: macOS
# pool:
# vmImage: macOS-10.13
# steps:
# - script: eng/common/cibuild.sh --configuration $(_BuildConfig) --prepareMachine
# name: Build

# UNDONE: Blocked by dsplaisted/ReferenceAssemblyPackages#2
#- job: Linux
# pool:
# vmImage: ubuntu-16.04
# steps:
# - script: eng/common/cibuild.sh --configuration $(_BuildConfig) --prepareMachine
# name: Build
Empty file modified eng/common/dotnet-install.sh
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,28 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<Compile Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\content\SqlServerTypes\Loader.cs">
<Compile Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\content\SqlServerTypes\Loader.cs">
<Link>SqlServerTypes\Loader.cs</Link>
</Compile>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\content\readme.htm">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\content\readme.htm">
<Link>SqlServerTypes\readme.htm</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\msvcr120.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\msvcr120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x64\msvcr120.dll</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\SqlServerSpatial140.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\SqlServerSpatial140.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x64\SqlServerSpatial140.dll</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\msvcr120.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\msvcr120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x86\msvcr120.dll</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\SqlServerSpatial140.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\SqlServerSpatial140.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x86\SqlServerSpatial140.dll</Link>
</Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,10 @@ public static void CopyEmbeddedResourcesToCurrentDir(
{
Debug.Assert(sourceStream != null, "Could not create stream for embedded resource " + prefix + name);

var destinationPath = Path.Combine(@".\", name);
if (!File.Exists(destinationPath) || overwrite)
if (!File.Exists(name) || overwrite)
{
using (
var destinationStream = new FileStream(destinationPath, FileMode.Create, FileAccess.Write))
var destinationStream = new FileStream(name, FileMode.Create, FileAccess.Write))
{
var sourceBuffer = new byte[sourceStream.Length];
sourceStream.Read(sourceBuffer, 0, sourceBuffer.Length);
Expand Down
10 changes: 5 additions & 5 deletions test/EntityFramework/FunctionalTests/FunctionalTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\content\readme.htm">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\content\readme.htm">
<Link>SqlServerTypes\readme.htm</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\msvcr120.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\msvcr120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x64\msvcr120.dll</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\SqlServerSpatial140.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\SqlServerSpatial140.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x64\SqlServerSpatial140.dll</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\msvcr120.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\msvcr120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x86\msvcr120.dll</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\SqlServerSpatial140.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\SqlServerSpatial140.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x86\SqlServerSpatial140.dll</Link>
</Content>
Expand Down
6 changes: 4 additions & 2 deletions test/EntityFramework/VBTests/TranslatorTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ Public Class TranslatorTests
" [Extent1].[Id] AS [Id]" & vbCrLf &
" FROM [dbo].[Entities] AS [Extent1]" & vbCrLf &
" WHERE (POWER( CAST( [Extent1].[Id] AS float), cast(2 as float(53)))) < cast(30 as float(53))",
query.ToString())
query.ToString(),
ignoreLineEndingDifferences:=True)
End Using
End Sub

Expand All @@ -44,7 +45,8 @@ Public Class TranslatorTests
" [Extent1].[Id] AS [Id]" & vbCrLf &
" FROM [dbo].[Entities] AS [Extent1]" & vbCrLf &
" WHERE (POWER( CAST( [Extent1].[Id] AS float), cast(2 as float(53)))) < cast(30 as float(53))",
query.ToString())
query.ToString(),
ignoreLineEndingDifferences:=True)
End Using
End Sub

Expand Down
20 changes: 10 additions & 10 deletions test/EntityFramework/VBTests/VBTests.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,33 @@
<AssemblyName>EntityFramework.VBTests</AssemblyName>
<TargetFrameworks>net452;netcoreapp3.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<Reference Include="System.Transactions" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net452'">
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\content\readme.htm">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\content\readme.htm">
<Link>SqlServerTypes\readme.htm</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\msvcr120.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\msvcr120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x64\msvcr120.dll</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\SqlServerSpatial140.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x64\SqlServerSpatial140.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x64\SqlServerSpatial140.dll</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\msvcr120.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\msvcr120.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x86\msvcr120.dll</Link>
</Content>
<Content Include="$(NuGetPackageRoot)Microsoft.SqlServer.Types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\SqlServerSpatial140.dll">
<Content Include="$(NuGetPackageRoot)microsoft.sqlserver.types\$(MicrosoftSqlServerTypesVersion)\nativeBinaries\x86\SqlServerSpatial140.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Link>SqlServerTypes\x86\SqlServerSpatial140.dll</Link>
</Content>
</ItemGroup>

<ItemGroup>
<Compile Update="VbAdvancedPatterns\AddressMf.vb">
<DependentUpon>VbAdvancedPatterns.tt</DependentUpon>
Expand Down Expand Up @@ -195,7 +195,7 @@
<AutoGen>True</AutoGen>
</Compile>
</ItemGroup>

<ItemGroup>
<None Update="VbAdvancedPatterns\VbAdvancedPatterns.Context.tt">
<Generator>TextTemplatingFileGenerator</Generator>
Expand All @@ -216,12 +216,12 @@
<LastGenOutput>VbMonsterModel.vb</LastGenOutput>
</None>
</ItemGroup>

<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\FunctionalTests\FunctionalTests.csproj" />
</ItemGroup>
Expand Down

0 comments on commit c8082cc

Please sign in to comment.