kswoll / ReactiveUI.Fody

C# Fody extension to generate RaisePropertyChange notifications for properties and ObservableAsPropertyHelper properties.
MIT License
154 stars 31 forks source link

Please support latest Mono.Cecil #45

Closed escamoteur closed 7 years ago

escamoteur commented 7 years ago

Hi, it turns out if you update to VS2017 and mono 5.0 there are some problems when building with fody. This is part of a reply I got from Xamarin:

We found a possibly related issue that’s also affecting other scenarios. If you’re using VS2017, could you try changing all your class library to be ‘portable’? You can do that in each project’s Build > Advanced section, or you can just place this value in a Directory.Build.targets at the root, with the following contents:

> > > > portable > > > >

(there was an unintended change in Mono.Cecil that caused full PDB files to not be properly disposed).

Problem is, if you switch to Portable PDBs, Fody uses an older Mono.Cecil that doesn’t support PPDBs :(. Updating all Fody nugets yields an almost working solution, but I’m still getting:

"C:\Users\kzu\Downloads\JistTV\JistTV\JistTV.iOS\JistTV.iOS.csproj" (Build target) (1) ->

(FodyTarget target) ->

MSBUILD : error : Fody: The weaver assembly 'ReactiveUI.Fody, Version=2.0.66.0, Culture=neutral, PublicKeyToken=null' references an out of date version of Mono.Cecil.dll (cecilReference.Version). At least version 0.10 is expected. The weaver needs to add a NuGet reference to FodyCecil version 2.0. [C:\Users\kzu\Downloads\JistTV\JistTV\JistTV.iOS\JistTV.iOS.csproj]

So that one is outdated and no updates are available :(

Also, I’m using latest stable (15.2), which requires updating System.ValueTuple to 4.3.1.

There are sooooo many moving pieces… Any chance you can get an updated version of ReactiveUI.Fody or remove it entirely?

I'm sure a lot of users will soon run into that problem. Would be awesome if you could have a look at it Cheers Thomas

kzu commented 7 years ago

Basically latest Fody requires all Weavers to reference 0.10." of Mono.Cecil.

Without an update to this project/nuget, it's impossible to use it on netstandard/netcore out of the box, or with any projects that choose to use portable pdb files.

This is a highly visible and blocking issue for users upgrading to VS2017 where portable pdbs are the default in those project types.

Thanks.

kswoll commented 7 years ago

There seems to be a lot of unrelated (?) information here? ReactiveUI.Fody references:

<package id="FodyCecil" version="2.0.7" targetFramework="net45" developmentDependency="true" />

I notice that the latest version is FodyCecil 2.0.9. Is this issue just about upgrading ReactiveUI.Fody to point to that newer version?

kzu commented 7 years ago

I suppose. @SimonCropp?

SimonCropp commented 7 years ago

Nope. Any version in the 2.x range should be fine

escamoteur commented 7 years ago

But what is then the problem? It already references 2.07 @simoncropp

SimonCropp commented 7 years ago

Accoring to the error u r referencing 2.0.66 of reactiveui.fody. That is not the latest version. Try updating it to the newest

kswoll commented 7 years ago

@SimonCropp ah, good call. I should have noticed that. Thanks! That should indeed take care of it.

SimonCropp commented 7 years ago

No worries

escamoteur commented 7 years ago

Is an Update already on Nugget? Thanks Thomas

kswoll commented 7 years ago

@escamoteur are you not seeing the newer versions on nuget?

https://www.nuget.org/packages/ReactiveUI.Fody

escamoteur commented 7 years ago

Oh, sorry I'm on the road and was just wondering that you closed the issue without any comments. Thanks a lot, now I too can use vs2017