Comments (8)
Sorry I'm not sure I understand. How would you propose using this in a non-.NET Core application? This library has dependencies on ASP.NET Core bits so it wouldn't work on full framework either way. There were issues targeting standard with this. Even if it did work it would pull in all sorts of ASP.NET Core dependencies into your non-core project so this is really not an option.
If you want support for full .NET framework for the basic markdown features then take a look at the full framework version:
which you can use in Webforms (for the control) and in MVC/Web API for the Markdown bits.
I suspect you're just after the Markdown parsing functions, in which case I'd recommend you just lift that code out and create a small component of your own in your own application. The meat of this library are the taghelper and the middleware which are ASP.NET Core specific. The Markdown parsing is just the dependency helper.
from westwind.aspnetcore.
You're correct in identifying that its the Markdown parsing integration with ASP.NET Core (e.g. tag helpers) that I want to use.
ASP.NET Core is definitely compatible with .NET Framework 4.7 (Microsoft initially proposed that ASP.NET Core V2 would be .NET Core only, but backed down when the development community protested). I run my ASP.NET Core v2 web app on top of .NET Framework 4.7.
from westwind.aspnetcore.
Sure ASP.NET Core is .NET Standard 2.0 compliant (4.6.1 and 4.7.1 actually), but again - why would you do that?
If you take a dependency on this you will pull in all of the ASP.NET Core MVC dependencies that you can't do anything with in a full framework project. They'd just clutter up your project.
As I said - there is a full framework package that has these same base libraries that you can use for the markdown parsing. Much less overhead with that approach. Same classes.
In fact I would suggest you don't need a package at all - take a dependency on MarkDig and add the parser classes to your project and you're done without any extra dependencies.
from westwind.aspnetcore.
I'm not sure we are on the same page here; I am already pulling in all the ASP.NET Core MVC dependencies as I have an ASP.NET Core MVC project that runs on full framework.
At any rate I have gone ahead with using MarkDig directly.
from westwind.aspnetcore.
Just as another example for a library exclusively targeting ASP.NET Core, I opted for netstandard2.0
for HtmlTags because I had dependencies on ASP.NET or ASP.NET Core bits. All my dependencies were netstandard2.0
so there really wasn't any reason for me to only target netcoreapp2.0
for just a library, even if it was ASP.NET Core 2.0.
I did have to create a completely separate library though from the base HtmlTags
one because it had a dependency on System.Web
that I couldn't remove. So the recommendation was a completely new HtmlTags.AspNetCore
one.
from westwind.aspnetcore.
This should absolutely target netstandard so that folks using ASP.NET Core on .NET Framework can use it. See my Tag Helpers at damianedwards/TagHelperPack for an example.
from westwind.aspnetcore.
Sorry I misunderstood what you were trying to do here. I didn't realize you are in fact running ASP.NET Core under full framework in your own app.
I can't remember now why I switched this project to netcoreapp2.0 - I generally target netstandard for all non-top level projects. But there was some odd dependency problem that caused the code to not compile properly.
I'll go ahead and take another look and see what the issue is - it certainly should work just fine with Netstandard 2.0.
All things considered though - in your case if you just want the simple Markdown parsing features you are better off just referencing Markdig and implementing the parser factory and parser directly.
from westwind.aspnetcore.
I remember now what the issue was at the time why I switched the target - File.ReadAllLinesAsync() didn't work under .NET Standard. I meant to clean that up but at the time just changed the target to Netcoreapp. Anyway fixed the code with explicitly reading a stream and re-target the projects.
// string markdown = await File.ReadAllTextAsync(pageFile);
string markdown;
using (var fs = new FileStream(pageFile, FileMode.Open, FileAccess.Read))
using (StreamReader sr = new StreamReader(fs))
{
markdown = await sr.ReadToEndAsync();
}
Target updates: 624325a
Nuget Packages have been updated for both projects.
from westwind.aspnetcore.
Related Issues (9)
- Custom Middleware add/remove headers HOT 1
- Add licence HOT 2
- Issue with XSS HOT 4
- Change markdown renderer used HOT 2
- Cross site scripting vulnerability HOT 3
- Missing trailing slash causes out of index exception HOT 1
- Markdown now requires trailing slash for subsite HOT 1
- WebUtils.SetUserLocale HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from westwind.aspnetcore.