C# AspNetCore-.xproj输出路径
我一直在尝试逐步了解一些开源MVC/ASP.NET核心代码,但每次我偶然发现一些新项目,在完成C# AspNetCore-.xproj输出路径,c#,asp.net,msbuild,dnx,.xproj,C#,Asp.net,Msbuild,Dnx,.xproj,我一直在尝试逐步了解一些开源MVC/ASP.NET核心代码,但每次我偶然发现一些新项目,在完成git克隆后,我需要编辑.xproj文件以更改以下输出 <OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\</OutputPath> 否则我会得到以下错误 Severity: Error Code: Description: C:\Users\lndco\Documents\GitHub\Razor
git克隆后,我需要编辑.xproj
文件以更改以下输出
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\bin\</OutputPath>
否则我会得到以下错误
Severity: Error
Code:
Description:
C:\Users\lndco\Documents\GitHub\RazorBlog\src\RazorBlog\error
CS0006: Metadata file
'C:\Users\lndco\Documents\GitHub\RazorBlog\Mvc
\src\Microsoft.AspNetCore.Mvc.Formatters.Json
\bin\Debug\netstandard1.6\Microsoft.AspNetCore.Mvc.Formatters.Json.dll'
could not be found
Project: RazorBlog
File: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets
使用VS 2015更新3
为什么MsBuild无法确定引用程序集的输出是。\..\artifacts\bin\
文件夹:
global.json
AspNetCore poroject.json
忘记xproj和project.json的概念吧。安装VS2017并将所有这些迁移到最新的.NET Core SDK和MSBuild项目格式,这样您就不会在过去浪费时间了。请尝试一下,谢谢!
Severity: Error
Code:
Description:
C:\Users\lndco\Documents\GitHub\RazorBlog\src\RazorBlog\error
CS0006: Metadata file
'C:\Users\lndco\Documents\GitHub\RazorBlog\Mvc
\src\Microsoft.AspNetCore.Mvc.Formatters.Json
\bin\Debug\netstandard1.6\Microsoft.AspNetCore.Mvc.Formatters.Json.dll'
could not be found
Project: RazorBlog
File: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Common.Targets
{
"projects": [
"src",
"test",
"Mvc/src",
],
"sdk": {
"version": "1.0.0-preview2-003131"
}
}
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.1",
"type": "platform"
},
"Microsoft.ApplicationInsights.AspNetCore": "1.0.0",
"Microsoft.AspNetCore.Diagnostics": "1.0.0",
"Microsoft.AspNetCore.Mvc": "1.0.1",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview2-final",
"type": "build"
},
"Microsoft.AspNetCore.Mvc.ViewFeatures": "1.0.1",
"Microsoft.AspNetCore.Routing": "1.0.1",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.1",
"Microsoft.AspNetCore.StaticFiles": "1.0.0",
"Microsoft.AspNetCore.WebUtilities": "1.0.0",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "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.VisualStudio.Web.BrowserLink.Loader": "14.0.0"
},
"tools": {
"BundlerMinifier.Core": "2.0.238"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
"publishOptions": {
"include": [
"wwwroot",
"**/*.cshtml",
"appsettings.json",
"web.config"
]
},
"scripts": {
"prepublish": [ "bower install", "dotnet bundle" ],
"postpublish": [ "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%" ]
}
}