Shortcut classes in another project
-
Hi, i've downloaded a sample application from here it has two projects; First a class library project with some classes and interfaces and another a silverlight application that has shortcuts to classes and interfaces of first one. How can a project has shortcuts to classes of another project? And what does it mean? It's in that project not this! I'm confused...
Best wishes
-
Hi, i've downloaded a sample application from here it has two projects; First a class library project with some classes and interfaces and another a silverlight application that has shortcuts to classes and interfaces of first one. How can a project has shortcuts to classes of another project? And what does it mean? It's in that project not this! I'm confused...
Best wishes
The class library is compiled into a dynamic link library (dll), which is then referenced by the silverlight application. This gives the silverlight app the ability to use classes and interfaces defined in the class library project. So to use the both, you need to first compile the library project, and then add a reference to the library project in the silverlight project, using the 'add reference' link in project explorer of Visual Studio. Hope this helps
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
-
Hi, i've downloaded a sample application from here it has two projects; First a class library project with some classes and interfaces and another a silverlight application that has shortcuts to classes and interfaces of first one. How can a project has shortcuts to classes of another project? And what does it mean? It's in that project not this! I'm confused...
Best wishes
In Visual Studio's 'Add Existing Item' dialog box, the 'Add' button has a drop down option called 'Add As Link' that does the job. It does not copy the file to the project folder, it just creates a shortcut to the actual file. So, the file can be shared with multiple project. This is a very dirty thing to do. Ideally, you should abstract common code into a separate class library.
-
In Visual Studio's 'Add Existing Item' dialog box, the 'Add' button has a drop down option called 'Add As Link' that does the job. It does not copy the file to the project folder, it just creates a shortcut to the actual file. So, the file can be shared with multiple project. This is a very dirty thing to do. Ideally, you should abstract common code into a separate class library.
thank you Shameel
Best wishes
-
In Visual Studio's 'Add Existing Item' dialog box, the 'Add' button has a drop down option called 'Add As Link' that does the job. It does not copy the file to the project folder, it just creates a shortcut to the actual file. So, the file can be shared with multiple project. This is a very dirty thing to do. Ideally, you should abstract common code into a separate class library.
Ideally is the word, except if you want to share code between two different versions of the CLR. This is the method that you are pretty much forced to do if you want the same code to work between WP7, Silverlight and WPF.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Ideally is the word, except if you want to share code between two different versions of the CLR. This is the method that you are pretty much forced to do if you want the same code to work between WP7, Silverlight and WPF.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
As long as you share files across same kind of projects that are targeted for different platforms, you are fine. But if you share file with projects of different nature, changing the file in one project may render the other project not compile at all (and trying to fix it may make the other project not compile). And that is something really dirty.
-
As long as you share files across same kind of projects that are targeted for different platforms, you are fine. But if you share file with projects of different nature, changing the file in one project may render the other project not compile at all (and trying to fix it may make the other project not compile). And that is something really dirty.
Indeed, but as I say, sometimes it's necessary. Welcome to the world of the professional WPF/Silverlight developer.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
Ideally is the word, except if you want to share code between two different versions of the CLR. This is the method that you are pretty much forced to do if you want the same code to work between WP7, Silverlight and WPF.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
BTW, there is a new way! :) http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981[^] Although.. more convenient but more restrictive....
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
BTW, there is a new way! :) http://visualstudiogallery.msdn.microsoft.com/b0e0b5e9-e138-410b-ad10-00cb3caf4981[^] Although.. more convenient but more restrictive....
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
Looks good. Nice find.:thumbsup:
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility