You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using CSharpier.MSBuild and running that in a .NET 7 container it still results in a .NET version issue
App: /root/.nuget/packages/csharpier.msbuild/0.21.0/tools/csharpier/dotnet-csharpier.dll
Architecture: x64
Framework: 'Microsoft.NETCore.App', version '6.0.0' (x64)
.NET location: /usr/share/dotnet/
The following frameworks were found:
7.0.1 at [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Learn about framework resolution:
https://aka.ms/dotnet/app-launch-failed
To install missing framework, download:
https://aka.ms/dotnet-core-applaunch?framework=Microsoft.NETCore.App&framework_version=6.0.0&arch=x64&rid=debian.11-x64
/root/.nuget/packages/csharpier.msbuild/0.21.0/build/CSharpier.MsBuild.targets(11,9): error MSB3073: The command "dotnet /root/.nuget/packages/csharpier.msbuild/0.21.0/build/../tools/csharpier/dotnet-csharpier.dll --check /app/Shared" exited with code 150. [/app/Shared/Shared.csproj]
The command '/bin/sh -c dotnet publish ./PlatformRunner/PlatformRunner.csproj -c Release -o out' returned a non-zero code: 1
Error: Process completed with exit code 1.
we are using the mcr.microsoft.com/dotnet/sdk:7.0 image
as you can see it's actually using the 0.21.0 version of CSharpier but probably falls back as the MSBuild version is targeting .NET Standard. May be it needs to be multi targeted against .NET 7
The text was updated successfully, but these errors were encountered:
I tracked this down to the CSharpier.MsBuild having a hardcoded path to a framework which was currently at net6.0.
I was able to modify it in a way that it will try to run CSharpier from the current target framework of the csproj it runs in. This can then be overridden with the following property <CSharpier_FrameworkVersion>net6.0</CSharpier_FrameworkVersion>.
One downside - without more work, anyone using CSharpier.MsBuild in a project targeting net48, netstandard2.0 etc will have to add the CSharpier_FrameworkVersion property. I don't know how common that is, so may just leave it as is for now.
We are using CSharpier.MSBuild and running that in a .NET 7 container it still results in a .NET version issue
we are using the
mcr.microsoft.com/dotnet/sdk:7.0
imageas you can see it's actually using the 0.21.0 version of CSharpier but probably falls back as the MSBuild version is targeting .NET Standard. May be it needs to be multi targeted against .NET 7
The text was updated successfully, but these errors were encountered: