Closed georgiosd closed 3 years ago
Seems to be a problem with the package but if you know of any workarounds let me know! https://github.com/dotnet/roslyn/issues/45516
This may be a duplicate of #348 . In effect, we don't directly depend upon Microsoft.CodeAnalysis.CSharp or Microsoft.CodeAnalysis.Common. Instead, we depend upon Microsoft.CodeAnalysis.Razor. But, to be honest, debugging .NET link-load issues is complex because you have to travel all the way up the nuget stack to figure this stuff out.
@jzabroski yes, I noticed all that. But then I removed RazorLight and added the package in question (which on nuget.org appear to have 3.6.0+ versions) and the dotnet core still couldn't find it so I think it's an issue with nuget or the package itself.
@georgiosd It looks like nuget restore
supports a Verbosity detailed flag.
Can you:
nuget.exe
(no parameters) to dump the version info (I have 5.6.0.6591 on my work pc in Amazon Workspaces)nuget.exe restore -Verbosity detailed
(ignore for a second that you should restore via dotnet.exe)dotnet.exe restore --verbosity detailed
. It is possible dotnet.exe restore --verbosity diagnostic
may provide even more info, though I don't know enough about Dotnet/Nuget internals to guess why dotnet.exe wouldn't just pass the same logging configuration through to nuget.exe underlying API.@georgiosd I think this issue might only happen on Mac, which is why I can't reproduce it. It may be a duplicate of #292
I guess, my question is, how can I repro a Mac issue? What's the best practice? I don't own mac any more. Mine fried two years ago and I went Lenovo/Windows 10 Pro due to WSL support letting me run Linux inside Windows. One way would be to move to GitHub Actions for CI/CD and use a Mac host runner type. https://devblogs.microsoft.com/dotnet/continuous-integration-workflow-template-for-net-core-desktop-apps-with-github-actions/ But I am curious as you also run your own software company, what your best practices are?
Thanks for spending time on this @jzabroski !
We make mobile apps also, so while half our team owns a personal Mac, we found that it's often necessary to use an independent box and we have rented a dedicated mac mini for $99/mo. I think there was a cheaper option for $80/mo or so.
If it's something that can be solved with tests, you can definitely use a mac host - https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml
PS: I think it's unlikely to be the runtime because I only have 3.1.5 on my Mac right now, but I will check it
I think it's most likely the mac stuff wasn't packaged correctly by Microsoft (or the macos build stack is non-deterministic in some way). I run another project, FluentMigrator, where I ran into huge issues where System.ComponentModel.DataAnnotations wasnt packaged by EF team in a way that would allow you to write netstandard2.0 assemblies against a 4.7.2 executable. I notice that when packages are not maintained by the "in-box .NET" package set, they drift in packaging standards. It's probably something similar.
Getting a mac mini or similar, not a bad idea. I will check FB Marketplace for cheap refurb. Is there a minimum OS i should run?
@jzabroski yeah if you can keep it at home it's obviously going to be cheaper! We have to have it accessible from anywhere so the online dedi box made sense.
I dont know an awful lot about Mac OS versions but it seems that the earliest offered by MS is 10.14 - I wouldn't go any lower!
I should be able to get a Mac Mini on Sunday for $100 USD. So, realistically, ETA to fix this is at least two weeks out.
Really? That cheap!? Wow. If you're just getting it for this fix, I can probably offer a temp account on our remote machine.
Yeah man. FaceBook Marketplace. I dont know if they have it in Greece but it's pretty sweet way to deal in secondary markets. Sometimes you end up with crap but I'd say it's net saved me money. (I once bought a Dr. Beats metronome on there that after I took it home, realized it didn't actually work correctly.) This Mac Mini is 10.11 but I can use dosdude to upgrade to Mojave.
Very cool indeed! We certainly have it here but I don't use it very much because of quality concerns, but for that price, who can argue :)
Let me know what you find! I'm working from my laptop today so will have to uncomment RazorLight usages
On Wed, Jul 01, 2020 at 18:27:06, John Zabroski < notifications@github.com > wrote:
Yeah man. FaceBook Marketplace. I dont know if they have it in Greece but it's pretty sweet way to deal in secondary markets. Sometimes you end up with crap but I'd say it's net saved me money. (I once bought a Dr. Beats metronome on there that after I took it home, realized it didn't actually work correctly.) This Mac Mini is 10.11 but I can use dosdude to upgrade to Mojave.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub ( https://github.com/toddams/RazorLight/issues/350#issuecomment-652486373 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAMYG5TJB533L2ASU5EP5TLRZNIUVANCNFSM4OLHDUPQ ).
So when adding the Microsoft.CodeAnalysis.CSharp
package I noticed it then complains about Microsoft.CodeAnalysis.Common
package. Then I tried installing that instead and I think the last line is telling:
error: Package 'Microsoft.CodeAnalysis.Common' is incompatible with 'all' frameworks in project
Another interesting fact. Adding RazorLight 1.x works fine. Adding Microsoft.CodeAnalysis.Common
on a fresh project adds 3.0.0. Then adding RazorLight 2.0 fails because it wants > 3.3.0 which cannot be found :S
Until I have a Mac I don't think I can figure out what MSBuild/Nuget is doing to cause you so much headaches.
I know, just adding context :)
A dumb idea, but can you try <RollForward>LatestFeature</RollForward>
and see if that changes the outcome? It shouldn't, but hey...
Nope...
On Fri, Jul 03, 2020 at 17:52:32, John Zabroski < notifications@github.com > wrote:
A dumb idea, but can you try
LatestFeature and see if that changes the outcome? It shouldn't, but hey...— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub ( https://github.com/toddams/RazorLight/issues/350#issuecomment-653583305 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAMYG5UIV64T4NBEZEAD6STRZXWDBANCNFSM4OLHDUPQ ).
@georgiosd I think this is actually related to #360
@jzabroski how could that be true? My project is ASP.NET Core already :S
Hey @jzabroski - what's the status of this? I'm getting a similar error on Windows now with RC2!
Unhandled exception. System.AggregateException: Some services are not able to be constructed (Error while validating the service descriptor 'ServiceType: RazorLight.IEngineHandler Lifetime: Singleton ImplementationType: RazorLight.EngineHandler': No constructor for type 'RazorLight.EngineHandler' can be instantiated using services from the service container and default values.)
---> System.InvalidOperationException: Error while validating the service descriptor 'ServiceType: RazorLight.IEngineHandler Lifetime: Singleton ImplementationType: RazorLight.EngineHandler': No constructor for type 'RazorLight.EngineHandler' can be instantiated using services from the service
container and default values.
---> System.InvalidOperationException: No constructor for type 'RazorLight.EngineHandler' can be instantiated using services from the service container and default values.
This appears to be a different error than the one you previously reported.
Can you please check how you are registering RazorLight with your container?
You're right, I mixed up the issues. I solved this one by doing services.AddSingleton(Options.Create(engine.Options))
@georgiosd As a check - is this original issue now also resolved on MacOS? If yes, for what target frameworks did you confirm it now works. Thank you.
@georgiosd Just wondering if your original issue is resolved? It turns out github actions supports macos images for virtual environments!
https://github.com/actions/virtual-environments/tree/main/images/macos
Forgive me , I haven't checked yet, give me a few days! Happy new year!
On Mon, Jan 04, 2021 at 2:53 AM, John Zabroski < notifications@github.com > wrote:
@ georgiosd ( https://github.com/georgiosd ) Just wondering if your original issue is resolved? It turns out github actions supports macos images for virtual environments!
https:/ / github. com/ actions/ virtual-environments/ tree/ main/ images/ macos ( https://github.com/actions/virtual-environments/tree/main/images/macos )
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub ( https://github.com/toddams/RazorLight/issues/350#issuecomment-753706149 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAMYG5VAVGPZHYZK6VKLWLLSYEGSBANCNFSM4OLHDUPQ ).
@georgiosd I am going to close this now that I merged #407 which covers the build matrix for RazorLight #299
Well done! Happy new year.
On Tue, Jan 05, 2021 at 1:57 AM, John Zabroski < notifications@github.com > wrote:
Closed #350 ( https://github.com/toddams/RazorLight/issues/350 ).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub ( https://github.com/toddams/RazorLight/issues/350#event-4167271928 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAMYG5SNN35IIJLJE3S4QMTSYJIX5ANCNFSM4OLHDUPQ ).
On latest MacOS with dotnet core 3.1.5, a 3.1 project referencing
RazorLight
will fail with:I tried downgrading all the way down to beta1 and it fails with a different error.
Any ideas?