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

fix #1272 - add support for refs folder in package installation #1969

Merged
merged 1 commit into from
Feb 6, 2022

Conversation

tvatavuk
Copy link
Contributor

Please add support also for refs folder in package installation.

My understanding is that Microsoft AspNetCore dependencies that are stored in the "refs" folder are an essential part of the default compilation context to support run-time compilation scenarios in https://github.com/2sic/2sxc/ or any other module or app that targets standard Microsoft.NET.Sdk.Web.

In oqtane source development environment, "refs" are deployed by default when Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation nuget is included as project reference and property PreserveCompilationContext is set in csproj.

For oqtane release standalone installations, we need to manually deploy "refs" and that is the reason why it will be great to include it as part of 2sxc oqtane module nuget, and that will make life easier for anyone installing https://github.com/2sic/2sxc/.

@sbwalker
Copy link
Member

@tvatavuk thank you for submitting this PR.... before I merge it I want to understand the difference between the /ref folder (which is supported in the Nuget spec) and the /refs folder (which is created during a .NET publish operation). The fact that they are similarly named and have a similar purpose is very confusing.

@tvatavuk
Copy link
Contributor Author

tvatavuk commented Feb 1, 2022

Thx @sbwalker. Same situation was here. I been there before some time. I will try to share what I find...

Both folders "ref" and "refs" contains "reference assemblies" (dll's with only public interface signature, necessary for compiler, while full concrete implementation are in real dll's_ that are somewhere else).

"ref" in nupkg will contain reference assemblies for dll's that are distributed by that nupkg. Goal is that third party code that has that nupkg as dependency can be compiled, without including full dll's from dependent nupkg.

"refs" is special case, not expected to be used in nupkg, but with Oqtane we expands a lots of boundaries :-), that contains Microsoft.AspNetCore.App.Ref reference assemblies that are needed to compile razor pages (or webapi, cs's) only in run-time, because end user (razor or c# developer) expect to have whole aspnetcore web/razor framework for reuse while eg. running Oqtane based solution.

@sbwalker sbwalker merged commit aa3d2a5 into oqtane:dev Feb 6, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants