kswoll / ReactiveUI.Fody

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

ReactiveUI.Fody breaks the Windows Forms designer #46

Open ghuntley opened 7 years ago

ghuntley commented 7 years ago

Repo

1) Clone this repo -> https://github.com/ghuntley/hmmpth 2) Build 3) Drag user control which uses ToPropertyEx 4) 💥

Remarks

The exception will be that 7.0.0.0 cannot be found, after adding a binding redirect from that to 7.3.0.0:

+  <runtime>
+    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+      <dependentAssembly>
+        <assemblyIdentity name="ReactiveUI" />
+        <bindingRedirect oldVersion="7.0.0.0" newVersion="7.3.0.0"/>
+      </dependentAssembly>
+    </assemblyBinding>
+  </runtime>

The exception becomes a little more clear.

---------------------------
Microsoft Visual Studio
---------------------------
Failed to create component 'ColorPickerControl'.  The error message follows:

 'System.TypeLoadException: Could not load type 'ColorPicker.ColorPickerViewModel' from assembly 'ColorPicker, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' because the method 'get_Color' has no implementation (no RVA).

   at System.Reflection.RuntimeAssembly.GetType(RuntimeAssembly assembly, String name, Boolean throwOnError, Boolean ignoreCase, ObjectHandleOnStack type)

   at System.Reflection.RuntimeAssembly.GetType(String name, Boolean throwOnError, Boolean ignoreCase)

   at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Boolean allowPrivate, Assembly& assembly, String description)

   at Microsoft.VisualStudio.Design.VSTypeResolutionService.AssemblyEntry.Search(String fullName, String typeName, Boolean ignoreTypeCase, Assembly& assembly, String description)

   at Microsoft.VisualStudio.Design.VSTypeResolutionService.SearchProjectEntries(AssemblyName assemblyName, String typeName, Boolean ignoreTypeCase, As...'
---------------------------
OK   
---------------------------

Some quick googling lead me to here http://blog.jongallant.com/2009/02/method-has-no-implementation/

kswoll commented 7 years ago

👍 for the 💯 issue report. However, I tried adding that binding redirect to App.config in the ColorProject project, but I'm still getting the original exception message. Any ideas?

kswoll commented 7 years ago

FWIW, when I downgrade reactiveui et al to 7.0.0 I'm unable to repro. Using VS2017 Community edition.