2

I have a common solution MyApp. Within this, I have more than 2 projects like MyCommon,MyInclude,MyWeb. I want to place stylesheets,scripts in a common project and refer them in other projects. Now I refer my stylesheets in MyWeb project by adding them in BundleConfig as following:

public static void RegisterBundles(BundleCollection bundles)
{
    bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
                      "~/Scripts/bootstrap.js",
                      "~/Scripts/respond.js"));

    bundles.Add(new StyleBundle("~/Content/css").Include(
                      "~/Content/bootstrap.css",
                      "~/Content/login.css",
                      "~/Content/site.css"));
}

So, Now If I place these login.css,site.css in MyInclude project in MyApp solution and add them to this MyWeb project. How can i do this ? Can anyone help me to do this.. Thanks in advance..

tereško
  • 58,060
  • 25
  • 98
  • 150
KaviSuja
  • 450
  • 1
  • 9
  • 37
  • You really should unversion them from your other projects and simply have them all in one place i.e. MyWeb. If you only need to reference them in certain places you can just have the path on those pages. I am not understanding the real issue I suppose, why not just move all the files to MyWeb? – Zach M. Aug 04 '15 at 15:30
  • I want to put common styles,scripts files in a common project MyInclude and then use it in other multiple projects. So, that's why i want to put these files in common place and refer it from others – KaviSuja Aug 05 '15 at 08:12
  • Well if this is the case perhaps you could keep them in a separate project and write yourself a script to put it in all of your other projects folders, this way they are versioned in one place and able to be deployed to your other locations. – Zach M. Aug 05 '15 at 11:56
  • Take a look this article: http://www.codeproject.com/Articles/842961/Introducing-Dynamic-Bundles-for-ASP-NET-MVC – Sirwan Afifi Aug 06 '15 at 14:43

0 Answers0