Skip to content
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

Doesn't work with .NET Standard project #21

Open
MihaMarkic opened this issue Apr 24, 2017 · 4 comments
Open

Doesn't work with .NET Standard project #21

MihaMarkic opened this issue Apr 24, 2017 · 4 comments

Comments

@MihaMarkic
Copy link

Tried installing from NuGet on a .NET Standard but it wouldn't install (some packages incompatible with .NET Standard it says).
Is this by design?

@m0sa
Copy link
Contributor

m0sa commented Apr 24, 2017

That's because we have a hard dependency on MVC 5 (which is where the actual precompilation name comes from), and it only exists for .NET desktop. Does it fail if you only target net462? e.g.:

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <TargetFrameworks>net462</TargetFrameworks>
  </PropertyGroup>
</Project>

In order to fully support netstandard, we'd have to pull out the MVC 5 parts into a separate package.

To make it work with MVC 6 / vnext / core / standard, all the razor view handling code (CodeDOM -> strings, view engines, etc) would have to be re-implemented.

This will happen if we decide to start moving Stack Overflow to the new MVC version.

@MihaMarkic
Copy link
Author

Ah, OK. I have a feeling it'd be a great tool for AOP on .NET Standard. Luckily Fody is starting to support it.

@xt0rted
Copy link

xt0rted commented May 15, 2017

@m0sa I started trying to get this to work with the razor view engine for NancyFX so abstracting out the mvc parts is of interest to me. Would sure save having to fork the project. I have a roslyn version of the view engine now which runs fine, but I'm getting build errors when the precompilation runs, even with targeting .net 4.6.2.

@m0sa
Copy link
Contributor

m0sa commented Apr 6, 2018

As of de2ede4 / v5.0.0-alpha367 the MVC5 bits have been moved out, and the the precompiler is now self contained and able to cross-compile (the csc.exe replacement is still compiled against net462 since most of the stuff I need is only available in the Microsoft.CodeAnalysis.CSharp.Workspaces.Desktop.dll).

image

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

No branches or pull requests

3 participants