2016-05-16 15 views
3

私は、Linux上で実行する簡単なプロジェクトを手に入れようとすると大きな問題を抱えています。 Windows上で簡単なMVCアプリケーションを作成しましたが、Linuxに移行することはできませんでした。最初はプラットフォームベースだと思ったが、今はそうは思わない。Entity Framework 7はLinux Dot Net Core CLRで動作しますか?

私は実行するためにdnvmとDNXを得ることができますが、DOTNETだけで実行して終了します https://docs.asp.net/en/latest/getting-started/installing-on-linux.html#installing-on-centos-7

で指示に従って、CentOSの使用を開始。 DNXは一種の働いていたが、それは失速なり、Webアプリケーションにアクセスしようとすると、コマンド

sudo sh -c 'echo "deb [arch=amd64] http://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list' 
sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 
sudo apt-get update 
sudo apt-get install dotnet 
を殺す-9

次に、私はUbuntuの14.04にインストールして強制的に実行されるまで、出口に何をログに記録していない、とありません

は、それから私は、この

Errors in /home/joel/Projects/MVCPrototype/project.json 
    Package Ix-Async 1.2.5 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Ix-Async 1.2.5 supports: 
     - net40 (.NETFramework,Version=v4.0) 
     - net45 (.NETFramework,Version=v4.5) 
     - portable-net45+win8+wp8 (.NETPortable,Version=v0.0,Profile=Profile78) 
    Package Remotion.Linq 2.0.2 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Remotion.Linq 2.0.2 supports: 
     - net35 (.NETFramework,Version=v3.5) 
     - net40 (.NETFramework,Version=v4.0) 
     - net45 (.NETFramework,Version=v4.5) 
     - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259) 
    Package Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 supports: 
     - net45 (.NETFramework,Version=v4.5) 
     - portable-net45+win8 (.NETPortable,Version=v0.0,Profile=Profile7) 
    Package Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 supports: 
     - net45 (.NETFramework,Version=v4.5) 
     - portable-net45+win8 (.NETPortable,Version=v0.0,Profile=Profile7) 
    One or more packages are incompatible with DNXCore,Version=v5.0. 

NuGet Config files used: 
    /home/joel/Projects/MVCPrototype/nuget.config 
    /home/joel/.nuget/NuGet/NuGet.Config 

Feeds used: 
    https://dotnet.myget.org/F/dotnet-core/api/v3/index.json 
    https://www.myget.org/F/aspnetcirelease/api/v3/index.json 
    https://api.nuget.org/v3/index.json 

は、だから私は、最新のSDKをAPTバージョンをアンインストールしてもらうために、これらのコマンドを実行してみましたDOTNET復元しました

sudo apt-get remove dotnet 
wget https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-host-ubuntu-x64.latest.deb 
wget https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-sharedframework-ubuntu-x64.latest.deb 
wget https://dotnetcli.blob.core.windows.net/dotnet/beta/Installers/Latest/dotnet-sdk-ubuntu-x64.latest.deb 
sudo dpkg -i dotnet-host-ubuntu-x64.latest.deb 
sudo dpkg -i dotnet-sharedframework-ubuntu-x64.latest.deb 
sudo dpkg -i dotnet-sdk-ubuntu-x64.latest.deb 

同じコマンドを実行し、同じエラーが発生しました。私はプロジェクトを細工それでは

Errors in /home/joel/Projects/EFTest/project.json 
    Package Ix-Async 1.2.5 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Ix-Async 1.2.5 supports: 
     - net40 (.NETFramework,Version=v4.0) 
     - net45 (.NETFramework,Version=v4.5) 
     - portable-net45+win8+wp8 (.NETPortable,Version=v0.0,Profile=Profile78) 
    Package Remotion.Linq 2.0.1 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Remotion.Linq 2.0.1 supports: 
     - net35 (.NETFramework,Version=v3.5) 
     - net40 (.NETFramework,Version=v4.0) 
     - net45 (.NETFramework,Version=v4.5) 
     - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259) 
    Package System.Collections.Immutable 1.1.36 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package System.Collections.Immutable 1.1.36 supports: portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259) 
    One or more packages are incompatible with DNXCore,Version=v5.0. 

NuGet Config files used: 
    /home/joel/.nuget/NuGet/NuGet.Config 

Feeds used: 
    https://dotnet.myget.org/F/dotnet-core/api/v3/index.json 
    https://www.myget.org/F/aspnetcirelease/api/v3/index.json 
    https://api.nuget.org/v3/index.json 

dotnet restoreと同じエラーを走った

{ 
    "dependencies": { 
     "EntityFramework.Sqlite": "7.0.0-rc1-final", 
     "EntityFramework.Commands": "7.0.0-rc1-final", 
     "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final" 
    }, 
    "commands": { 
     "run": "ConsoleApp", 
     "ef": "EntityFramework.Commands" 
    }, 
    "frameworks": { 
     "dnxcore50": { 
      "dependencies": { 
       "System.Console": "4.0.0-beta-*" 
      } 
     } 
    } 
} 

だから、私は http://ef.readthedocs.io/en/latest/platforms/coreclr/getting-started-linux.html#create-a-new-project

project.jsonでの手順に従っ最新のバージョン:

{ 
    "dependencies": { 
     "Microsoft.EntityFrameworkCore.Sqlite": "1.0.0-*", 
     "Microsoft.EntityFrameworkCore.Commands": "1.0.0-*", 
     "Microsoft.Extensions.PlatformAbstractions": "1.0.0-*" 
    }, 
    "commands": { 
     "run": "ConsoleApp", 
     "ef": "Microsoft.EntityFrameworkCore.Commands" 
    }, 
    "frameworks": { 
     "dnxcore50": { 
      "dependencies": { 
       "System.Console": "4.0.0-beta-*" 
      } 
     } 
    } 
} 

と、Aの復元は私にこれを与えた:

Errors in /home/joel/Projects/EFTest/project.json 
    Package Ix-Async 1.2.5 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Ix-Async 1.2.5 supports: 
     - net40 (.NETFramework,Version=v4.0) 
     - net45 (.NETFramework,Version=v4.5) 
     - portable-net45+win8+wp8 (.NETPortable,Version=v0.0,Profile=Profile78) 
    Package Remotion.Linq 2.0.2 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Remotion.Linq 2.0.2 supports: 
     - net35 (.NETFramework,Version=v3.5) 
     - net40 (.NETFramework,Version=v4.0) 
     - net45 (.NETFramework,Version=v4.5) 
     - portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259) 
    One or more packages are incompatible with DNXCore,Version=v5.0. 

助けてください、私は実際にLinux上で行くのコンセプトの証明を取得したいが、これは考えにくいです。

おかげ

+0

をproject.jsonからdnxCoreを削除する - と、おそらくここreleatedガイダンスにRC2を待ちます。http://ef.readthedocsを。 io/en/latest/ – ErikEJ

+0

ありがとう、私はdnxcoreを何に置き換えるべきか分かりません。 – user171258

答えて

2

は、私は、.NETコアベータ-7/SQLiteの持つコンセプトプロジェクトの証明をした、そしてそれは、Linux上で働いていました。私はRC2に移行中です。

これは既知の問題であり、ここでの回避策を見つけてください:

https://github.com/aspnet/Home/releases/tag/1.0.0-rc2-final#issue132

関連する問題