Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Myriad of Conflicts: Everything SignalR Core wants is >= 4.3.0 Everything Universal App wants is = 4.0.10 #1234

Closed
juansuerogit opened this issue Dec 19, 2017 · 44 comments

Comments

@juansuerogit
Copy link

juansuerogit commented Dec 19, 2017

How do I add Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final to a windows universal project ?
There are a Myriad of Conflicts: Everything SignalR Core wants is >= 4.3.0 Everything Universal App wants is = 4.0.10

I set my Target Version Min and Max both to Windows 10 Fall Creators Update as advised here:
https://developercommunity.visualstudio.com/content/problem/93522/uwp-uap10015063-not-compatible-with-net-standard-2.html

But everytime i add Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final from Nuget
it always rejects and rolls back my change because of the following errors
im getting about 20 errors ( 1 at a time ) that all follow the same pattern:

Version conflict detected for System.Collections. Reference the package directly from the project to resolve this issue.

Assembly-CSharp -> Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final -> Microsoft.AspNetCore.SignalR.Client.Core 1.0.0-alpha2-final -> Microsoft.AspNetCore.Sockets.Abstractions 1.0.0-alpha2-final -> System.Threading.Tasks.Channels 0.1.0-alpha-001 -> NETStandard.Library 1.6.1 -> System.Collections (>= 4.3.0)

Assembly-CSharp -> Microsoft.NETCore.UniversalWindowsPlatform 5.0.0 -> Microsoft.NETCore.Runtime 1.0.0 -> Microsoft.NETCore.Runtime.CoreCLR-arm 1.0.0 -> System.Collections (= 4.0.10).

Its complaining that Signalr Requires a greater version than windows universal requires.
since windows universal always use the "=" sign and signalr always use the ">=" sign this goes on for about 20 components. ( listed below )

In order for me to experiment and get past the error, i choose to manually add each time and choose the one that satisfied windows universal.

this produces a project.json that looks like this:

