Giter Site home page Giter Site logo

modulexcite / embeddedresourcevirtualpathprovider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mcintyre321/embeddedresourcevirtualpathprovider

0.0 1.0 0.0 398 KB

A custom VirtualPathProvider for IIS - load views and assets from Embedded Resources in referenced assemblies

Home Page: http://www.adverseconditionals.com/2011/07/portable-aspnet-code-using.html

C# 87.43% ASP 6.83% JavaScript 1.35% Pascal 4.38%

embeddedresourcevirtualpathprovider's Introduction

EmbeddedResourceVirtualPathProvider

A custom VirtualPathProvider for IIS - load views and assets from Embedded Resources in referenced assemblies . To get started, install into your ASP.NET web application via nuget:

Install-Package EmbeddedResourceVirtualPathProvider

This will add some code into App_Code registering the provider.

Move views and assets into other assemblies, maintaining folder structure. e.g.

/MyAspNetApp/Views/Thing/Thing.cshtml -> /ThingComponent/Views/Thing/Thing.cshtml

And set the the files BuildAction as EmbbeddedResource. Make sure your assembly is referenced, and you're done!

By default, all assemblies in the appdomain are scanned. You can restrict this in App_Start\RegisterVirtualPathProvider.cs file. You can also map assemblies to their location on disk, so they ca nbe refereshed when you edit the files during development.

There is some help at https://github.com/mcintyre321/EmbeddedResourceVirtualPathProvider/wiki/Help

Dynamic Content Routing

You can set up rules determining the order to check assemblies for resources, letting you (for example) have different view assemblies for different hostnames.

Please check out my other projects!

Cheers, Harry

@mcintyre321

MIT Licenced

Bitdeli Badge

embeddedresourcevirtualpathprovider's People

Contributors

bitdeli-chef avatar djechelon avatar mcintyre321 avatar miguelhughes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.