KeldorKatarn
Topic Author
Posts: 193
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

28 Sep 2017, 13:32

I just upgraded everything and these were the issues. I don't know why the delegate command is not doing anything since it was working fine last time I worked on this.
I'll spend more time on this later and also check a fresh Noesis install for this assetion error, but it's definitely an issue somewhere. I had these weird repaint assertion errors last time with the 2.0.0 version as well.
 
KeldorKatarn
Topic Author
Posts: 193
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

28 Sep 2017, 16:41

Sooo... just created a fresh project, installed the Noesis Unity package and immediately get 2 warnings and 999+ errors...
DllNotFoundException: Noesis
Noesis.NoesisGUI_PINVOKE+SWIGExceptionHelper.Init () (at Assets/NoesisGUI/Plugins/API/Proxies/NoesisGUI_PINVOKE.cs:126)
Noesis.NoesisGUI_PINVOKE.Init () (at Assets/NoesisGUI/Plugins/API/Proxies/NoesisGUI_PINVOKE.cs:15532)
Noesis.GUI.Init () (at Assets/NoesisGUI/Plugins/API/Core/NoesisGUI.cs:28)
NoesisUnity.Init () (at Assets/NoesisGUI/Plugins/NoesisUnity.cs:15)
NoesisXaml.RegisterDependencies () (at Assets/NoesisGUI/Plugins/NoesisXaml.cs:55)
NoesisXaml.OnEnable () (at Assets/NoesisGUI/Plugins/NoesisXaml.cs:10)
Non-Pro asset count incorrect; correcting.
UnityEditor.AssetDatabase:SaveAssets()
NoesisSettings:Get() (at Assets/NoesisGUI/Plugins/NoesisSettings.cs:19)
NoesisXamlEditor:CanRender() (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:138)
NoesisXamlEditor:RenderStaticPreview(String, Object[], Int32, Int32) (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:221)
UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)
DllNotFoundException: Noesis
Noesis.XamlProvider.Extend (System.String typeName) (at Assets/NoesisGUI/Plugins/API/Proxies/XamlProvider.cs:50)
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
Noesis.Extend.RegisterNativeType (System.Type type, Boolean registerDP) (at Assets/NoesisGUI/Plugins/API/Core/NoesisExtend.cs:1189)
Noesis.Extend.EnsureNativeType (System.Type type, Boolean registerDP) (at Assets/NoesisGUI/Plugins/API/Core/NoesisExtend.cs:1468)
Noesis.Extend.EnsureNativeType (System.Type type) (at Assets/NoesisGUI/Plugins/API/Core/NoesisExtend.cs:1460)
Noesis.Extend.NewCPtr (System.Type type, System.Object instance) (at Assets/NoesisGUI/Plugins/API/Core/NoesisExtend.cs:3825)
Noesis.BaseComponent.CreateExtendCPtr (System.Type type, System.Boolean& registerExtend) (at Assets/NoesisGUI/Plugins/API/Proxies/BaseComponentExtend.cs:84)
Noesis.BaseComponent.CreateCPtr (System.Type type, System.Boolean& registerExtend) (at Assets/NoesisGUI/Plugins/API/Proxies/BaseComponentExtend.cs:78)
Noesis.BaseComponent..ctor () (at Assets/NoesisGUI/Plugins/API/Proxies/BaseComponentExtend.cs:17)
Noesis.XamlProvider..ctor () (at Assets/NoesisGUI/Plugins/API/Proxies/XamlProvider.cs:31)
NoesisXamlProvider..ctor () (at Assets/NoesisGUI/Plugins/NoesisProviders.cs:13)
NoesisXamlProvider..cctor () (at Assets/NoesisGUI/Plugins/NoesisProviders.cs:11)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for NoesisXamlProvider
NoesisXaml.RegisterDependencies () (at Assets/NoesisGUI/Plugins/NoesisXaml.cs:56)
NoesisXaml.Load () (at Assets/NoesisGUI/Plugins/NoesisXaml.cs:30)
NoesisXamlEditor.CreatePreviewGUIView () (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:48)
UnityEngine.Debug:LogException(Exception)
NoesisXamlEditor:CreatePreviewGUIView() (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:60)
NoesisXamlEditor:RenderStaticPreview(String, Object[], Int32, Int32) (at Assets/NoesisGUI/Plugins/Editor/NoesisXamlEditor.cs:225)
UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)
Assertion failed: Assertion failed on expression: '!performAutorepaint || GetApplication().MayUpdate()'
UnityEditor.AssetDatabase:SaveAssets()
NoesisSettings:Get() (at Assets/NoesisGUI/Plugins/NoesisSettings.cs:19)
NoesisPostprocessor:OnPostprocessAllAssets(String[], String[], String[], String[]) (at Assets/NoesisGUI/Plugins/Editor/NoesisPostprocessor.cs:22)
UnityEditor.AssetPostprocessingInternal:PostprocessAllAssets(String[], String[], String[], String[], String[])

On trying the Buttons sample I get
Exception: Unexpected empty XAML. Please reimport again
NoesisXaml.Load () (at Assets/NoesisGUI/Plugins/NoesisXaml.cs:27)
NoesisView.LoadXaml (Boolean force) (at Assets/NoesisGUI/Plugins/NoesisView.cs:303)
NoesisView.OnEnable () (at Assets/NoesisGUI/Plugins/NoesisView.cs:365)


So not only is Unity 2017.1.1 in its current form freezing all over the place, making it already a chore to create a fresh empty project (Unity creates the project, then idles as a background thread, which I need to kill, then upon reopening Unity I can finally open the project), Noesis doesn't do a clean install on me either.

So right now i'm really mad at Unity because their 2017 version seems to be incredibly unfinished, and I'm a bit frustrated with Noesis since I can't get it to either work or install properly.

