Closed sommmen closed 2 years ago
The project seems to build and run fine - but this scares me a bit to be honest. I'm not sure what'll happen if i push these changes to production. any clues?
According to this answer, there should be no problem with that warning:
According to this answer, there should be no problem with that warning:
True - but why have you chosen x64 over 'Any' as solution platform? Now this might not work on something like a raspberry pi which is ARM64 - or on a 32 bit machine.
The other providers don't have this and i feel like 'Any cpu' should work fine for the sql provider.
I haven't chosen x64 architecture and I don't think this problem is related to the Serilog.UI project.
I haven't chosen x64 architecture and I don't think this problem is related to the Serilog.UI project.
Master does contain x64 as platform target, see:
https://github.com/mo-esmp/serilog-ui/commit/ca2f6b3249139d6a8ca5c238fc7f0bca8dbf73c0
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Version>2.1.0</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<PlatformTarget>x64</PlatformTarget>
<WarningLevel>0</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="2.0.35" />
<PackageReference Include="Microsoft.Data.SqlClient" Version="2.1.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Serilog.Ui.Core\Serilog.Ui.Core.csproj" />
</ItemGroup>
</Project>
Change it to release mode and perhaps you'll see.
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<PlatformTarget>x64</PlatformTarget>
<WarningLevel>0</WarningLevel>
</PropertyGroup>
Just remove that part and we should be good.
Please upgrade Serilog.UI.MsSqlServerProvider
to version 2.1.1
.
Works - thanks for the effort!
Hiya,
The MSSQL provider faults with a weird error:
warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "C:\Users\31611\.nuget\packages\serilog.ui.mssqlserverprovider\2.1.0\lib\netstandard2.0\Serilog.Ui.MsSqlServerProvider.dll", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
Perhaps this is because of the following props in the .csproj?:
I'm running a net6 project that looks like this: