Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Add some default binding redirects to use on UWP #12

Merged
merged 1 commit into from
Oct 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,8 @@ function GetCsprojArguments($startupProject, $outputFileName) {
$dataDirectory = Join-Path $startupProjectDir 'App_Data'
} elseif ($appConfig) {
$configurationFile = GetProperty $appConfig.Properties FullPath
} elseif (IsUwpProject $startupProject) {
$configurationFile = Join-Path $PSScriptRoot 'uap10.0/ef.exe.config'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, these can be overridden by adding your own App.config to the startup project

}

$arch = GetProperty $startupProject.ConfigurationManager.ActiveConfiguration.Properties PlatformTarget
Expand Down Expand Up @@ -870,7 +872,9 @@ function InvokeOperation($commonParams, [switch] $json, [switch] $skipBuild) {
if ($exeCopied) {
Write-Debug "Cleaning up '$exe' and '$configFile'"
Remove-Item $exe -ErrorAction SilentlyContinue | Out-Null
Remove-Item $configFile -ErrorAction SilentlyContinue | Out-Null
if ($configFile) {
Remove-Item $configFile -ErrorAction SilentlyContinue | Out-Null
}
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Collections.NonGeneric" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="4.0.1.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Data.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="4.1.0.0" newVersion="4.1.1.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="4.0.1.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.FileSystem.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="4.0.0.0" newVersion="4.0.2.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Threading.Overlapped" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="4.0.0.0" newVersion="4.0.2.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Copy link

@divega divega Oct 17, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am guessing this isn't enough to fix the other issues mentioned in dotnet/efcore#5171:

design-time migrations don't fail with a load error, but still fail due to getting the wrong versions of BCL libraries such as DataAnnotations. See dotnet/efcore#5945.
design-time tools are bound to 1.0.0 assembly versions but need to execute against other versions such as 1.0.1. On UWP, NuGet won't add the necessary binding redirects. See dotnet/efcore#6551.

Those seem to be show stoppers.

Copy link
Contributor Author

@bricelam bricelam Oct 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will enable 1.1 to work by default. 1.0 will still need to add overrides, but we may be able to do more there. We can't solve all the unification issues without a new architecture--too much of unification is done by NuGet at restore time now.