-
Notifications
You must be signed in to change notification settings - Fork 420
Use .NET 6 SDK while dropping .NET 5 & Core 2.1 #843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- .NET Core 2.1 end-of-life was August 21, 2021 - .NET 5.0 end-of-life was May 10, 2022
FYI: If you wait a few more weeks, .net 7 will be out and you can add it as a target as well. |
I am well aware, but God knows what my schedule will look like in a few weeks, so refreshing right now to what's there while I have some time to spare. Plus, .NET 6 is LTS so should cover the next two years. |
This should address the following on macOS builds: MoreLinq.csproj(270,5): error MSB3073: The command "dotnet t4 Aggregate.g.tt" exited with code 1. Processing 'Aggregate.g.tt' failed. EXEC : error : Error running transform: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. [/Users/appveyor/projects/morelinq/MoreLinq/MoreLinq.csproj] ---> System.IO.FileLoadException: Could not load file or assembly 'System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The parameter is incorrect. (0x80070057 (E_INVALIDARG)) File name: 'System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' ---> System.ArgumentException: Path "System.Collections.dll" is not an absolute path. (Parameter 'assemblyPath') at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath) at System.Runtime.Loader.AssemblyLoadContext.ResolveUsingLoad(AssemblyName assemblyName) at System.Runtime.Loader.AssemblyLoadContext.Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) at System.Linq.Enumerable.Select[TSource,TResult](IEnumerable`1 source, Func`2 selector) at Microsoft.VisualStudio.TextTemplatingccc0214.GeneratedTextTransformation.TransformText() --- End of inner exception stack trace --- at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at Mono.TextTemplating.CompiledTemplate.TemplateProcessor.CreateAndProcess(ITextTemplatingEngineHost host, CompiledAssemblyData templateAssemblyData, String templateAssemblyFile, String fullName, CultureInfo culture, String[] referencedAssemblyFiles) in /_/Mono.TextTemplating/Mono.TextTemplating/CompiledTemplate.TemplateExecutor.cs:line 78
This release 3.4.0 (just pulled from NuGet) broke my CS-Script files (I'm using the last non-.NET-Core version v3.30.5.2) with this (German, sorry) error message:
Basically it tries to use "System.Runtime, Version=6.0.0.0" and complains that it cannot find the files. I had to revert to Morelinq 3.3.2. |
This is actually related to #934. Looking at the CS-Script v3.30.5.2 source, it targets .NET Framework 4.6.0; which is out of support as of April 26, 2022. MoreLinq has moved minimum .NET Framework version support to 4.6.2 to match current Microsoft support. |
@UweKeim This is something that was called out as a breaking change in the release notes. |
Thanks to both, @viceroypenguin and @atifaziz. I was unaware of these "internals" of CS-Script and morelinq and the consequences. So thank you very much for explaining this to me. Learned something new today 😊 |
This PR updates to .NET SDK 6 (adding it as test target too) while dropping retired .NET (Core) versions: