-
Notifications
You must be signed in to change notification settings - Fork 868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrating our projects from net46 to netstandard 2.0 #1963
Comments
v3.0? |
Hi @vicancy, do you have any particular place you'd prefer that I start? Otherwise, I'm happy to just dive in at the deep end and see where I get up to :) |
Work starting here. |
…Microsoft.DocAsCode.YamlSerialization projects to .NET Standard 2.0. dotnet#1963.
@tintoy Looks cool! |
A couple of tests are failing, but I'm just checking to see if they actually succeed without these changes :) |
@tintoy If you are using VS 15.3 and the tests are Metadata related, it is possibly an env issue with MSBuild, opening All.sln from VS2017 Developer Command can fix it. |
Ah yes, thanks - those are the ones that are failing :) |
All good, with your suggested workaround, all tests pass so far. I'll keep going. |
Ok, bit of a blocker - all dependencies except Nustache support .NET Standard (project seems to be somewhat dead - jdiamond/Nustache#121). I will see if I can find a compatible alternative (the project owner suggests stubble). |
Wow, OK, yak-shaving time. There is no Mustache implementation currently compatible with .NET Standard (any version!). Looks like I'll have to create a .NET Standard port of Nustache (or similar). Anyone else who'd like to help - now's the time to pitch in :) |
Actually, let me see if it'll still run on .NET Standard 2.0 first (I get the usual |
Ok, a more serious blocker: dotnet/roslyn#17968. There's currently no |
…erence, and unit tests to .NET Standard 2.0. dotnet#1963
Have ported everything except CLI, tests, and |
Probably have a solution for https://gist.github.com/tintoy/76b48591e2a34429c1f5c02556b8b4d2#file-program-cs Essentially, we can use an This may not work for every single project out there (e.g. if a project has @vicancy - before I go any further on this can I get some feedback from you on whether you find this approach acceptable? |
@tintoy Sorry for late response. I was on vacation and am back now. I will take a look at it today. |
@vicancy no problem, take your time - I've got plenty of other stuff to keep me busy :) |
@tintoy Thinking of changing from Mustache to Handlebars, https://www.nuget.org/packages/Handlebars.Net/ suports |
Nice - I totally forgot about Handlebars; how compatible is the syntax between the 2? It's been ages since I used Handlebars, but I seem to remember it's basically a superset of Mustache... |
@tintoy It generally compatible with Mustache, the main difference is that it does not search up when context does not found, which is exactly what we expect. There may be other differences that leads to a breaking change (which is my main concern) so I need more time to test before switching. 😢 |
Yeah, I see what you mean, and it looks like there are only a couple of tests for the template processor at the moment. Still, that's the great thing about Xunit theories - write 1 test and then just keep adding test data 😎 |
@tintoy with the 95% support, is this |
It can support it, we just have to use |
(just may not work for every project e.g. the exceptions listed above) |
Ok - I'm about to go camping for the weekend but I'll get onto it early next week :) |
Remove support for project.json (we only support MSBuild-style projects now).
Actually, I'm thinking I might create extension methods for |
Turns out |
Ok turns out it's thread-safe. |
…ble versions of Microsoft.NET.Test.Sdk and Xunit). dotnet#1963
@vicancy would you mind pulling down the latest code from my fork and running the tests? There are a couple I don't understand well enough to work out why they are failing... It's the |
@tintoy Sure, I will take a look |
Hi @tintoy Can build pass with the |
Which project was that? I didn't see any build errors but I was just running tests from within VS. I'll have a look at that first thing tomorrow, should be easy to fix either way. |
I haven't tried porting the main executable yet, only the libraries it depends on. The exe will take some more work because it currently relies on Appdomain but I do have a proposed design that will work cross-platform. In the meanwhile, would you mind trying to run the unit tests ignoring that executable build error? |
BTW, am I correct in assuming that use of Appdomains is mainly to control base path for loading assemblies? If so, |
@tintoy |
Yep that'd be the way :)
They can communicate over STDOUT / STDIN (have code that does this in an
LSP language service that might be helpful). Were you able to run the tests
if you ignore the build error in that project?
…On Thu, 30 Nov. 2017, 4:14 pm Liangying.Wei, ***@***.***> wrote:
@tintoy <https://github.com/tintoy> AppDomain is to isolate assemblies
loaded from plugins. We are thinking of creating a new process instead.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1963 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABkezLKhN6WsValNir-cVI-KBIRe7ac5ks5s7jmngaJpZM4O4ZWH>
.
|
@tintoy I changed |
BTW, here is one way to use an external process to handle assembly loading: https://github.com/tintoy/msbuild-project-tools-server/tree/master/src/LanguageServer.TaskReflection Called from here: |
Hi @tintoy I also meet several kind of ut failures with your changes. However that branch is quite behind the latest branch and contains a lot of changes. I'd like to make small moves step by step for easy debugging and code review, so I am cherry-picking your changes and sending out PR for every commit. |
…Microsoft.DocAsCode.YamlSerialization projects to .NET Standard 2.0. dotnet#1963.
* Migrate Microsoft.DocAsCode.Common, Microsoft.DocAsCode.Plugins, and Microsoft.DocAsCode.YamlSerialization projects to .NET Standard 2.0. #1963. * Some format change
@vicancy - I recently stumbled across Buildalyzer, which seems to have fairly full-featured support for building a Roslyn Might be worth considering? |
Hi @tintoy thank you for the info, I will take a look. With a first glance, it looks like also dependent on |
I think |
|
@tintoy Oh yes, |
Close as v2 is not likely to support it. v3 will. |
https://github.com/dotnet/standard/blob/master/docs/versions/netstandard2.0.md
https://gist.github.com/davidfowl/8939f305567e1755412d6dc0b8baf1b7
Steps:
net461
netstardard2.0
one by oneBlockers:
CallContext
http://www.cazzulino.com/callcontext-netstandard-netcore.html
AppDomain
Support running docfx on .NET Core #138 (comment)
Nustache
to .NET standardThe text was updated successfully, but these errors were encountered: