0

我知道 Signalr 在 2.0 版上已转向 .net 4.5。我已通过 web.config 将我的 asp.net webmatrix 升级到 .net 4.5。但无法安装 Signalr 2.0。欧文抛出异常。这是我的 web.config,接下来是错误。我错过了什么?.net 4.5 已安装。谢谢

  <system.web>   
    <compilation debug="true" targetFramework="4.5"><assemblies><add assembly="System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /></assemblies></compilation>
    <httpRuntime targetFramework="4.5" maxRequestLength="1048576" />
      <authentication mode="Forms">
      <forms timeout="1440" />
    </authentication>
     <sessionState timeout="1440"></sessionState>
  </system.web>

An error occurred.

Could not install package 'Microsoft.Owin.Security 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0.0.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

System.InvalidOperationException: Could not install package 'Microsoft.Owin.Security 2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.0.0.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
   at NuGet.ProjectManager.ExtractPackageFilesToProject(IPackage package)
   at NuGet.ProjectManager.AddPackageReferenceToProject(IPackage package)
   at NuGet.ProjectManager.Execute(PackageOperation operation)
   at NuGet.ProjectManager.Execute(IPackage package, IPackageOperationResolver resolver)
   at NuGet.ProjectManager.AddPackageReference(IPackage package, Boolean ignoreDependencies, Boolean allowPrereleaseVersions)
   at NuGet.ProjectManager.AddPackageReference(String packageId, SemanticVersion version, Boolean ignoreDependencies, Boolean allowPrereleaseVersions)
   at Microsoft.WebMatrix.PackageManagement.WebProjectManager.<>c__DisplayClass1.<InstallPackage>b__0()
   at Microsoft.WebMatrix.PackageManagement.WebProjectManager.PerformLoggedAction(Action action)
   at Microsoft.WebMatrix.PackageManagement.WebProjectManager.InstallPackage(IPackage package, Boolean ignoreDependencies, AppDomain appDomain)
   at Microsoft.WebMatrix.NuGet.NuGetPackageManager.InstallPackage(IPackage package)
   at Microsoft.WebMatrix.NuGet.NuGetModel.InstallPackage(IPackage package, Boolean inDetails)
   at Microsoft.WebMatrix.NuGet.PackageViewModel.Install()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
4

0 回答 0