Sto usando VS 2015.Il progetto non fa riferimento al framework ".NETFramework, Version = v4.5".
Your project is not referencing the ".NETFramework,Version=4.5" framework. Add a reference to ".NETFramework,Version=4.5" in the "frameworks" section of your project.json, and then re-run NuGet restore.
sto ottenendo questo errore sul mio livelli di accesso ai dati e Business Logic, poco dopo aver aggiunto alla mia layer MVC. Le cose stavano andando bene fino ad allora, ma non so cosa abbia causato questo errore. Qui è la mia project.json:
{
"version": "1.0.0-*",
"description": "foo bar Class Library",
"authors": [ "foo bar" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"frameworks": {
"net451": { },
"dotnet5.4": {
"dependencies": {
"Microsoft.CSharp": "4.0.1-beta-23516",
"System.Collections": "4.0.11-beta-23516",
"System.Linq": "4.0.1-beta-23516",
"System.Runtime": "4.0.21-beta-23516",
"System.Threading": "4.0.11-beta-23516"
}
}
}
}
Ecco che cosa ho provato:
- Sostituzione "dotnet5.4" con "net451" (e l'eliminazione di esso) come si trova in this answer.
Il risultato è lo stesso errore.
- Sostituire "dotnet5.4" con "net45" e uscire da "net451". Ciò si traduce in un nuovo errore:
Your project.json doesn't have a runtimes section. You should add '"runtimes": { "win":{} }' to your project.json and then re-run NuGet restore.
Ho provato a fare questo errore come suggerito e aggiungendo
"runtimes": {
"win": {}
},
Questo mi ha fatto questo errore, che io non riesco a spostare passato:
Your project.json doesn't list 'win' as a targeted runtime. You should add '"win": {}' inside your "runtimes" section in your project.json, and then re-run NuGet restore.
Ho già aggiunto "vittoria", e questo sta cominciando a sembrare un'aringa rossa. Cosa sto facendo alterando direttamente il progetto.json, NuGet non sta gestendo questo?
Per la prima parte andare alle impostazioni di progetto e impostare framework di destinazione a 4,5 –
Viene impostato in quel modo già. –
@ S.LovelandECY Hai risolto questo problema? Ho lo stesso problema se utilizzo 4.5.1, 4.5.2 o 4.6 - Tutti i miei progetti utilizzano sicuramente la stessa versione di framework. – Thierry