{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet-websharper/ui/issues/172","repository_url":"https://api.github.com/repos/dotnet-websharper/ui","labels_url":"https://api.github.com/repos/dotnet-websharper/ui/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/dotnet-websharper/ui/issues/172/comments","events_url":"https://api.github.com/repos/dotnet-websharper/ui/issues/172/events","html_url":"https://github.com/dotnet-websharper/ui/issues/172","id":315898373,"number":172,"title":"First time installing WebSharper and then NuGet of Ui.Next fails with assembly version mismatch","user":{"login":"abelbraaksma","id":16015770,"avatar_url":"https://avatars1.githubusercontent.com/u/16015770?v=4","gravatar_id":"","url":"https://api.github.com/users/abelbraaksma","html_url":"https://github.com/abelbraaksma","followers_url":"https://api.github.com/users/abelbraaksma/followers","following_url":"https://api.github.com/users/abelbraaksma/following{/other_user}","gists_url":"https://api.github.com/users/abelbraaksma/gists{/gist_id}","starred_url":"https://api.github.com/users/abelbraaksma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abelbraaksma/subscriptions","organizations_url":"https://api.github.com/users/abelbraaksma/orgs","repos_url":"https://api.github.com/users/abelbraaksma/repos","events_url":"https://api.github.com/users/abelbraaksma/events{/privacy}","received_events_url":"https://api.github.com/users/abelbraaksma/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-04-19T14:17:50Z","updated_at":"2018-04-24T11:50:48Z","closed_at":"2018-04-24T09:33:44Z","author_association":"NONE","body":"If you're just \"getting started\", that is, \r\n\r\n* first time installation of WebSharper using the VSIX installer, \r\n* create a project \"Websharper 4 Client/Server application\", .NET version 4.7\r\n* Execute suggested command for Ui.Next: ` Install-Package WebSharper.UI.Next -Version 4.2.0.187 `\r\n* Run (F5) the sample code\r\n\r\nThen the browser will show a YSOD with version mismatch on `HmtlAgilityPack`, specifically:\r\n\r\n> `Could not load file or assembly 'HtmlAgilityPack, Version=1.7.1.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)`\r\n\r\nThe NuGet command gives a hint, it shows the following warning:\r\n\r\n> One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'WebSharper.UI 4.2.5.115 constraint: System.Xml.XDocument (>= 4.3.0)', 'WebSharper.UI 4.2.5.115 constraint: HtmlAgilityPack (>= 1.7.1)'\r\n\r\nWhen building, the following warning is displayed:\r\n\r\n> `No way to resolve conflict between \"HtmlAgilityPack, Version=1.7.1.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a\" and \"HtmlAgilityPack, Version=1.6.17.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a\". Choosing \"HtmlAgilityPack, Version=1.7.1.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a\" arbitrarily.`\r\n\r\nAfter which the YSOD comes around, mentioned above.\r\n\r\nHere's the full output from NuGet (VS 2017 Pro, 15.6.6):\r\n\r\n```text\r\nPM> Install-Package WebSharper.UI.Next -Version 4.2.0.187 \r\nAttempting to gather dependency information for package 'WebSharper.UI.Next.4.2.0.187' with respect to project 'Eriks Persoonlijke Gegevens', targeting '.NETFramework,Version=v4.7'\r\nGathering dependency information took 3,45 sec\r\nAttempting to resolve dependencies for package 'WebSharper.UI.Next.4.2.0.187' with DependencyBehavior 'Lowest'\r\nOne or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'WebSharper.UI 4.2.5.115 constraint: System.Xml.XDocument (>= 4.3.0)', 'WebSharper.UI 4.2.5.115 constraint: HtmlAgilityPack (>= 1.7.1)'\r\nResolving dependency information took 0 ms\r\nResolving actions to install package 'WebSharper.UI.Next.4.2.0.187'\r\nResolved actions to install package 'WebSharper.UI.Next.4.2.0.187'\r\nRetrieving package 'WebSharper.UI.Next 4.2.0.187' from 'NuGet official package source'.\r\n  GET https://www.nuget.org/api/v2/package/WebSharper.UI.Next/4.2.0.187\r\n  OK https://www.nuget.org/api/v2/package/WebSharper.UI.Next/4.2.0.187 810ms\r\nInstalling WebSharper.UI.Next 4.2.0.187.\r\nAdding package 'WebSharper.UI.Next.4.2.0.187' to folder 'D:\\Projects\\Test\\packages'\r\nAdded package 'WebSharper.UI.Next.4.2.0.187' to folder 'D:\\Projects\\Test\\packages'\r\nAdded package 'WebSharper.UI.Next.4.2.0.187' to 'packages.config'\r\nExecuting script file 'D:\\Projects\\Test\\packages\\WebSharper.UI.Next.4.2.0.187\\tools\\install.ps1'\r\nSuccessfully installed 'WebSharper.UI.Next 4.2.0.187' to Eriks Persoonlijke Gegevens\r\nExecuting nuget actions took 6,06 sec\r\nTime Elapsed: 00:00:09.6518532\r\n```\r\n\r\nPerhaps I'm doing something wrong, but I think the cycle \"Fresh install of Websharper, then NuGet the Ui.Next package\" should succeed.\r\n\r\nIt won't be too hard to resolve this, I can fix the references I think, but would be nice if this could be resolved.\r\n\r\nI also noticed that this project references a rather older version of FSharp.Core (namely 4.2.3, Aug 19, 2017). Whether that is by design, I don't know, the current RTM version as of this writing is 4.3.4.\r\n\r\nOne resolution that seems to work so far is:\r\n\r\n* Download recent version of HtmlAgilityPack through NuGet (I used 1.8)\r\n* Download recent version of `System.XDocument` through NuGet (I used 4.3)\r\n* Update `web.config` as follows, that is, add a dependency-redirect:\r\n```xml\r\n<dependentAssembly>\r\n   <assemblyIdentity name=\"HtmlAgilityPack\" publicKeyToken=\"bd319b19eaf3b43a\" culture=\"neutral\" />\r\n   <bindingRedirect oldVersion=\"0.0.0.0-1.8.0.0\" newVersion=\"1.8.0.0\" />\r\n</dependentAssembly>\r\n```\r\n\r\n\r\nI don't know if this is the \"proper way\" of resolving this, though. Just experimenting... ;)."},"comment":{"url":"https://api.github.com/repos/dotnet-websharper/ui/issues/comments/383902703","html_url":"https://github.com/dotnet-websharper/ui/issues/172#issuecomment-383902703","issue_url":"https://api.github.com/repos/dotnet-websharper/ui/issues/172","id":383902703,"user":{"login":"abelbraaksma","id":16015770,"avatar_url":"https://avatars1.githubusercontent.com/u/16015770?v=4","gravatar_id":"","url":"https://api.github.com/users/abelbraaksma","html_url":"https://github.com/abelbraaksma","followers_url":"https://api.github.com/users/abelbraaksma/followers","following_url":"https://api.github.com/users/abelbraaksma/following{/other_user}","gists_url":"https://api.github.com/users/abelbraaksma/gists{/gist_id}","starred_url":"https://api.github.com/users/abelbraaksma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abelbraaksma/subscriptions","organizations_url":"https://api.github.com/users/abelbraaksma/orgs","repos_url":"https://api.github.com/users/abelbraaksma/repos","events_url":"https://api.github.com/users/abelbraaksma/events{/privacy}","received_events_url":"https://api.github.com/users/abelbraaksma/received_events","type":"User","site_admin":false},"created_at":"2018-04-24T11:50:48Z","updated_at":"2018-04-24T11:50:48Z","author_association":"NONE","body":"Great! Thanks! "}}
{"actor":{"display_login":"abelbraaksma"}}