1.默认anycpu,可以直接运行。换成x86,连网按照x86,vs自己按照,还是跑步起来。
2.发布x86 项目到D盘,cmd下运行,就可以。
测试发那科成型机,必须x86,而且发那科必须B系列,还需要厂商开通,不然在通信地址没有远程设定。没有远程设定也不能采集数据。
解决问题:
1.连网(wifi)。
2.在.csproj文件里面,添加<RuntimeIdentifier>win7-x86</RuntimeIdentifier>,注意位置,加到后面没有效果。
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
<ItemGroup>
</ItemGroup>
</Project>
</ItemGroup>
</Project>
PS: