Skip to content

Commit

Permalink
Don't call Add-EFProvider or Add-EFDefaultConnectionFactory
Browse files Browse the repository at this point in the history
Part of #231
  • Loading branch information
bricelam committed Jun 27, 2019
1 parent 26aaec6 commit c08a003
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<file src="../../artifacts/bin/EntityFramework.SqlServerCompact/$Configuration$/net45/EntityFramework.SqlServerCompact.dll" target="lib/net45/" />
<file src="../../artifacts/bin/EntityFramework.SqlServerCompact/$Configuration$/net45/EntityFramework.SqlServerCompact.xml" target="lib/net45/" />
<file src="content\**\*" target="content/" />
<file src="tools\**\*" target="tools/" />
</files>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<entityFramework>
<defaultConnectionFactory xdt:Transform="Remove" />
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework" xdt:Transform="Insert">
<parameters>
<parameter value="System.Data.SqlServerCe.4.0" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.4.0" />
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</DbProviderFactories>
</system.data>
</system.data>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
</providers>
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework" xdt:Transform="Remove" xdt:Locator="Match(type)" />
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<entityFramework>
<defaultConnectionFactory xdt:Transform="Remove" />
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework" xdt:Transform="Insert">
<parameters>
<parameter value="System.Data.SqlServerCe.4.0" />
</parameters>
</defaultConnectionFactory>
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.4.0" />
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</DbProviderFactories>
</system.data>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
</providers>
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework" xdt:Transform="Remove" xdt:Locator="Match(type)" />
</entityFramework>
</configuration>
4 changes: 0 additions & 4 deletions src/EntityFramework.SqlServerCompact/tools/install.ps1

This file was deleted.

11 changes: 8 additions & 3 deletions src/NuGet/EntityFramework/content/net40/App.config.transform
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers>
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
<configSections>
<section name="entityFramework" xdt:Transform="Remove" xdt:Locator="Match(name)" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" xdt:Transform="Remove" xdt:Locator="Match(type)" />
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework" xdt:Transform="Remove" xdt:Locator="Match(type)" />
</entityFramework>
</configuration>
11 changes: 8 additions & 3 deletions src/NuGet/EntityFramework/content/net40/Web.config.transform
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
</configSections>
<entityFramework>
<providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" xdt:Transform="Replace" xdt:Locator="Match(invariantName)" />
</providers>
</entityFramework>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
<configSections>
<section name="entityFramework" xdt:Transform="Remove" xdt:Locator="Match(name)" />
</configSections>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" xdt:Transform="Remove" xdt:Locator="Match(type)" />
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework" xdt:Transform="Remove" xdt:Locator="Match(type)" />
</entityFramework>
</configuration>
2 changes: 0 additions & 2 deletions src/NuGet/EntityFramework/tools/install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,5 @@ $project.Object.References |
?{ $_.Identity -eq 'System.Data.Entity' } |
%{ $_.Remove() }

Add-EFProvider $project 'System.Data.SqlClient' 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer'

Write-Host
Write-Host "Type 'get-help EntityFramework' to see all available Entity Framework commands."

0 comments on commit c08a003

Please sign in to comment.