{
"dependencies": {
"Microsoft.NETCore.UniversalWindowsPlatform": "5.0.0",
"System.Collections": "4.0.10",
"System.Diagnostics.Contracts": "4.0.0",
"System.Diagnostics.Debug": "4.0.10",
"System.Diagnostics.Tools": "4.0.0",
"System.Diagnostics.Tracing": "4.0.20",
"System.Globalization": "4.0.10",
"System.Globalization.Calendars": "4.0.0",
"System.IO": "4.0.10",
"System.ObjectModel": "4.0.10",
"System.Private.Uri": "4.0.0",
"System.Reflection": "4.0.10",
"System.Reflection.Extensions": "4.0.0",
"System.Reflection.Primitives": "4.0.0",
"System.Resources.ResourceManager": "4.0.0",
"System.Runtime": "4.0.20",
"System.Runtime.Extensions": "4.0.10",
"System.Runtime.Handles": "4.0.0",
"System.Runtime.InteropServices": "4.0.20",
"System.Text.Encoding": "4.0.10",
"System.Text.Encoding.Extensions": "4.0.10",
"System.Threading": "4.0.10",
"System.Threading.Tasks": "4.0.10",
"System.Threading.Timer": "4.0.0"
},
"frameworks": {
"uap10.0.16299": {}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}

finally when all those errors are solved i get the following large error:
Detected package downgrade: System.Collections from 4.3.0 to 4.0.10. Reference the package directly from the project to select a different version.
Assembly-CSharp -> Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final -> Microsoft.AspNetCore.Sockets.Client.Http 1.0.0-alpha2-final -> Newtonsoft.Json 10.0.1 -> System.Collections (>= 4.3.0)
Assembly-CSharp -> System.Collections (>= 4.0.10)
Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.10. Reference the package directly from the project to select a different version.
Assembly-CSharp -> Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final -> Microsoft.AspNetCore.Sockets.Client.Http 1.0.0-alpha2-final -> Newtonsoft.Json 10.0.1 -> System.Diagnostics.Debug (>= 4.3.0)

goes on for about 20 errors.

How do I add Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final to a windows universal project so i can run it on the hololens?

@juansuerogit
Copy link
Author

so now im trying new things. I upgraded my project to universal 6.0 ( apparrently universal 5.0 was the project i was working with. ) but now its breaking with the following error...

------ Rebuild All started: Project: Assembly-CSharp, Configuration: Debug ARM ------
1> Running SerializationWeaver...
1> System.Exception: Package directory not found: "C:\Users\fogbr.nuget\packages\Microsoft.NETCore.Platforms\2.0.0".

when i check my C:\Users\fogbr.nuget\packages\microsoft.netcore.platforms
directory i see
C:\Users\fogbr.nuget\packages\microsoft.netcore.platforms\2.1.0-preview1-26007-02
C:\Users\fogbr.nuget\packages\microsoft.netcore.platforms\2.0.0-preview2-25405-01
C:\Users\fogbr.nuget\packages\microsoft.netcore.platforms\1.1.0
C:\Users\fogbr.nuget\packages\microsoft.netcore.platforms\1.0.1
C:\Users\fogbr.nuget\packages\microsoft.netcore.platforms\1.0.0

but no C:\Users\fogbr.nuget\packages\Microsoft.NETCore.Platforms\2.0.0

so i added the nuget package Microsoft.NETCore.Platforms 2.0.0 to both my windows universal projects
but its still looking for that directory thats still missing.

@acjh
Copy link

acjh commented Dec 19, 2017

Run nuget restore from Command Prompt.

@juansuerogit
Copy link
Author

1>------ Rebuild All started: Project: Assembly-CSharp, Configuration: Debug ARM ------
1> Running SerializationWeaver...
1> System.Exception: Package directory not found: "C:\Users\fogbr.nuget\packages\Microsoft.NETCore.Platforms\2.0.0".
1> at UnityEditor.Scripting.Compilers.NuGetPackageResolver.Resolve()
1> at Unity.NuGetAssemblyResolver..ctor(String projectLockFile)
1> at usw.Weaver.ReaderParameters(String assemblyPath, ConversionOptions options)
1> at usw.Weaver.Weave()
1> at usw.Program.RunProgram(ConversionOptions options)
1> at usw.Program.Main(String[] args)
1>C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\Assembly-CSharp.csproj(350,5): error MSB3073: The command ""C:\org\projects\MRTraining\src\srunity2\App\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\bin\ARM\Debug\Unprocessed\Assembly-CSharp.dll" "-pdb" "-verbose" "-unity-engine=C:\org\projects\MRTraining\src\srunity2\App\srunity2\Unprocessed\UnityEngine.CoreModule.dll" "C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\obj\ARM\Debug\ARM\Debug" "-lock=C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\project.lock.json" "@C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\SerializationWeaverArgs.txt" "-additionalAssemblyPath=C:\org\projects\MRTraining\src\srunity2\App\srunity2\Unprocessed" "-unity-networking=C:\org\projects\MRTraining\src\srunity2\App\srunity2\Unprocessed\UnityEngine.Networking.dll"" exited with code 1.
2>------ Rebuild All started: Project: srunity2, Configuration: Debug ARM ------
2>CSC : error CS0006: Metadata file 'C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\bin\ARM\Debug\Assembly-CSharp.dll' could not be found
========== Rebuild All: 0 succeeded, 2 failed, 0 skipped ==========

@juansuerogit
Copy link
Author

1>C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\Assembly-CSharp.csproj(350,5): error MSB3073: The command ""C:\org\projects\MRTraining\src\srunity2\App\Unity\Tools\SerializationWeaver\SerializationWeaver.exe" "C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\bin\ARM\Debug\Unprocessed\Assembly-CSharp.dll" "-pdb" "-verbose" "-unity-engine=C:\org\projects\MRTraining\src\srunity2\App\srunity2\Unprocessed\UnityEngine.CoreModule.dll" "C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\obj\ARM\Debug\ARM\Debug" "-lock=C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\project.lock.json" "@C:\org\projects\MRTraining\src\srunity2\App\GeneratedProjects\UWP\Assembly-CSharp\SerializationWeaverArgs.txt" "-additionalAssemblyPath=C:\org\projects\MRTraining\src\srunity2\App\srunity2\Unprocessed" "-unity-networking=C:\org\projects\MRTraining\src\srunity2\App\srunity2\Unprocessed\UnityEngine.Networking.dll"" exited with code 1.

@analogrelay
Copy link
Contributor

There's a lot going on here, and it seems to be coupled to using Unity (which isn't a scenario we've done any work on supporting). Can you verify the minimal repro for this? Does it repro when adding the SignalR client to a clean Unity Project in Visual Studio?

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

  1. Using a basic unity project with a cube in the middle and no scripts, i build it and generates a couple of windows universal projects.

  2. one of them is a class library referenced by the other. i then go to nuget and add the signalr core client package to the universal class library

  3. It rolls itself back because of version conflicts.
    ( fyi signalr core 2.0 is targetted to .net standard 2.0 )

  4. i try to change the min and max version on the universal projects to windows fall creators update in the project settings. then add the signalr core packages. that fails.

  5. i try to satisfy the version conflicts between what universal is asking for and what signalr by manually adding what universal is asking for. after going through each conflict one at a time the final conflict is signalr now is not happy.

  6. I tried upgrading the universal projects from universal 5 to universal 6 then that fails because it cant find "C:\Users\fogbr.nuget\packages\Microsoft.NETCore.Platforms\2.0.0".

  7. tried to manually download the nuget for Microsoft.NETCore.Platforms 2.0.0 and add a .zip extension to unzip it and manually add it to the C:\Users\fogbr.nuget\packages folder. then comes another error.

  8. so desperate now that i going down the line of every point version of universal nuget packages starting with the latest one to see if it wil magically match with signalr core nuget ( e.g. not version conflict on the dependencies )

@analogrelay
Copy link
Contributor

Can you confirm what version of Unity you're using? As I mentioned in #1228, it appears Unity doesn't yet support .NET Standard 2.0 libraries, but will in the upcoming 2018.1 release.

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

Unity 2017.2.0p2-MRTP5 the one told to use at https://holodevelopers.slack.com/
to build applications for the hololens.
im trying now with the new version of unity still installing ( new unity Unity2017.2.0f3 ) came out today

ultimately this is a hololens application

I initially failed many times trying to build a .net 4.6.1 classlibrary and adding signalr core there first
and then importing that into unity in the plugins directory. that never made it to generating the universal projects but it did work inside the unity editor itself as you can see here
https://drive.google.com/open?id=1CZ7R29fylD5cKphn9jMQAKFFOGoRdwpj

@analogrelay
Copy link
Contributor

analogrelay commented Dec 19, 2017

Adding SignalR to a .net 4.6.1 class library first isn't any different. The SignalR client libraries are not supported by Unity 2017.2 at all as they require a platform that supports .NET Standard 2.0 and Unity 2017.2 does not support that platform. Referencing them "via" a .NET 4.6.1 doesn't solve the problem as Unity still has to be able to load the SignalR client libraries themselves and it can't. Once 2018.1 is out, SignalR should be supported there, and if you run in to problems with that, we can investigate further. Until then, there isn't really anything we can do to help here, the problem is in Unity.

I'm closing this issue, but feel free to continue discussion. There's nothing we can do right now to fix this issue until Unity is updated.

@juansuerogit
Copy link
Author

yeah but can you give me any insight into why this clashed with a generated visual studio project.
Ultimately the ball is back in microsoft court if they use your technology to create a msbuild file and add dependencies to it.

@juansuerogit
Copy link
Author

ultimately this is a visual studio solution with 2 universal projects that i cant add signalr to no?

@analogrelay
Copy link
Contributor

There may be an issue with how this is handled by the Universal project system, but that's beyond our ability to help you with :). That would be feedback best given via https://developercommunity.visualstudio.com/ so that the team responsible for that can see it.

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

yeah but signalr is asking for System.Collections (>= 4.3.0)
and windows universal wants System.Collections (==4.0.10)

they are going to tell me to come back here no?

@analogrelay
Copy link
Contributor

I see, I missed that in the issue above. That is being brought in by the pre-release corefx components we're using. It's possible they don't support UWP currently (as we don't currently verify the client on UWP; it's planned for release, but we haven't gotten there yet). I'll do a little more investigation and see what I can find.