Seems like one of those times again where you should just put Unity and everything connected to it away and get back in 6 months or so...

On a related note... In my already existing Caliburn project I tried switching to NET4.6 profile... and for some reason Unity didn't include your INLINE.cs (why is that capitalized?) in the project anymore so I got "Inline type not found" errors all over the place...

Sorry but I might not keep working on this for a while. It's incredibly frustrating to me when I want to work on a project and I can't even get started because the tools I'm working with crash left and right on me. I'm actually shocked at the state of Unity 2017 to be honest.

Edit: From taking a look at the Unity Editor forums it seems their license server crapped out in some weird way so now as long as you're online you can't open projects half the time anymore. Yay. Need to wait for that one to be fixed first before I can get anything done in Unity. So sorry, can't work on anything Noesis related until Unity fixes their Editor.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Caliburn.Micro port issues

28 Sep 2017, 19:23

Sooo... just created a fresh project, installed the Noesis Unity package and immediately get 2 warnings and 999+ errors...
Sorry for the confusion but you need to try the 2.1 version (it is in beta because rest of APIs are not ready yet, but the Unity package is quite stable). This is the first version fully compatible with Unity 2017. It is available in the sticky thread but I decided, to avoid future problems with more users, to update the downloads page with a link to it.
 
KeldorKatarn
Topic Author
Posts: 193
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

28 Sep 2017, 19:30

Alright good stuff, that one installs without any issues. And since Unity now posted a temporary workaround for their DNS Server issue I might actually be able to try this again.
Somehow I always have the greatest timing for coming back to things when everbody is either having issues or is juuuust about ready to release the compatible version of something :P
 
KeldorKatarn
Topic Author
Posts: 193
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

28 Sep 2017, 19:38

Ok the first problem, at least when using the 4.6 runtime:

Assets/Caliburn.Micro.Noesis/Scripts/PortableReflectionExtensions.cs(25,22): error CS0121: The call is ambiguous between the following methods or properties: `System.Reflection.IntrospectionExtensions.GetTypeInfo(this System.Type)' and `Noesis.ExtensionMethods.GetTypeInfo(this System.Type)'

Seems you should remove that extension method if you detect the 4.6 runtime since then it already exists?
Caliburn uses that in a couple of places and of course it's used in general reflection code all the time. I guess I can work around it for now by using it like a regular static method on the type itself, but yeah, that will be an issue once people switch to 4.6.
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: Caliburn.Micro port issues

28 Sep 2017, 19:48

Good to know the new version is starting to work fine for you! : D

So... the error about the ambiguous call. As far as I understand (I could be wrong) that's an error inside PortableReflectionExtensions.cs (in Caliburn), you need to properly qualify the call to GetTypeInfo, right? We cannot remove our function, it is being used... we could change the name to avoid the conflict but I don't know if I like that solution... (namespaces were created for cases like this).
 
KeldorKatarn
Topic Author
Posts: 193
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

28 Sep 2017, 20:23

Forget it, for this case it's actually not a problem. I don't need the Noesis namespace in that file at all, so I can just remove the using statement and it uses the .NET version automatically.
But it might still turn into a problem for other people when they use both the System.Reflection namespace AND the Noesis namespace in one code file. Then GetTypeInfo() is ambiguous.
It might be a bit problematic to use that same extension method that the reflection namespace already provides.
I looked into your code and saw the comment explaining WHY you're using it but.. hmm.. not sure how to solve this except tell people who are using reflection not to use both namespaces I guess :/ For my case it isn't a problem at the moment.

I'll look further into what's missing to get the more complicated features of Caliburn working.
 
KeldorKatarn
Topic Author
Posts: 193
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

29 Sep 2017, 18:39

Ok the first problem seems to be that ItemCollection doesn't properly implement the Enumerable interfaces. That way I cannot use the OfType() extension method, not implement such a method myself since I cannot use yield without ItemCollection implementing the IEnumerable interface. I think I can work around that for now but I might run into issues down the road. so this should be fixed.
 
KeldorKatarn
Topic Author
Posts: 193
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

29 Sep 2017, 19:01

The next huge thing, without which a lot in caliburn won't work (for tab controls and item controls, is making this possible:
        public static DataTemplate DefaultHeaderTemplate = (DataTemplate)
#if SILVERLIGHT || WinRT
        XamlReader.Load(
#else
        XamlReader.Parse(
#endif
            "<DataTemplate xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'><TextBlock Text=\"{Binding DisplayName, Mode=TwoWay}\" /></DataTemplate>"
        );
Caliburn uses this to automatically fill a tab or item control with elements which are views automatically resolved from viewmodels.

Is there any way to generate this 1:1 maybe in code? If parsing XAML is not possible? I honestly have never created a datatemplate like this in code, and I don't know if Noesis supports that. From what I know not even .NET supports that. There used to be a way but it's deprecated. Above way of parsing XAML is how you do it in .NET.

Without this basically 50% of caliburn doesn't work.
 
KeldorKatarn
Topic Author
Posts: 193
Joined: 30 May 2014, 10:26

Re: Caliburn.Micro port issues

29 Sep 2017, 19:06

And another thing that I think I mentioned before:
        public static ElementConvention AddElementConvention<T>(DependencyProperty bindableProperty, string parameterProperty, string eventName) {
            return AddElementConvention(new ElementConvention {
                ElementType = typeof(T),
                GetBindableProperty = element => bindableProperty,
                ParameterProperty = parameterProperty,
                CreateTrigger = () => new EventTrigger { EventName = eventName }
            });
        }
The EventName property doesn't exist.

Who is online

Users browsing this forum: Bing [Bot] and 47 guests