Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MVC 4 Cannot locate "Scripts" folder

I have problem with my project folder "Scripts". For some reason when I run the program in VS 2012, it gives me the exception:

Invalid file name for file monitoring: 'c:\users\user\documents\visual studio 2012\Projects\project1\project\Scripts'. Common reasons for failure include: - The filename is not a valid Win32 file name. - The filename is not an absolute path. - The filename contains wildcard characters. - The file specified is a directory. - Access denied.

Cannot load the .js files in it. Why is that happening? (Just to mention that I tried restarting and clearing the Temp folder).

Edit: This is the code that throws the exception.

        bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                    "~/Scripts/jquery-{version}.js"));

        bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
                    "~/Scripts/jquery-ui-{version}.js"));

        bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                    "~/Scripts/jquery.unobtrusive*",
                    "~/Scripts/jquery.validate*"));
        bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
                    "~/Scripts/modernizr-*"));
like image 276
Daniel Donev Avatar asked May 13 '26 10:05

Daniel Donev


1 Answers

I created new project with Basic template. It fixes the problem. (The previous project template was "Empty"). :)

like image 52
Daniel Donev Avatar answered May 15 '26 00:05

Daniel Donev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!