@juansuerogit
Copy link
Author

ill keep trying trial and error here because i have a hard requirement to run signalr on linux in order to move it from on premises to the cloud in docker containers.

@analogrelay
Copy link
Contributor

Hmm, you seem to still have a reference to the UWP 5.0 runtime in your package graph. UWP 5.0 does not support .NET Standard 2.0 (and thus SignalR Core). I believe you need to use UWP 6.0. I would have expected VS to update you when you changed your Target Version but I don't know if there's an issue in that project system.

I created a new UWP project targetting Windows 10 Fall Creators Update and in the NuGet package dialog it shows that I have UWP 6.0 installed. When I install Microsoft.AspNetCore.SignalR.Client into that project, it succeeds without any issue.

Have you checked if you can update the Microsoft.NETCore.UniversalWindowsPlatform package? SignalR appears to be compatible with version 6.0.5 (the latest)

@juansuerogit
Copy link
Author

bathroom break.. when i come back .. ill start from a clean unity 2017.3.0f3 build it and then set the csprojects to use version 6.0.5 of universal .. i think i tried that and that didnt work either.

@analogrelay
Copy link
Contributor

You'll likely get the issue you posted later in this thread about SerializationWeaver failing. That's a Unity component so I would expect it to fail until you are able to run Unity 2018.1.

