microsoft / XamlBehaviors

This is the official home for UWP XAML Behaviors on GitHub.
MIT License
697 stars 112 forks source link

CI builds fail at runtime with missing Behaviors #129

Open markdav-is opened 7 years ago

markdav-is commented 7 years ago

On our Windows Server CI build server the builds are slightly different from the developer builds on windows 10. Everything compiles fine, but when we run the app, the first page with Behaviors crashes the app with the following error.

The text associated with this error code could not be found. Cannot deserialize XBF metadata property list as 'Behaviors' was not found in type 'Microsoft.Xaml.Interactivity.Interaction'. [Line: 0 Position: 0]

we've gone round and round looking for packages differences or installed SDK difference but can't find anything. here's the packages we are using:

{ "dependencies": { "HockeySDK.UWP": "4.1.6", "Microsoft.EntityFrameworkCore.Sqlite": "1.1.2", "Microsoft.EntityFrameworkCore.Tools": "1.1.1", "Microsoft.NETCore.UniversalWindowsPlatform": "5.3.3", "Microsoft.Toolkit.Uwp.UI.Controls": "1.4.1", "Microsoft.Xaml.Behaviors.Uwp.Managed": "2.0.0", "MvvmLight": "5.3.0", "MvvmLightLibs": "5.3.0", "Newtonsoft.Json": "10.0.2" }, "frameworks": { "uap10.0": {} }, "runtimes": { "win10-arm": {}, "win10-arm-aot": {}, "win10-x86": {}, "win10-x86-aot": {}, "win10-x64": {}, "win10-x64-aot": {} } }

knohr commented 7 years ago

@nohorse and I were able to get the build system up and running, and this issue can be closed.

Tl:DR: This was a project that started prior to VS2017. This issue was solved by updating the .csproj file to VS2017 format, and targeting specifically the x64 platform when invoking msbuild from the build server.

The giveaway was that within csproj we defined <Project ToolsVersion="14.0", as of the time of this post the correct ToolsVersion is 15.0.

For anyone that is seeing similar behavior, I highly recommend this post http://www.natemcmaster.com/blog/2017/01/19/project-json-to-csproj/