Login / Register  search  syndication  about

          Kris Halsrud's Blog

Kris Halsrud on development and Integration with CRM and Development

Sage SalesLogix web Build error: The name 'XXX' does not exist in the current context

I have found what appears to be a bug in 7.5.2 and the handling of external assemblies referenced for use in SalesLogix code, like business rules, events, custom properties, etc.  I had a system that had multiple external assemblies handling some global business rules that were shared across multiple entities in the SalesLogix web portal.  After upgrading to 7.5.2 I could no longer do a full build on the system.  I would get the following error:

ERROR - C:\Users\bobo\AppData\Roaming\Sage\Platform\Output\Sage.SnippetLibrary.CSharp\src\Sage.SnippetLibrary.CSharp.@.296d53c4-46bb-4baa-a4f5-44f57dec9720.codesnippet.cs(47,13):The name 'XXX' does not exist in the current context

The rule that uses the assembly does have a reference to the assembly and worked fine in 7.5.1.  I tried removing the reference and re-adding in the business rule.  In the actual code file, the intellisense in the Application Architect code editor detects the assembly and its various classes and methods. However every rule, event, custom property, etc. that uses this external assembly failed with the same error.

CodeFile

I initially realized my external assemblies all had references to the old 7.5.1 Sage references. I recompiled the assembly using the new 7.5.2 Sage dlls as references within it.  This did not help but is an important thing to remember you have to do.

I also tried adding a reference in the codesnippet.xml file (On Win7 this is @ C:\ProgramData\Sage\Platform\Configuration\Global) which I understand is supposed to act like a global assembly reference for all files on the site.  This didn't work either.

I was at my wits end.  By chance I happened to see a warning message that had occurred way up in my build.  That led me to the solution I needed.

As I mentioned,  I think this should be considered a bug. It is really stupid but easy to remedy.

I think that before 7.5.2 when you had external assemblies referenced in code snippets, or whatnot, that when you built, it used the specified reference path to do the build (logical).  Apparently in 7.5.2, while you still need to add the reference to the assemblies in the code files, it apparently does not use that path during the build, or at least all parts of the build.

The simple fix is: any external assemblies need to exist in the SalesLogix\SalesLogix directory (C:\Program Files\SalesLogix\SalesLogix"), regardless of where each code file says the reference location is.  I figured this out because I had a warning message earlier on that said:

Unable to locate assembly reference FX.Gen.dll in assemblies or C:\Program Files\SalesLogix\.

Now, I don't know why this message says this because my assembly is in my output folder's "assemblies" directory (that is where I specified it was in my code file references).  Regardless, simply copy the file to the directory makes it all sing.

This whole assembly reference area seems REALLY kludge to me.  It gets exponentially harder to manage when you are talking about multiple assemblies being added by multiple developers on different computers with different OS and centrally shared using Git.  I hope Sage does something to help with this because I can see that this will be a nightmare for system maintenance and upgrades.

What's This?
Bookmark and Share

About Kris Halsrud

   Kris Halsrud is a Senior Analyst / Developer for Customer FX Corporation.


Related Content
   SalesLogix Cloud- Administration Options- Using Roles
In this webinar the user will learn to manage roles in the SalesLogix Web Client. These options are onl
Posted on Aug 20, 2010 by Dale Richter to Free SalesLogix Training
 
   SalesLogix 7.5.2 Speed Issues - How To Find the Slowdown
At times I have been asked how can I increase the performance of SalesLogix. For systems using SQL2005
Posted on Aug 13, 2010 by Mark Duthoy to SalesLogix Support
 
   SalesLogix Cloud- Administration Options- Creating a New Department
In this webinar we will look at the Administration Options in the SalesLogix Cloud. In this specific webi
Posted on Aug 13, 2010 by Dale Richter to Free SalesLogix Training
 
   SalesLogix Cloud- Administration Options- Creating a New Team
This Administrative webinar will show the user how to create a new Team for ownership of records. This is
Posted on Aug 13, 2010 by Dale Richter to Free SalesLogix Training
 
   Relating Assets to Tickets in SalesLogix Web and SalesLogix Cloud [Video]
In this SalesLogix Training webinar the user will learn how to relate an Asset to a Ticket in SalesLogix
Posted on Aug 12, 2010 by Dale Richter to Free SalesLogix Training
 
Comments

 

Twitter Trackbacks for Sage SalesLogix web Build error: The name 'XXX' does not exist in the current context - Kris Halsrud's Blog [customerfx.com] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 Sage SalesLogix web Build error: The name 'XXX' does not exist in the current context - Kris Halsrud's Blog         [customerfx.com]        on Topsy.com

December 17, 2009 1:39 PM
 

Kris Halsrud's Blog said:

Often when adding custom code to SalesLogix you need to reference Assemblies that are not included by

March 15, 2010 1:24 PM
 

Ron Buchanan said:

Kris,

I can't thank you enough for this post!!!

Its early AM... and I've wasted HOURS trying to figure this one out.

Ron Buchanan

Brainsell - VA

April 25, 2010 11:39 PM

Leave a Comment

(required)  
(optional)
(required)  
Add
All contents Copyright © 2010 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register