2017-02-17 68 views
0

我在對.NET核心的Visual Studio 2015.3創建.NET類庫:https://www.nuget.org/packages/MD.PersianDateTime.Core/
依賴不支持框架.NETStandard,版本= V1.6,Visual Studio的2015.3

以上套餐的Project.json

{ 
    "authors": [ "Mohammad Dayyan" ], 
    "copyright": "By Mohammad Dayyan, 0903-3339923", 
    "dependencies": { 
    "NETStandard.Library": "1.6.1" 
    }, 
    "description": "C# library to use PersianCalendar as easy as DateTime", 
    "frameworks": { 
    "netstandard1.6": { 
     "imports": "dnxcore50" 
    } 
    }, 
    "licenseUrl": "http://www.gnu.org/licenses/gpl-3.0-standalone.html", 
    "name": "MD.PersianDateTime.Core", 
    "title": "PersianDateTime", 
    "version": "1.0.0-*", 
    "buildOptions": { 
    "xmlDoc": true 
    } 
} 

現在,我想用它在其他.NET核心類庫,具有以下package.json

{ 
    "dependencies": { 
    "NETStandard.Library": "1.6.1", 
    "Newtonsoft.Json": "9.0.1", 
    "MD.PersianDateTime.Core": "1.0.0.1" 
    }, 
    "frameworks": { 
    "netstandard1.6": { 
     "imports": "dnxcore50" 
    } 
    }, 
    "name": "Another .Net Core Class Library", 
    "version": "1.0.0-*" 
} 

但我得到以下錯誤在編譯:

Severity Code Description Project File Line Suppression State 
Error NU1002 The dependency MD.PersianDateTime.Core 1.0.0.1 does not support framework .NETStandard,Version=v1.6. SmartizCore C:\Works\SmartizCore\src\SmartizCore\project.json 7 

編輯:
我安裝從以下鏈接最新版本的.NET核心SDK和運行時:
https://github.com/dotnet/core/blob/master/release-notes/rc4-download.md 所以我對.NET核心版本爲以下:

.Net Core version in CMD
但在Visual Studio中,我得到以下版本

.Net Core version in VS

回答

1

更新您的dotnet核心版本到最新(最新版本)--->link

enter image description here

那麼你還需要在global.json

"version": "1.0.0-preview2-1-003177" 
+0

我安裝了最新版本的Windows SDK和運行的,但我得到'1.0.0-preview2-003156'再次!!! –

+0

我已經添加了最新更新的鏈接..點擊最新並獲得最新版本。 – Ahmar

+0

「Visual Studio 2017 RC」的這些安裝程序?我有VS2015.3寫在主帖 –

1

更新此版本號您應該更新.net核心版本 - >current version

請確保點擊「當前」b utton查看.NET Core 1.1下載鏈接。

+0

我下載並安裝了當前最新版本的Window SDK和運行時安裝程序,但我又獲得了'1.0.0-preview2-003156'!並再次出現錯誤。 –

+0

請參閱主文章的編輯部分 –

相關問題