2017-03-14 20 views
1

新しいプロジェクトで公開するためにコンパイルするときにこのエラーが発生しています。いくつかの古いパッケージ(主にペイパル)Microsoft.Composition 1.0.27と.NETCoreAppとの互換性がありません。バージョン= v1.0

のための主要な枠組みとしての.Net 4.52を使用し、私はフレームワークで「インポート」セクションを使用して他の記事の多くを超える読みましたが、これはのために私の場合には役立っていませんこの問題に至るまで。

エラーメッセージ:

パッケージMicrosoft.Composition 1.0.27 netcoreapp1.0(.NETCoreApp、バージョン= v1.0の)と互換性がありません。

パッケージ Microsoft.Composition 1.0.27サポート:ポータブル-net45 + win8 + WP8 + wpa81 (.NETPortable、バージョン= v0.0、プロファイル= Profile259)

Project.Json:

"dependencies": { 
    "BundlerMinifier.Core": "2.2.306", 
    "MailKit": "1.10.2", 
    "Microsoft.AspNetCore.Authentication.Cookies": "1.1.0", 
    "Microsoft.AspNetCore.Diagnostics": "1.1.0", 
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.1.0", 
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0", 
    "Microsoft.AspNetCore.Mvc": "1.1.1", 
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", 
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0", 
    "Microsoft.AspNetCore.Http.Features": "1.1.0", 
    "Microsoft.AspNetCore.StaticFiles": "1.1.0", 
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", 
    "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.0", 
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0", 
    "Microsoft.Extensions.Configuration.Json": "1.1.0", 
    "Microsoft.Extensions.Configuration.UserSecrets": "1.1.0", 
    "Microsoft.Extensions.Logging": "1.1.0", 
    "Microsoft.Extensions.Logging.Console": "1.1.0", 
    "Microsoft.Extensions.Logging.Debug": "1.1.0", 
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0", 
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0", 
    "PayPal": "1.8.0", 
    "Microsoft.AspNetCore.Http": "1.1.0", 
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "1.1.0-preview4-final", 
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": "1.1.0-preview4-final", 
    "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final", 
    "Microsoft.AspNetCore.Session": "1.0.0" 
    }, 
    "tools": { 
    "BundlerMinifier.Core": "2.2.281", 
    "Microsoft.EntityFrameworkCore.Tools": "1.0.0-preview2-final", 
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": "1.1.0-msbuild3-final", 
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final", 
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": "1.1.0-preview4-final" 
    }, 

    "frameworks": { 
     "net452": { 
     "imports": [ "dnxcore50", "portable-net45+win8" ] 
     } 
    }, 

    "buildOptions": { 
    "emitEntryPoint": true, 
    "preserveCompilationContext": true 
    }, 

    "publishOptions": { 
    "include": [ 
     "wwwroot", 
     "Views", 
     "Areas/**/Views", 
     "appsettings.json", 
     "web.config" 
    ] 
    }, 

    "scripts": { 
    "prepublish": [ "bower install", "dotnet bundle" ], 
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] 
    } 
+0

可能な重複[フレームワーク.NETCoreAppをサポートしていません依存Microsoft.Composition 1.0.27、バージョン= V1.1](のhttp:/ /stackoverflow.com/questions/40846326/the-dependency-microsoft-composition-1-0-27-does-not-support-framework-netcorea) –

答えて

0

編集project.JSON:

"dependencies": { 
    "BundlerMinifier.Core": { 
     "version": "2.2.281", 
     "type": "build", 
     "imports": [ "portable-net45+win8+wp8+wpa81" ] 
    }, 
    "MailKit": "1.10.2", 
    "Microsoft.AspNetCore.Authentication.Cookies": "1.1.0", 
    "Microsoft.AspNetCore.Diagnostics": "1.1.0", 
    "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.1.0", 
    "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0", 
    "Microsoft.AspNetCore.Mvc": "1.1.1", 
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", 
    "Microsoft.AspNetCore.Server.Kestrel": "1.1.0", 
    "Microsoft.AspNetCore.Http.Features": "1.1.0", 
    "Microsoft.AspNetCore.StaticFiles": "1.1.0", 
    "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", 
    "Microsoft.EntityFrameworkCore.SqlServer.Design": "1.1.0", 
    "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0", 
    "Microsoft.Extensions.Configuration.Json": "1.1.0", 
    "Microsoft.Extensions.Configuration.UserSecrets": "1.1.0", 
    "Microsoft.Extensions.Logging": "1.1.0", 
    "Microsoft.Extensions.Logging.Console": "1.1.0", 
    "Microsoft.Extensions.Logging.Debug": "1.1.0", 
    "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0", 
    "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0", 
    "Microsoft.AspNetCore.Http": "1.1.0", 
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { 
     "version": "1.1.0-msbuild3-final", 
     "type": "build", 
     "imports": [ "portable-net45+win8+wp8+wpa81" ] 
    }, 

    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": { 
     "version": "1.1.0-preview4-final", 
     "type": "build", 
     "imports": [ "portable-net45+win8+wp8+wpa81" ] 
    }, 
    "Microsoft.EntityFrameworkCore.Tools": { 
     "version": "1.0.0-preview2-final", 
     "type": "build", 
     "imports": [ "portable-net45+win8+wp8+wpa81" ] 
    }, 
    "Microsoft.AspNetCore.Session": "1.0.0", 
    "PayPal": "1.8.0" 
    }, 

    "tools": { 
    "BundlerMinifier.Core": { 
     "version": "2.2.281", 
     "type": "build", 
     "imports": [ "portable-net45+win8+wp8+wpa81" ] 
    }, 
    "Microsoft.EntityFrameworkCore.Tools": { 
     "version": "1.0.0-preview2-final", 
     "type": "build", 
     "imports": [ "portable-net45+win8+wp8+wpa81" ] 
    }, 
    "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { 
     "version": "1.1.0-msbuild3-final", 
     "type": "build", 
     "imports": [ "portable-net45+win8+wp8+wpa81" ] 
    }, 
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": { 
     "version": "1.1.0-preview4-final", 
     "type": "build", 
     "imports": [ "portable-net45+win8+wp8+wpa81" ] 
    }, 
    "Microsoft.VisualStudio.Web.CodeGeneration.Tools": { 
     "version": "1.1.0-preview4-final", 
     "type": "build", 
     "imports": [ "portable-net45+win8+wp8+wpa81" ] 
    } 
    }, 

    "frameworks": { 
    "net452": { 
     "imports": [ "dnxcore50", "portable-net45+win8+wp8+wpa81" ] 
    } 
    }, 

    "buildOptions": { 
    "emitEntryPoint": true, 
    "preserveCompilationContext": true 
    }, 

    "publishOptions": { 
    "include": [ 
     "wwwroot", 
     "Views", 
     "Areas/**/Views", 
     "appsettings.json", 
     "web.config" 
    ] 
    }, 

    "scripts": { 
    "prepublish": [ "bower install", "dotnet bundle" ], 
    "postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ] 
    } 
-1

メッセージには、問題が正確に記載されています。あなたのプロジェクトは.Net Core 1.0を対象としており、パッケージはそれと互換性がありません。

これは、すべての.Netプラットフォームとバージョンが互換性がないためです。たとえば、.Net Core 1.0は.Net Standard 1.6としか互換性がありません。このpageは、さまざまな.Netプラットフォーム間の互換性を持つテーブルを示しています。

この特定のケースでは、.Net Core 1.0を対象としており、パッケージは4.5を対象としています。これらは表に見られるように互換性がありません。以下の固定私の問題で

関連する問題