Skip to content
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

Bump sdk version to 5.0.102 #5415

Closed
wants to merge 12 commits into from
Closed

Bump sdk version to 5.0.102 #5415

wants to merge 12 commits into from

Conversation

rstm-sf
Copy link
Contributor

@rstm-sf rstm-sf commented Feb 2, 2021

What does the pull request do?

Bump version sdk to 5.0.102

What is the current behavior?

Limit to .NET Core 3.1 and C#8

What is the updated/expected behavior with this PR?

Limit to .NET 5.0 and C#9

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Fixed issues

Fixes #5401

Dependencies

Depends on peters/il-repack#2
Depends on #5423

Depends on update https://www.nuget.org/packages/ILRepack.NETStandard/ ?

@rstm-sf
Copy link
Contributor Author

rstm-sf commented Feb 2, 2021

Hello, @worldbeater! Сouldn't see what is happening on Linux with a Pharmacist at net5?

@jp2masa
Copy link
Contributor

jp2masa commented Feb 2, 2021

The problem is this:

/home/vsts/work/1/s/nukebuild/_build.csproj : error NU1107: Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 3.8.0 directly to project _build to resolve this issue. 
/home/vsts/work/1/s/nukebuild/_build.csproj : error NU1107:  _build -> Pharmacist.Core 2.0.6 -> Microsoft.CodeAnalysis.CSharp 3.8.0 -> Microsoft.CodeAnalysis.Common (= 3.8.0) 
/home/vsts/work/1/s/nukebuild/_build.csproj : error NU1107:  _build -> MicroComGenerator -> Microsoft.CodeAnalysis.CSharp.Workspaces 3.7.0 -> Microsoft.CodeAnalysis.Common (= 3.7.0).

So you have to either directly reference 3.8.0 on _build or upgrade it on MicroComGenerator:

<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.7.0" />
.

@rstm-sf
Copy link
Contributor Author

rstm-sf commented Feb 2, 2021

Thanks!

I am looking wrong again. But I was more confused by this

/home/vsts/work/1/s/nukebuild/_build.csproj : warning NU1603: Pharmacist.Core 2.0.6 depends on ICSharpCode.Decompiler (>= 2.0.6) but ICSharpCode.Decompiler 2.0.6 was not found. An approximate best match of ICSharpCode.Decompiler 2.3.0 was resolved.
/home/vsts/work/1/s/nukebuild/_build.csproj : warning NU1701: Package 'ICSharpCode.Decompiler 2.3.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project.
/home/vsts/work/1/s/nukebuild/_build.csproj : warning NU1701: Package 'ICSharpCode.NRefactory 5.5.1' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project.

It has its own ICSharpCode.Decompiler which is not covered

@worldbeater
Copy link
Contributor

worldbeater commented Feb 2, 2021

@rstm-sf probably worth switching to an older Pharmacist version that doesn't break the build. Probably Pharmacist will be deprecated soon in favor of https://github.com/reactivemarbles/ObservableEventsSourceGenerator

@rstm-sf
Copy link
Contributor Author

rstm-sf commented Feb 2, 2021

@worldbeater, maybe then it is worth removing potentially deprecated technology from the repository before it is actively used?

@rstm-sf
Copy link
Contributor Author

rstm-sf commented Feb 3, 2021

Adding Pharmacist.MsBuild did not help, although it seems like the necessary assembly is located there

<PackageReference Include="Pharmacist.MsBuild" Version="2.0.6" />

@worldbeater
Copy link
Contributor

worldbeater commented Feb 3, 2021

Modified the project file as such:

<PackageReference Include="Pharmacist.Core" Version="2.0.6" />
<PackageReference Include="ICSharpCode.Decompiler" Version="7.0.0.6291-preview2" />

And got the following exception:

[1/2] ArgumentNullException: Value cannot be null. (Parameter 'genericType')
   at ICSharpCode.Decompiler.TypeSystem.ParameterizedType..ctor(IType genericType, IEnumerable`1 typeArguments)
   at Pharmacist.Core.Generation.ReflectionExtensions.GetRealType(IType type, ICompilation compilation) in D:\a\Pharmacist\Pharmacist\src\Pharmacist.Core\Generation\ReflectionExtensions.cs:line 142
   at Pharmacist.Core.Generation.ReflectionExtensions.GetEventType(IEvent eventDetails) in D:\a\Pharmacist\Pharmacist\src\Pharmacist.Core\Generation\ReflectionExtensions.cs:line 108
   at Pharmacist.Core.Generation.Resolvers.EventNamespaceResolverBase.IsValidParameters(IEvent eventDetails) in D:\a\Pharmacist\Pharmacist\src\Pharmacist.Core\Generation\Resolvers\EventNamespaceResolverBase.cs:line 32
   at Pharmacist.Core.Generation.Resolvers.PublicEventNamespaceResolver.IsValidEvent(IEvent x) in D:\a\Pharmacist\Pharmacist\src\Pharmacist.Core\Generation\Resolvers\PublicEventNamespaceResolver.cs:line 132
   at Pharmacist.Core.Generation.Resolvers.PublicEventNamespaceResolver.<>c__DisplayClass1_0.<GetValidEventDetails>b__1(ITypeDefinition typeDefinition) in D:\a\Pharmacist\Pharmacist\src\Pharmacist.Core\Generation\Resolvers\PublicEventNamespaceResolver.cs:line 61
   at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Parallel.<>c__DisplayClass44_0`2.<PartitionerForEachWorker>b__1(IEnumerator& partitionState, Int32 timeout, Boolean& replicationDelegateYieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica`1.ExecuteAction(Boolean& yieldedBeforeCompletion)
   at System.Threading.Tasks.TaskReplicator.Replica.Execute()

The Pharmacist error seems to be coming from here https://github.com/reactiveui/Pharmacist/blob/main/src/Pharmacist.Core/Generation/ReflectionExtensions.cs#L142 Probably that's caused by a type argument being null. This issue only arises on Linux, so this is probably related to .NET 5 changes in .NET runtime (however I might be wrong).

@rstm-sf
Copy link
Contributor Author

rstm-sf commented Feb 12, 2021

Probably we should disable the NETSDK1138 warning. See also #5301

@rstm-sf
Copy link
Contributor Author

rstm-sf commented Mar 7, 2021

https://github.com/peters/il-repack has been archived by the owner. It is now read-only.

@rstm-sf rstm-sf mentioned this pull request May 6, 2021
3 tasks
@maxkatz6 maxkatz6 closed this Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add supports .NET 5 SDK for enable c#9 in internal avalonia projects
4 participants