@juansuerogit
Copy link
Author

first try adding Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final
to generated unity Unity2017.2.0f3 windows universal project.
(generated projects still use universal 5.0)

Restoring packages for C:\org\projects\MRTraining\src\srnewunity\App\GeneratedProjects\UWP\Assembly-CSharp\project.json...
Package Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240). Package Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final supports: netstandard2.0 (.NETStandard,Version=v2.0)
... more of the same errors
Package restore failed. Rolling back package changes for 'Assembly-CSharp'.

I will upgrade both projects to universal 6.0.5 (the latest) and try again

@juansuerogit
Copy link
Author

ok so upgrading to universal 6.0.5 i could build without Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final
but then when i add signalr i get a rollback again...
Package Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final is not compatible with uap10.0.10240 (UAP,Version=v10.0.10240). Package Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final supports: netstandard2.0 (.NETStandard,Version=v2.0)

no sign of serialization weaver <--

ill change the min and max version on the universal project
and try again.

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

so now i changed the min and max target version in the project settings to both target Windows Fall Creators Update build 16299

1> Running SerializationWeaver...
1> System.Exception: Package directory not found: "C:\Users\fogbr.nuget\packages\Microsoft.NETCore.Platforms\2.0.0".

2>CSC : error CS0006: Metadata file 'C:\org\projects\MRTraining\src\srnewunity\App\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll' could not be found

But at some point im able to get passed this and then it becomes a version conflict issue between universal and signalr

@juansuerogit
Copy link
Author

i downgrade to the min and max targets on both universal 6.0.5 projects to
Windows 10 Creators Update Build 15063

and now i get 2>C:\org\projects\MRTraining\src\srnewunity\App\srnewunity\App.cs(56,13,56,71): warning CS0618: 'ApplicationView.SuppressSystemOverlays.set' is obsolete: 'Use the TryEnterFullScreen method and IsFullScreenMode property instead of SuppressSystemOverlays. For more info, see MSDN.'

