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

Workaround for compilation problem #3

Closed
davidfowl opened this issue Jul 15, 2016 · 1 comment
Closed

Workaround for compilation problem #3

davidfowl opened this issue Jul 15, 2016 · 1 comment

Comments

@davidfowl
Copy link

davidfowl commented Jul 15, 2016

The problem is a known issue with 1.0.0 and how MVC finds compilation assemblies for class libraries in particular. You can workaround the issue by adding the modules assemblies to the list of compilation assemblies directly.

Replace https://github.com/thiennn/trymodular/blob/master/Modular/src/Modular.WebHost/Startup.cs#L71 with the following:

var mvcBuilder = services.AddMvc()
        .AddRazorOptions(o =>
        {
            foreach (var module in modules)
            {
                o.AdditionalCompilationReferences.Add(MetadataReference.CreateFromFile(module.Assembly.Location));
            }
});
@thiennn
Copy link
Owner

thiennn commented Jul 15, 2016

Yeah, it works

@thiennn thiennn closed this as completed Aug 31, 2016
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

2 participants