- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我的解决方案是:
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core31ConsoleApp", "Core31ConsoleApp\Core31ConsoleApp.csproj", "{06477443-295A-47CA-A36E-A3F6B3AE47AC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{06477443-295A-47CA-A36E-A3F6B3AE47AC}.Debug|x64.ActiveCfg = Debug|x64
{06477443-295A-47CA-A36E-A3F6B3AE47AC}.Debug|x64.Build.0 = Debug|x64
{06477443-295A-47CA-A36E-A3F6B3AE47AC}.Debug|x86.ActiveCfg = Debug|x86
{06477443-295A-47CA-A36E-A3F6B3AE47AC}.Debug|x86.Build.0 = Debug|x86
{06477443-295A-47CA-A36E-A3F6B3AE47AC}.Release|x64.ActiveCfg = Release|x64
{06477443-295A-47CA-A36E-A3F6B3AE47AC}.Release|x64.Build.0 = Release|x64
{06477443-295A-47CA-A36E-A3F6B3AE47AC}.Release|x86.ActiveCfg = Release|x86
{06477443-295A-47CA-A36E-A3F6B3AE47AC}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {17BBBF08-C7F4-4F6A-AD8F-32F2F3F21D27}
EndGlobalSection
EndGlobal
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<Platforms>x86;x64</Platforms>
</PropertyGroup>
</Project>
using System;
namespace Core31ConsoleApp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
dotnet build Core31ConsoleApp.sln --configuration Debug --runtime win-x64
dotnet build Core31ConsoleApp.sln --configuration Release --runtime win-x64
dotnet build Core31ConsoleApp.sln --configuration Release --runtime win-x86
dotnet build Core31ConsoleApp.sln --configuration Debug --runtime win-x86
C:\Program Files\dotnet\sdk\3.1.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(151,5): error NETSDK1032: The RuntimeIdentifier platform 'win-x86' and the PlatformTarget 'x64' must be compatible.
C:\Program Files\dotnet\sdk\3.1.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(151,5): error NETSDK1032: The RuntimeIdentifier platform 'win-x64' and the PlatformTarget 'x86' must be compatible.**
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
最佳答案
向节点“RuntimeIdentifier”添加值是没有用的。我问你,你是如何加载命令提示符的?您的任务栏或图标是否使用了 BATCH 文件?有没有用
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvarsall.bat
如果是这样,您可能正在使用由该批处理文件创建的 C++ 命令环境运行“dotnet build”。
@REM This temporary environment variable is used to control setting of VC++
@REM command prompt-specific environment variables that should not be set
@REM by the VS Developer Command prompt (specifically vsdevcmd\ext\vcvars.bat).
@REM The known case this effects is the Platform environment variable, which
@REM will override platform target for .NET builds.
相反,请使用 VS2019 附带的那个,就像在 Windows 开始菜单中一样。命令窗口应如下所示:
关于.net-core - 错误 NETSDK1032 : The RuntimeIdentifier platform 'win-x86' and the PlatformTarget 'x64' must be compatible,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59572680/
我的解决方案是: Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 Visu
我是一名优秀的程序员,十分优秀!