|
-
June 11th, 2007, 06:24 AM
#1
multi-project solution
I have two seperate algorithms, one implemented as a windows application and the other as a console application. I need to make the necessary modifications so that I'll be able to run them both from a common GUI (which I still have to write).
what adjustments should I make to the two existing applications? should they both be compiled as class libraries? Should all three be under one solution?
What could be the reason for the following runtime error?
An unhandled exception of type 'System.TypeLoadException' occurred in Unknown Module.
Additional information: Could not load type [...] from assembly [...]
-
June 11th, 2007, 07:09 AM
#2
Re: multi-project solution
IMHO,
All logic should (for any non-trivial program) be coded into class libraries, and designed to work in a host agnostic manner.
This allows the same logic assembly to be used with Windows Forms, Web Pages, Web Services, System Services, COM+ Applications, WCF Services.......
TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
2008, 2009,2010
In theory, there is no difference between theory and practice; in practice there is.
* Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions 
* How NOT to post a question here
* Of course you read this carefully before you posted
* Need homework help? Read this first
-
June 11th, 2007, 02:30 PM
#3
Re: multi-project solution
They could be under the same solution or not. You can compile them as libraries ( and of course you have to remove all windows forms and console code, keep just the algorithm ) and use them from the third project which is Windows Forms. You can also keep the code in a *.cs file and Add Existing item from the third project.
Of course you have to do some modifications to your projects .
Bogdan
If someone helped you then please Rate his post and mark the thread as Resolved
Please improve your messages appearance by using tags [ code] Place your code here [ /code]
-
June 12th, 2007, 03:38 AM
#4
Re: multi-project solution - a few more questions
thank you both.
in order to use my class library project in another project - should i do anything else except for adding a "using" statement in the main execution file and a reference to the project?
when referencing the .dll, should it be the one under the bin/ directory or under obj/ ?
what could be the reason for the load error i got?
what's the dis/advantages of including a dll project as part of the solution rather than keeping it apart?
Last edited by tamaro; June 12th, 2007 at 07:18 AM.
-
June 12th, 2007, 07:15 AM
#5
Re: multi-project solution
 Originally Posted by tamaro
thank you both.
in order to use my class library project in another project - what should i do except for adding a "using" statement in the main execution file?
what could be the reason for the load error i got?
what's the dis/advantages of including a dll project as part of the solution rather than keeping it apart?
If you have a class library ( dll assembly ) you have to add Reference to that assembly and add a using statement.
Example
Bogdan
If someone helped you then please Rate his post and mark the thread as Resolved
Please improve your messages appearance by using tags [ code] Place your code here [ /code]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|