jgalzic
03-27-2007, 12:45 AM
I'm new to Spring.Net and am trying to understand how I could specify a separate resource file name in the app.config. When I call IApplicationContext ctx = ContextRegistry.GetContext() from Main, I get the exception:
InnerException {"InputStream is null from Resource = [assembly [SpringTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null], resource [SpringTest.AppContext.xml]]"} System.Exception {Spring.Objects.Factory.ObjectDefinitionStoreExcep tion}
My app.config looks like:
<spring>
<context>
<resource uri="assembly://SpringTest/SpringTest/AppContext.xml"/>
</context>
</spring>
Contents of AppContext.xml:
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
<description>An example that demonstrates simple IoC features.</description>
<object name="MyMovieLister" type="SpringTest.MovieLister, SpringTest">
</object>
</objects>
I have the AppContext.xml as an embedded resource. Is there anything else I need to do to get this started?
Thanks,
Justin
InnerException {"InputStream is null from Resource = [assembly [SpringTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null], resource [SpringTest.AppContext.xml]]"} System.Exception {Spring.Objects.Factory.ObjectDefinitionStoreExcep tion}
My app.config looks like:
<spring>
<context>
<resource uri="assembly://SpringTest/SpringTest/AppContext.xml"/>
</context>
</spring>
Contents of AppContext.xml:
<?xml version="1.0" encoding="utf-8" ?>
<objects xmlns="http://www.springframework.net">
<description>An example that demonstrates simple IoC features.</description>
<object name="MyMovieLister" type="SpringTest.MovieLister, SpringTest">
</object>
</objects>
I have the AppContext.xml as an embedded resource. Is there anything else I need to do to get this started?
Thanks,
Justin