从VS版本在应用程序服务上进行部署是:2.1.403
,我本地的版本是:2.1.403
这是.csproj的relevent部分的副本
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
<IsPackable>false</IsPackable>
<UserSecretsId>952fa24f-1cbc-4017-8cdc-4b99e3671be7</UserSecretsId>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
<RuntimeIdentifiers>win10-x64;</RuntimeIdentifiers>
</PropertyGroup>
<ItemGroup>
<Compile Remove="NewFolder\**" />
<Content Remove="NewFolder\**" />
<EmbeddedResource Remove="NewFolder\**" />
<None Remove="NewFolder\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Bogus" Version="24.3.0" />
<PackageReference Include="MediatR" Version="5.1.0" />
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="5.1.0" />
<PackageReference Include="Microsoft.AspNetCore" Version="2.1.4" />
<PackageReference Include="Microsoft.AspNetCore.All"/>
<PackageReference Include="Microsoft.AspNetCore.App"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="2.1.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.1.5" />
</ItemGroup>
我尝试过:
构建工件中的我的runtime.config看起来不错:
{
"runtimeOptions": {
"tfm": "netcoreapp2.1",
"framework": {
"name": "Microsoft.AspNetCore.All",
"version": "2.1.5"
},
"configProperties": {
"System.GC.Server": true
}
}
}
那我在这里想念什么?
答案 0 :(得分:2)
此问题已解决:
About to connect() to alm.example.com port 443 (#0)
Trying 10.64.167.137...
Connected to alm.example.com (10.64.167.137) port 443 (#0)
Initializing NSS with certpath: sql:/etc/pki/nssdb
CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
...
...
...
Accept: */*
尽管这可能是一个麻烦,因为我不知道为什么指定应用程序版本会解决(我认为共享框架的目的是动态提取所需的版本。)
如果它对任何人都有帮助,则:2.1.5是发行版号,而不是SDK的版本(对应于2.1.403)