msbuild – 如果不指定目标框架,则不支持“发布”目标
|
使用Visual Studio 2017,我使用.NET Framework创建了一个ASP.NET Core站点.
我的目标是x64 Windows 2008R2.我的.cproj的开头如下: <Project Sdk="Microsoft.NET.Sdk.Web" ToolsVersion="15.0">
<PropertyGroup>
<TargetFrameworks>net462</TargetFrameworks>
<RuntimeIdentifier>win7-x64</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>binDebug</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PlatformTarget>x64</PlatformTarget>
<OutputPath>binRelease</OutputPath>
<Optimize>True</Optimize>
</PropertyGroup>
...
但是,虽然我只针对.NET 4.6.2,但当我尝试发布时,我收到此错误
在网上寻找解决方案时,我遇到了遇到同样问题的人,但他们实际上有很多目标,但是,在我的情况下,我不确定为什么我会得到它. 有任何想法吗? 解决方法.csproj模板( https://github.com/dotnet/sdk/issues/251)发生了变化.而不是< TargetFrameworks>你需要使用< TargetFramework>: <PropertyGroup> <TargetFramework>net462</TargetFramework> <RuntimeIdentifier>win7-x64</RuntimeIdentifier> </PropertyGroup> (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- asp.net-mvc – 安装KB2993928后,ASP.NET MVC4解决方案无法
- asp.net-web-api – ASP.NET WebApi自定义序列化
- asp.net-mvc – 在Razor中输出单引号生成的JavaScript字符串
- asp.net-mvc – 跨多个页面的MVC3 RenderPartial缓存
- asp.net – 计算代码后面的代码行数和aspx文件的工具?
- asp.net-mvc – 如何创建ASP.NET MVC区域作为插件DLL?
- asp.net-mvc-3 – ASP.MVC 3 Razor在Html.PartialView扩展中
- 在Asp.net中运行外部可执行文件的内存限制
- asp.net – Dropzone没有绑定到模型
- asp.net – 如何使用外部登录提供程序创建刷新令牌?
- asp.net-mvc – Html.TextBox条件属性与ASP.NET
- asp.net-mvc – MVC角色授权
- asp.net-mvc – 通过NuGet升级到Microsoft.AspNe
- asp.net – 为什么加密一个web配置文件?
- asp.net-mvc-3 – 在部署服务器中编辑ASP.NET MV
- asp.net-mvc-4 – MVC4和MVCContrib
- asp.net-mvc-3 – ASP.NET MVC 3:将应用程序移动
- asp.net – tinymce在回发时获取HTML代码
- asp.net – 微软的AJAX Toolkit与jQuery
- ASP.Net MVC路线映射
