<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : *.config not found when running Unit Test</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : *.config not found when running Unit Test</description>
  <pubDate>Sat, 11 Apr 2026 23:55:29 -700</pubDate>
  <lastBuildDate>Wed, 05 Mar 2008 11:26:44 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=711</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>*.config not found when running Unit Test : Yes thanks. I was getting nowhere...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=711&amp;PID=2642#2642</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=59" rel="nofollow">RJayTaylor</a><br /><strong>Subject:</strong> 711<br /><strong>Posted:</strong> 05-Mar-2008 at 11:26am<br /><br />Yes thanks.&nbsp; I was getting nowhere and couldn't figure out why.]]>
   </description>
   <pubDate>Wed, 05 Mar 2008 11:26:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=711&amp;PID=2642#2642</guid>
  </item> 
  <item>
   <title>*.config not found when running Unit Test : Thanks David, you saved my day....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=711&amp;PID=2637#2637</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=265" rel="nofollow">Pooky</a><br /><strong>Subject:</strong> 711<br /><strong>Posted:</strong> 05-Mar-2008 at 12:36am<br /><br />Thanks David, you saved my day.<br><br><br>]]>
   </description>
   <pubDate>Wed, 05 Mar 2008 00:36:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=711&amp;PID=2637#2637</guid>
  </item> 
  <item>
   <title>*.config not found when running Unit Test : We ran into the very same issue...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=711&amp;PID=2633#2633</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 711<br /><strong>Posted:</strong> 04-Mar-2008 at 10:38am<br /><br /><FONT size=2><FONT color=#000080><FONT face=Arial>We ran into the very same issue when we started running our own Unit Tests on our V4 product (which runs only under VS2008).<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></FONT></FONT><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Here’s the code we’re using – you’ll find an Initialize() method in all our V4 Unit Tests.<o:p></o:p></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp; &#091;TestInitialize&#093;<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp; public void Initialize() {<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // With the VS2008 Test framework the AppDomain and base directory will be pointing<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // to the common/ide directory and config file probing will fail if you're using the AppHelper.&nbsp; <o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Here’s a workaround:<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IdeaBladeConfig.ConfigFileAssembly = System.Reflection.Assembly.Load("AppHelper");<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">&nbsp;&nbsp;&nbsp; }<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">Note that the initialization isn’t strictly required in &#091;TestInitialize&#093;, that’s just what we use.<o:p></o:p></SPAN></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT face=Arial color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P><P =Ms&#111;normal><FONT face="Times New Roman" size=3>&nbsp;</FONT></P>]]>
   </description>
   <pubDate>Tue, 04 Mar 2008 10:38:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=711&amp;PID=2633#2633</guid>
  </item> 
  <item>
   <title>*.config not found when running Unit Test : Hello there,I spotted a similar...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=711&amp;PID=2632#2632</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=265" rel="nofollow">Pooky</a><br /><strong>Subject:</strong> 711<br /><strong>Posted:</strong> 04-Mar-2008 at 4:47am<br /><br />Hello there,<br>I spotted a similar problem when using the Persistence Manager in a UserControl during Designtime in another thread. But it seems this problem also occurs when creating Unit Tests with VSTS2008. I have a blank Form and some generated entities in a Model. I tried to write a first Test (I'm working through the Developers Guide). When I try to run the Test, it fails with a IdeaBlade.Util.IdeaBladeException:<br><br>Test method Model.Test.tbl_OETest.FullNameTest threw exception:&nbsp;IdeaBlade.Util.IdeaBladeException: Unable to obtain a validconfiguration file on P1058.<br><br>Probing path: <br>1) File: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe.config - not found<br>2) File: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\MSTest.exe.config - not found<br>3) File: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\vsdiag_regwcf.exe.config - not found<br>4) File: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTestHost.exe.config - not found<br>5) File: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTST-FileConverter.exe.config - not found<br>6) File: C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\IdeaBlade.ibconfig - not found<br>7) Design-time execution detected - Will not probe for app.config or IdeaBlade.ibconfig in AppHelper<br>8) IdeaBlade.ibconfig fallthru - Default IdeaBlade.ibconfig used<br>9) Logging file: <br><br>Stack Trace:<br>IdeaBlade.Util.IdeaBladeConfig.AssertNonDefaultVersion()<br>IdeaBlade.Persistence.PersistenceManager..ctor(Boolean pShouldConnect, String pDataSourceExtension, PersistenceServiceOption pPersistenceServiceOption)<br>IdeaBlade.Persistence.PersistenceManager.get_DefaultManager()<br>Model.Test.tbl_OETest.FullNameTest() in C:\src\VB.NET\Visual Studio 2008\UserDB_ORM\Model.Test\tbl_OETest.vb: line 69<br><br>--&gt;<br>&nbsp;&nbsp;&nbsp; &lt;TestMethod()&gt; _<br>&nbsp;&nbsp;&nbsp; Public Sub FullNameTest()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim pm As PersistenceManager = PersistenceManager.DefaultManager<br>Here it fails when I run the Test<br><br>--&gt;<br>If I call the Test Method in the Form Load Method it works(!)<br>&nbsp;&nbsp;&nbsp; Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Dim testobj As New Model.Test.tbl_OETest<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; testobj.FullNameTest()<br>&nbsp;&nbsp;&nbsp; End Sub<br><br>I can not understand what a Test Class has to do with Designtime, and even if it would, I fail to find a DesignMode Property there to work around this. And even IF it is a Designtime problem, then why does it work in my Form_Load Event? :-)<br><br><br>]]>
   </description>
   <pubDate>Tue, 04 Mar 2008 04:47:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=711&amp;PID=2632#2632</guid>
  </item> 
 </channel>
</rss>