I’m trying to use Script# 0.7 with MVC 3 using the ScriptSharpSection and all that stuff.
So far I’m doing
@{ Ajax.InitializeScripts();
}
but I get the exception: “The referenced script named ‘loader’ was not registered in configuration as a script.”
I can bypass that exception adding a <script name=”loader” … but I don’t know that scripts has to do.
Is there any example showing how this is done?
Thanks.
I still need to get examples out.
Does your web.config have this:
And do you have the ssloader.js script to go along with it?
The MVC APIs render out scripts that are then downloaded by the script loader while managing dependency order etc. For now it is required. Eventually I need to add couple of things:
required, i.e. it does the
dependency ordering on the server
and renders out vanilla script tags.
functionality implemented in
mscorlib.js as well, if someone is
only loading mscorlib.js and not
ssloader.js.
Hope that explains the current implementation and what will be added in the future to make ssloader.js optional.