Skip to content

React.AspNet is not working with ASP.NET Core 1.0 RC2 #268

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

Closed
ShikiGami opened this issue May 17, 2016 · 7 comments
Closed

React.AspNet is not working with ASP.NET Core 1.0 RC2 #268

ShikiGami opened this issue May 17, 2016 · 7 comments
Labels

Comments

@ShikiGami
Copy link
Contributor

When using React.AspNet in a ASP.NET Core 1.0 RC2 project with a "net451" framework, it gives the error:
The dependency React.AspNet 2.3.0 does not support framework .NETFramework,Version=v4.5.1

@Daniel15
Copy link
Member

Looks like I need to change "dnx451" to something else, although the document explaining these identifiers is super confusing: https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md

Basically I want the package to be compatible with .NET Framework 4.5+ but NOT with .NET Core (as some of the dependencies don't run on .NET Core). "dnx451" used to do that, but I have no idea which one to use now.

@Daniel15 Daniel15 added the Bug label May 20, 2016
@ShikiGami
Copy link
Contributor Author

ShikiGami commented May 20, 2016

It is "net451", but with that alone isn't enough to make it work on RC2, since there are a lot of structural changes.
I actually made a fork and was able to make it compile and I was able to make React.Sample.Mvc6 run on IIS Express, but for some reason Razor doesn't seem to find React.Core assemblies from React.AspNet, the out url became a mess, and it doesn't seem to be creating the nuget package for React.AspNet.
Take a loot at https://github.com/ShikiGami/React.NET

Also another thing, is it really necessary to make React.AspNet a .xproj?, since it isn't using any of the .NETCore libraries and it is only targeting .Net Framework, then I think it maybe would be better to have it as a .csproj

@ShikiGami
Copy link
Contributor Author

Just an update, I was able to make React.Sample.Mvc6 run, but it is giving me an unhandled exception first on var resultJson = engine.CallFunction<string>(function, args); from JavaScriptEngineUtils.cs
After that it seems to run fine.

Since now on RC2 xproj doesn't seem to be creating a nupkg file from a full .NET Framework class library, I transformed into a csproj and tried to make the nupkg the same way the other projects do it, but it seems that there is a bug in the current version of NuGet that gives you an error when you use RC2 Core libraries inside a full .Net Framework project, so still no package.

For more info on this bug take a look at NuGet/Home#2754

@Daniel15
Copy link
Member

What's the exception?

For the xproj not creating a NuGet package, it's probably worth creating a
brand new .NET Core class library and see if that produces a NuGet package
on build. If so, diff the xproj files and see what differs.

Sent from my phone.
On May 20, 2016 9:39 PM, "Shiki Byakko" [email protected] wrote:

Just an update, I was able to make React.Sample.Mvc6 run, but it is giving
me an unhandled exception first on var resultJson =
engine.CallFunction(function, args); from JavaScriptEngineUtils.cs
After that it seems to run fine.

Since now on RC2 xproj doesn't seem to be creating a nupkg file from a
full .NET Framework class library, I transformed into a csproj and tried to
make the nupkg the same way the other projects do it, but it seems that
there is a bug in the current version of NuGet that gives you an error when
you use RC2 Core libraries inside a full .Net Framework project, so still
no package.

For more info on this bug take a look at NuGet/Home#2754
NuGet/Home#2754


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#268 (comment)

@ShikiGami
Copy link
Contributor Author

The exception I'm getting is

An unhandled exception of type 'System.AccessViolationException' occurred in MsieJavaScriptEngine.dll

Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

Right now there doesn't seem to be any way to get xproj to create a NuGet package by itself, but I found out there is a new command called dotnet pack to create packages out of project.json, so I restored React.AspNet as a xproj, and was able to create the packages by adding a postcompile script at project.json, so it is now working, the only problem is the exception which I have no idea what this all about.

@Daniel15
Copy link
Member

Thanks for investigating! Could you please send a pull request with your changes, so I can take a look and merge them in? 😄

@Daniel15
Copy link
Member

Fixed with #271 - Will try to push to NuGet soon.

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

No branches or pull requests

2 participants