8000 Use .NET 6 SDK while dropping .NET 5 & Core 2.1 by atifaziz · Pull Request #843 · morelinq/MoreLINQ · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 4 commits into from
Oct 15, 2022

Conversation

atifaziz
Copy link
Member
@atifaziz atifaziz commented Oct 15, 2022

This PR updates to .NET SDK 6 (adding it as test target too) while dropping retired .NET (Core) versions:

  • .NET Core 2.1 end-of-life was August 21, 2021
  • .NET 5.0 end-of-life was May 10, 2022

- .NET Core 2.1 end-of-life was August 21, 2021
- .NET 5.0 end-of-life was May 10, 2022
@atifaziz atifaziz added this to the 3.4.0 milestone Oct 15, 2022
@atifaziz atifaziz self-assigned this Oct 15, 2022
@viceroypenguin
Copy link
Contributor

FYI: If you wait a few more weeks, .net 7 will be out and you can add it as a target as well.

@atifaziz
Copy link
Member Author

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
@atifaziz atifaziz merged commit de2796e into morelinq:master Oct 15, 2022
@atifaziz atifaziz deleted the refresh-dotnet-targets branch October 15, 2022 17:58
@atifaziz atifaziz changed the title Add .NET 6 target while dropping .NET 5 & Core 2.1 Use .NET 6 SDK while dropping .NET 5 & Core 2.1 Oct 31, 2022
@UweKeim
Copy link
UweKeim commented Feb 28, 2023

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:

System.IO.FileNotFoundException: Die Datei oder Assembly "System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.

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.

@viceroypenguin
Copy link
Contributor

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.

8000

@atifaziz
Copy link
Member Author
atifaziz commented Mar 1, 2023

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.

@UweKeim
Copy link
UweKeim commented Mar 1, 2023

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 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0