Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Tuesday, November 26, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix .NET Extensions
Forum to discuss the use of .NET Extensions in SalesLogix version 7 and higher. View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix .NET Extensions | New ThreadView:  Search:  
 Author  Thread: .Net Examples for Visual Studio 2003
Phil Johnson
Posts: 5
 
.Net Examples for Visual Studio 2003Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 07 5:46 AM
fiogf49gjkf0d
Hi,

We're just starting to look at the use of .Net in SLX and the extra functionality that it will enable us to give to our user community. I'd like to look at your .Net examples, but our organisation currently use VS.Net 2003 - is there anyway possibility of getting examples that I can look at in VS.Net 2003?

Regards,
Phil
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: .Net Examples for Visual Studio 2003Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 07 10:08 AM
fiogf49gjkf0d
Hi Phil,

There is very little in those examples specific to VS 2005/.NET 2.0. One or two of the samples use generics, but that could easily be swapped for an ArrayList or Hashtable. Other than that the code should work pretty much as is when added to a 2003 project

-Ryan
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: .Net Examples for Visual Studio 2003Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 07 10:08 AM
fiogf49gjkf0d
And of course, these forums are here if you need specific help with anything!
[Reply][Quote]
Phil Johnson
Posts: 5
 
Re: .Net Examples for Visual Studio 2003Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 07 10:14 AM
fiogf49gjkf0d
Hey Ryan,

Thanks for responding quickly - I'm probably missing something really easily corrected, but I downloaded your examples and tried to load the Solution and got an error message saying that the solution had been created in a newer version of Visual Studio - basically I can't open the Solution with Visual Studio 2003.

Do you know of a way to get the solution to load in an older version of Visual Studio?

PS. Great website by the way, there is some very interesting articles on it.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: .Net Examples for Visual Studio 2003Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 07 11:08 AM
fiogf49gjkf0d
You won't be able to open the project itself in VS 2003. What I would do is create a new project in VS 2003 and remove everything from it. Then add the class files from the samples and make whatever changes needed to compile. You'll also want to add referecnes to any other DLL files in the bin dir from the sample project.
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: .Net Examples for Visual Studio 2003Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 31 Jan 07 2:20 PM
fiogf49gjkf0d
VS 2005 also uses partial classes. This mainly applies to forms and they are broken up between code and design. Generally speaking you can merge the two files using some surgery and it should be .NET 1.1 compatible.

I believe Ryan's SLX Login code has a VS 2003 and VS 2005 project where the code is identical. You could diff the files to see exactly how that's changed then use the same technique on these examples. It's a bit of work but I don't know of a tool that'll downgrade projects or merge partial classes automatically. I would have almost mentioned #Develop since you can import/export their project files into VS but the version that targets 2.0 has a completely different structure than 1.1 and there is no migration utility there.
[Reply][Quote]
Rick Smith
Posts: 96
 
Re: .Net Examples for Visual Studio 2003Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 17 Feb 07 9:40 PM
fiogf49gjkf0d
I was able to convert the AccountSearch sample to .NET 1.1 and succeeded in getting it to run. However, I am not sure where the GUID is derived from in the AssemblyInfo.cs file or why its needed:

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("8215511a-dcde-44d8-8213-f4448b030ef3")]


Also, when I ran RegAsm.exe to register the .dll using the /codebase switch, I was not able to register it and received a warning that

"...registering an unsigned assembly with /codebase can cause it to interfere with other applications that may be installed on the same computer. The /codebase switch is intended to be used only with signed assemblies. Please give your assembly a strong name and re-register it."

Removing the \codebase switch allowed me to register it, but not sure if that is an acceptable approach.
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: .Net Examples for Visual Studio 2003Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 18 Feb 07 9:26 PM
fiogf49gjkf0d
The Guid is used because we are COM-exposing the assembly. The type library for the assebmly needs to be identified by this guid. You could change it to some other guid, or leave it as is.

The codebase switch it the batch files causes regasm to hard code the paths to the assemblies in the registry. This assures the assembly will be found when insianciated via COM, but does create what was refered to in the past as "DLL-hell" if you were to happen to have multiple versions/coies of the COM exposed DLL on the machine. It is COM, so there will be some of that expected any way, even if you strong name your assembly and put in the GAC. The codebase would be a bigger deal if we did put the assemblies in the GAC, but not needed for these samples. Either way it should work fine.
[Reply][Quote]
Rick Smith
Posts: 96
 
Re: .Net Examples for Visual Studio 2003Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Feb 07 10:22 AM
fiogf49gjkf0d
So I may be just about to cross the River Styx into DLL Hades... On a single machine, I performed the RegAsm for the DLL's provided by Ryan that are .NET 2.0. Then, using VS 2003, re-created one (AccountSearch.DLL) in .NET 1.1, and again ran RegAsm. So both version are registered on the same machine.

When in Architct, when we call CreateObject("SlxNetSamples.AccountSearch"), how will SLX it know which .DLL we want? Is there a way in which the GUID and/or the Strong Name is utilized from within VBScript to indicate the specific .DLL? Or should I be naming the file AccountSearch11.DLL? Or is the correct approach to unregister the same-named .DLL?

(Sorry for these questions - I have not had to deal with this before and am probably asking stuff that most Windows programmers just roll their eyes at...)
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 11/26/2024 2:09:34 AM