before even adding Signalr Core nuget.

But like i said after much trial and error i find a combination that works and then it becomes Signalr Vs. Universal
where signalr is asking for System.Collections (>= 4.3.0)
windows universal wants System.Collections (==4.0.10)

@juansuerogit
Copy link
Author

next i will try setting the Universal project settings to 14393 which is the same number of the windows 10 running on the hololens.

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

so now i get ( without adding signalr core yet )

1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\NuGet\15.0\Microsoft.NuGet.targets(186,5): error : Your project is not referencing the "UAP,Version=v10.0.14393" framework. Add a reference to "UAP,Version=v10.0.14393" in the "frameworks" section of your project.json, and then re-run NuGet restore.

so im instead going to pick that from unity 3d and regenerate the project cause i dont know how to edit those files.

But like i said after much trial and error i find a combination that works and then it becomes Signalr Vs. Universal
where signalr is asking for System.Collections (>= 4.3.0)
windows universal wants System.Collections (==4.0.10)

@analogrelay
Copy link
Contributor

analogrelay commented Dec 19, 2017

It sounds like these are issues with UWP 6.0 compatibility with Unity and HoloLens then. SignalR Core requires UWP 6.0 and the Fall Creators Update in order to run. If you have to downgrade UWP below 6.0 in order to get things to work, it's expected that SignalR Core wouldn't work, since we are unable to run on that platform. Eventually, Unity will be updating to support .NET Standard 2.0 and I expect that will allow SignalR to run (if not, we can reevaluate then) but until that happens, SignalR is not supported in Unity.

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

well lets see because im thinking at some point we find a combination that gets away from some details in your answer and then its not ( universal cant run .net standard and therefore cant run signalr core... it becomes more universal could run signalr if signalr werent asking for System.Collections (>= 4.3.0) and would be fine with System.Collections (==4.0.10) )

or for example if universal would use the >= sign.
maybe this post helps the universal and signalr team come closer together before official signalr launch who knows.

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

Isnt the hololens "the worlds first holographic computer"? wouldnt signalr want to play from there?
Hololens is a enterprise computing device at the current price point and enterprises like to use the .NET Stack they are addicted to it politically. What happens if a large oil company that wants to use hololens runs into these issues and cant solve then dumps signalr to use socket.io and starts marching away from the .net platform as a whole? And what about IoT? Im sure the devices out there could run the signalr-client from node.js running on ARM32. If they cant get the hololens to work they might dump signalr there too? go for socket.io and move thier infrastructure to linux and find another holographic headset.

I know signalr core is in alpha but people are making these decisions right now and putting stuff on road maps from R and D demos internally

@analogrelay
Copy link
Contributor

for example if universal would use the >= sign.

It's not that simple. System.Collections isn't a traditional NuGet package, it's just the compilation references needed to compile for a specific version of the Runtime. If you look inside the package, there are no DLLs in the lib folder (which is what gets loaded at runtime), only in the ref folder (which are only used when compiling). So even if the universal package changed to support the higher version of the package, you'd now get a runtime error because APIs that your application requires aren't actually present.

Isnt the hololens "the worlds first holographic computer"? wouldnt signalr want to play from there?

We'd love to work in all sorts of places. That's why SignalR Core uses .NET Standard 2.0. However, .NET Standard libraries only work on platforms that support the right versions of the .NET Standard. Unity doesn't currently support .NET Standard 2.0 but will in their next release. Once the next release of Unity (2018.1) comes out, you should be able to use SignalR Core on it. If you're still having this compatibility issue after upgrading to Unity 2018.1, then we can reopen this and investigate further.

I'm still not clear if you're seeing an issue in a plain UWP 6.0 app (with no Unity, since as I said above, Unity does not support SignalR Core today)

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

