<?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 : ANY keyword not working in release</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : ANY keyword not working in release</description>
  <pubDate>Wed, 13 May 2026 14:02:16 -700</pubDate>
  <lastBuildDate>Fri, 18 Nov 2011 11:37:03 -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=3092</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>ANY keyword not working in release :   Great! Thank you very much....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12079#12079</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1120" rel="nofollow">scottarlp</a><br /><strong>Subject:</strong> 3092<br /><strong>Posted:</strong> 18-Nov-2011 at 11:37am<br /><br />Great! Thank you very much. I'll give it a try and let you know if I continue to have a problem.]]>
   </description>
   <pubDate>Fri, 18 Nov 2011 11:37:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12079#12079</guid>
  </item> 
  <item>
   <title>ANY keyword not working in release :    Hi Scott,We&amp;#039;ve created...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12078#12078</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3092<br /><strong>Posted:</strong> 18-Nov-2011 at 11:29am<br /><br /><font size="2">Hi Scott,</font><div><font size="2">&nbsp;</font></div><div><font face="Verdana, Arial, Helvetica, sans-serif"><font size="2">We've created a patch release, 6.1.3.3, to address the problem you encountered.&nbsp; You can download the release here - </font><a href="http://www.ideablade.com/DevForceBetaBuild/DF2010_v6133RTW1_setup.exe" target="_blank"><font size="2">http://www.ideablade.com/DevForceBetaBuild/DF2010_v6133RTW1_setup.exe</font></a><font size="2">.&nbsp; It will be made generally available next week.&nbsp; The fix is to the generated model code, so you'll need to re-save your EDMX or re-run the .tt for your model(s).</font></font></div><div><font size="2"></font>&nbsp;</div><div><font size="2">The problem was that the EntityProperties, which are static fields on the PropertyMetadata defined on each entity type, were not always initialized correctly.&nbsp; In a release build, or when code is optimized, the order of initialization could change in unpredictable ways based on other code in the program.&nbsp; This is why you saw differences between debug and release builds and when code was added or removed, even if that code wasn't executed.&nbsp; When debugging a release build within Visual Studio I suspect that VS&nbsp;disables optimization, which would explain why the problem didn't surface then.&nbsp; When doing a "start without debugging" within VS you will see the problem.</font></div><div><font size="2"></font>&nbsp;</div><div><font size="2">Please give the patch release a try, and let us know if you have any problems.</font></div><div><font size="2"></font>&nbsp;</div><div><font size="2"></font><font size="2"></font>&nbsp;</div>]]>
   </description>
   <pubDate>Fri, 18 Nov 2011 11:29:46 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12078#12078</guid>
  </item> 
  <item>
   <title>ANY keyword not working in release :   Thanks, Scott. This is very,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12073#12073</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3092<br /><strong>Posted:</strong> 16-Nov-2011 at 10:42am<br /><br />Thanks, Scott.&nbsp; This is very, very weird.&nbsp; Will keep you updated on what we find.]]>
   </description>
   <pubDate>Wed, 16 Nov 2011 10:42:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12073#12073</guid>
  </item> 
  <item>
   <title>ANY keyword not working in release :    Ok, I think I&amp;#039;ve got...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12071#12071</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1120" rel="nofollow">scottarlp</a><br /><strong>Subject:</strong> 3092<br /><strong>Posted:</strong> 16-Nov-2011 at 8:05am<br /><br />Ok, I think I've got a nice little example of what's happening. I created a small project against NorthwindIB. Oddly, the problem I'm seeing was worse than what I first ran into. In this example, simply adding a line of that doesn't even execute will change the results of a query. <div>&nbsp;</div><div>To see this in action, set the configuration to release (this will turn off the debug info).</div><div>&nbsp;</div><div>If you run in VS, it works correctly.</div><div>&nbsp;</div><div>If you run the same build (from release folder), it doesn't work.</div><div>&nbsp;</div><div>If you comment out the line where orderID = order.OrderID (even though it never executes), it will work.</div><div>&nbsp;</div><div>Tell me I'm going crazy lol - this has been a nightmare narrowing down.</div><div>&nbsp;</div><div>Scott</div><div>&nbsp;</div><div>&nbsp;<a href="uploads/1120/DFAnyTest.zip" target="_blank">uploads/1120/DFAnyTest.zip</a></div>]]>
   </description>
   <pubDate>Wed, 16 Nov 2011 08:05:54 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12071#12071</guid>
  </item> 
  <item>
   <title>ANY keyword not working in release :   It does sound like caching...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12068#12068</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3092<br /><strong>Posted:</strong> 15-Nov-2011 at 9:41am<br /><br />It does sound like caching is more likely the cause than the build configuration.&nbsp; Is it possible that the DefaultQueryStrategy has been set to CacheOnly or that the QueryInversionMode setting has been changed?&nbsp; I know this doesn't explain the in-Visual Studio vs. out problem either, but I'd first focus more on code paths in the various cases.&nbsp; <div>&nbsp;</div>If you're able to create a new solution which reproduces the problem(s), you can either upload here or send to IdeaBladeSupportTrack for case #11226.]]>
   </description>
   <pubDate>Tue, 15 Nov 2011 09:41:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12068#12068</guid>
  </item> 
  <item>
   <title>ANY keyword not working in release :   Sorry, forgot to answer one...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12064#12064</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1120" rel="nofollow">scottarlp</a><br /><strong>Subject:</strong> 3092<br /><strong>Posted:</strong> 15-Nov-2011 at 7:01am<br /><br />Sorry, forgot to answer one of your questions. I'm running non-distributed in this instance, so everything client side. I also left out an odd piece of information. If I run within VS with any configuration (none, full or pdb-only), it works correctly. Executing the same build from the bin folder produces the problem when not set to full. I love these kinds of problems...&nbsp; :)]]>
   </description>
   <pubDate>Tue, 15 Nov 2011 07:01:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12064#12064</guid>
  </item> 
  <item>
   <title>ANY keyword not working in release :   Thanks for the feedback. I&amp;#039;m...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12063#12063</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1120" rel="nofollow">scottarlp</a><br /><strong>Subject:</strong> 3092<br /><strong>Posted:</strong> 15-Nov-2011 at 6:49am<br /><br />Thanks for the feedback. I'm using 6.1.3.0. I've got so many things in our domain model that I haven't been able to pull enough out to create a simple test project. I did notice during more testing some odd things happening and I think it's related to the cache.<div>&nbsp;</div><div>If I add a line above my query that simply does something like manager.Foremen.ToList(); to force a read of all records, the code runs correctly. If I change that extra line to manager.Foremen.Count(); it returns the correct count, but then the following query goes back to not returning any data.</div><div>&nbsp;</div><div>I also tried spinning up a new manager with the same failed results. I then added .With(QueryStrategy.DataSourceOnly) and it worked. </div><div>&nbsp;</div><div>I traced the database for each of my tests and the same query was produced and manually running the query returned the expected results. I set the debug trace file and could see what I expected to see there also. It should be getting the data best I can tell.</div><div>&nbsp;</div><div>What I don't understand is just the change of Debug Info alters the execution results. I'll try to create a new solution and see if I can narrow it down to something in the project.</div>]]>
   </description>
   <pubDate>Tue, 15 Nov 2011 06:49:04 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12063#12063</guid>
  </item> 
  <item>
   <title>ANY keyword not working in release :   Hi Scott,We haven&amp;#039;t seen...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12058#12058</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 3092<br /><strong>Posted:</strong> 14-Nov-2011 at 4:22pm<br /><br />Hi Scott,<div>&nbsp;</div><div>We haven't seen this problem before.&nbsp; Which version of DevForce are you using, and is this a client-side query or one executed from within a server-side method?</div><div>&nbsp;</div><div>We have seen a problem with Release builds for a model project which contains multiple EDMX files.&nbsp; With this bug the EntityRelations are not always initialized because a static constructor is missing.&nbsp;&nbsp;This surfaces as an exception.&nbsp; You may want to check both client and server debug logs to see if anything unusual is logged.&nbsp;</div>]]>
   </description>
   <pubDate>Mon, 14 Nov 2011 16:22:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12058#12058</guid>
  </item> 
  <item>
   <title>ANY keyword not working in release :   I&amp;#039;ve got an interesting...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12052#12052</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1120" rel="nofollow">scottarlp</a><br /><strong>Subject:</strong> 3092<br /><strong>Posted:</strong> 14-Nov-2011 at 4:52am<br /><br />I've got an interesting problem with DF. I have two tables that I'm querying and get different results just changing the Debug Info for the project. When Debug Info is set to full, it works as I would expect. When set to pdb-only or none, it doesn't work unless I add an extra line.<div>&nbsp;</div><div>Statement looks something like:</div><div>&nbsp;</div><div>var result = manager.Employees.Where(employee =&gt; employee.Foreman.Any(foreman =&gt; foreman.LocationID == locationID)).ToList();</div><div>&nbsp;</div><div>Employee is a list of employees.</div><div>Foreman is a list of employees that are foremen.</div><div>So I'm trying to get back a list of employees that are foremen.</div><div>&nbsp;</div><div>To make this work without full debug info, I have to add a method.</div><div>&nbsp;</div><div><div>var result = manager.Employees.Where(employee =&gt; employee.Foreman.Any(foreman =&gt; foreman.LocationID == locationID)).<strong>Select(employee =&gt; employee)</strong>.ToList();</div><div>&nbsp;</div><div>First example returns x records in debug and zero records (no error, just no results) in no debug. Second example works in both. Problem is trying to remember to add what I would think should be a needless method to the query all over the code unless I don't understand what's happening.</div><div>&nbsp;</div><div>Can you confirm if this is a bug or am I doing something wrong?</div><div>Thanks,</div><div>Scott</div></div>]]>
   </description>
   <pubDate>Mon, 14 Nov 2011 04:52:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3092&amp;PID=12052#12052</guid>
  </item> 
 </channel>
</rss>