帮助。我无法从VS 2015编译我的项目,显然在使用NuGET安装/卸载项目包时出现了问题。
每次我想构建时,都会出现以下错误:
加载JObject时意外的内容结束。路径依赖', 第60行,位置0. AutorizarCreditoApp C:\ Program Files (86)\的MSBuild \微软\ VisualStudio的\ v14.0 \ DOTNET的\ Microsoft.DotNet.Common.Targets 262
并且
加载JObject时意外的内容结束。路径依赖', 第60行,位置0. AutorizarCreditoApp C:\ Program Files (x86)\ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Common.Targets 262
NuGET软件包无法恢复任何内容,因此我被卡住了,项目搞砸了。我只是按照当前的行观察文件,但它对我来说没有任何意义,例如Microsoft.Dot.Net.Common.Targets在此开头抱怨:
<Dnx
RuntimeExe="$(SDKToolingExe)"
Condition="'$(_DesignTimeHostBuild)' != 'true'"
ProjectFolder="$(MSBuildProjectDirectory)"
Arguments="$(_BuildArguments)"
/>
并且,project.json:
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0",
"type": "platform"
},
"Microsoft.AspNetCore.Mvc": "1.0.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
"Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
"Microsoft.Extensions.Configuration.Json": "1.0.0",
"Microsoft.Extensions.Logging": "1.0.0",
"Microsoft.Extensions.Logging.Console": "1.0.0",
"Microsoft.Extensions.Logging.Debug": "1.0.0",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
"Microsoft.AspNetCore.Owin": "1.0.0",
"Microsoft.AspNetCore.Authentication.OAuth": "1.0.0",
"Dapper": "1.50.2",
"tools": {
"Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.0.0-preview2-final"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"Areas/**/Views",
"appsettings.json",
"web.config"
]
},
"scripts": {
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}
更新: 在将一个}字符添加到project.json字符后,我尝试再次编译它。
此后,错误如下:
无法找到project.json &#39; C:_Fuentes \ AutorizarCreditoApp \ SRC \ AutorizarCreditoApp&#39;
&#39; C:_Fuentes \ AutorizarCreditoApp \ SRC \ AutorizarCreditoApp \ project.json&#39; 没有在&#39;框架中列出的任何框架&#39; 部分。 AutorizarCreditoApp C:\ Program Files (x86)\ MSBuild \ Microsoft \ VisualStudio \ v14.0 \ DotNet \ Microsoft.DotNet.Common.Targets 262
答案 0 :(得分:0)
检查项目中的引用是否依赖,如果引用正常,则在卸载&gt;关闭VS&gt;打开VS
后从nuget重新安装包答案 1 :(得分:0)
卸载nuget包后我遇到了同样的问题。 我使用nuget包管理器来安装和卸载包。
我发现故障发生在我的project.json文件中,恢复失败后,关闭}丢失了。
发现我的依赖项在工具启动之前缺少一个结束标记。