i totally appreciate your support hope i dont come off too tough or newb or anything other than just trying to push forward. its not that simple for me either.. my client is not going to understand anything of the above.. they only hear the sales pitches. and jargon like "windows universal" "cross platform .net" "mixed reality" "incredibly simple to add real-time web functionality" "unity" ... My wife is not going to get it either... having spent 3K on the holographic "toy".. and 24/7 probono time on a project that makes no money cause of issues i cant even explain fully to myself... I have to keep pushing forward to the bitter end.

@juansuerogit
Copy link
Author

Running SerializationWeaver...
1> System.Exception: Package directory not found: "C:\Users\fogbr.nuget\packages\Microsoft.NETCore.Platforms\2.0.0".

Do you know how to get this installed manually. When i add it via nuget in the projects it still doesnt appear globally

@analogrelay
Copy link
Contributor

Do you know how to get this installed manually

Installing that manually is just going to bring up another pile of errors. The only solution to that issue is for Unity to update to support .NET Standard 2.0, which they are doing in 2018.1

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

sorry for being pushy but is it a pile of errors i could sit here and manually plow through ? im ok if i have to do this 50 times if after the 50th time i can connect to my signalr core demo server and get hello world up on the hololens ( i know its not supported )

i have a vague understanding that i could do the next step and i could get something working if i do the next step all the way down some dependency chain .

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

the interesting thing is my computer already has C:\Users\fogbr.nuget\packages\microsoft.netcore.platforms\2.0.0-preview2-25405-01

but not C:\Users\fogbr.nuget\packages\Microsoft.NETCore.Platforms\2.0.0
and adding it via nuget to the project doesnt install that particular directory in my global nuget path

@juansuerogit
Copy link
Author

i found something at https://www.nuget.org/packages/Microsoft.NETCore.Platforms/2.0.0 and doing a manual download

@juansuerogit
Copy link
Author

I was breifly getting a message from the build saying windows universal wants >= MS.NetCore.Platforms <= 2.0.1 but thats cause i added it via nuget package manager in visual studio. I took that reference out and just added it manually to the global nugets. and now ive evolved to another error

1> Running SerializationWeaver...
1> System.Exception: Package directory not found: "C:\Users\fogbr.nuget\packages\NETStandard.Library\2.0.1".

so going to get that one manually and see how this plays out.

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

ok got past the SerializationWeaver stage...
and my classlibrary built ( w/o signalr core yet )
========== Rebuild All: 1 succeeded, 1 failed, 0 skipped ==========

Now im getting..
2> Running AssemblyConverter...
2> System.InvalidOperationException: Sequence contains more than one matching element
2> at System.Linq.Enumerable.Single[TSource](IEnumerable1 source, Func2 predicate)
2> at Unity.ModuleContext.GetCorLibMethod(TypeReference type, Func`2 predicate)
2> at Unity.ModuleContext.GetCorLibMethod(String typeFullName, String methodName)
2> at Unity.AddMethodUtilityClassStep.WSA_AddInvokeDefaultConstructorMethod(TypeDefinition type)
2> at Unity.AddMethodUtilityClassStep.ProcessModule()
2> at Unity.ModuleStep.Execute()
2> at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
2> at Unity.Operation.Execute()
2> at Unity.Program.Main(String[] args)

@juansuerogit
Copy link
Author

Ok so downgraded the projects back to universal 5.4.1 and keeping the min max target set to 16999 yeilds

2> Failed to fix references for method System.Void UnityEngine.Networking.NetworkCRC::ReinitializeScriptCRCs(System.Reflection.Assembly)
2> Failed to fix references for type UnityEngine.Networking.NetworkCRC
2> System.Exception: Failed to resolve System.Reflection.BindingFlags
2> at Unity.ModuleContext.Retarget(TypeReference type, GenericContext context)
2> at Unity.ModuleContext.Retarget(MethodReference method, GenericContext context)

@analogrelay
Copy link
Contributor

analogrelay commented Dec 19, 2017

Unless you can build a whole new version of the Unity engine, plowing through the errors isn't going to solve the problem. Even if you get to 0 errors, it's going to fail or do weird things at runtime because the Unity runtime does not support .NET Standard 2.0. That's not something anyone other than Unity can fix (and they are fixing it in the next release).

To my knowledge, there is no way you're going to be able to make this work. Unity simply isn't compatible yet. They're working on it, but it's not there yet. This isn't something I can help with, as I have no experience with how the Unity engine is built and it's not a Microsoft product. Maybe people over at Unity can help, but I expect their response to be to tell you to wait for 2018.1 to be released.

@juansuerogit
Copy link
Author

ok. at windows universal 5.3.3 im able to add Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final without a roll back
i dont even want to press build im scared.

@juansuerogit
Copy link
Author

i just built the classlibrary now gonna go try the parent project #fingersCrossed

@juansuerogit
Copy link
Author

#fail...
2> Running AssemblyConverter...
2> Failed to fix references for method System.Void UnityEngine.Networking.NetworkCRC::ReinitializeScriptCRCs(System.Reflection.Assembly)
2> Failed to fix references for type UnityEngine.Networking.NetworkCRC
2> System.Exception: Failed to resolve System.Reflection.BindingFlags
2> at Unity.ModuleContext.Retarget(TypeReference type, GenericContext context)

ok now on to windows universal 5.3.2

@juansuerogit
Copy link
Author

juansuerogit commented Dec 19, 2017

ok made it down to universal 5.1 with no reports of dependency conflict with Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final

but all the way through getting the Running AssemblyConverter... System.Exception: Failed to resolve System.Reflection.BindingFlags

until i got to universal 5.1 now im getting..
System.Reflection.Emit.ILGeneration 4.3.0 provides a compile-time reference assembly for System.Reflection.Emit.ILGeneration on UAP,Version=v10.0.16299, but there is no run-time assembly compatible with win10-x86-aot.
Package restore failed. Rolling back package changes for 'Assembly-CSharp'.

so now i can maybe downgrade from 16299 target down to 15063 windows creators update

Ill create a new project generation from unity3d for that

@juansuerogit
Copy link
Author

wow almost there.... so heres the potential winning combination.

  1. min and max target of Windows 10 Fall Creators Update Build 16299

  2. Microsoft.NETCore.UniversalWindowsPlatform 5.2.2 from nuget in VS

  3. Microsoft.AspNetCore.SignalR.Client 1.0.0-alpha2-final from nuget in VS

  4. manually download Microsoft.NETCore.Platforms 2.0.0, add .zip extension and copy and paste into
    C:\Users\fogbr.nuget\packages\Microsoft.NETCore.Platforms\2.0.0

  5. manually download NETStandard.Library 2.0.1, add .zip extension and copy and paste into
    C:\Users\fogbr.nuget\packages\NETStandard.Library\2.0.1

  6. Rebuild
    output....
    1> Running SerializationWeaver...
    1> SerializationWeaver done.

2> Running AssemblyConverter...
2> AssemblyConverter done.

2> Modifying AppxPackagePayload
========== Rebuild All: 2 succeeded, 0 failed, 0 skipped ==========

  1. pray it makes it to the hololens.

@juansuerogit
Copy link
Author

juansuerogit commented Dec 20, 2017

3>------ Deploy started: Project: srnewunity, Configuration: Debug x86 ------
DEP3321: To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.16299.0 or higher. You currently are running version 10.0.14393.1944. Please update your OS, or change your deployment target to a device with the appropriate version.
========== Build: 2 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========

Dang it!!!!! And no updates available for the hololens.
Lets see what downgrading min and max on the universal projects will bring. 10.0.14393.1944

do you know when the hololens will provide or can i manually update somehow to running Windows Universal Runtime version 10.0.16299.0?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants