Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Which DLL should I add?
Message
 
 
To
08/05/2009 11:29:43
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 3.0
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01398231
Message ID:
01398645
Views:
45
>>Unfortunately, I can not include projects into this project
>>
>>I get
>>
>>---------------------------
>>Microsoft Visual Studio
>>---------------------------
>>A reference to 'SDC.Business' could not be added. Adding a reference to a desktop project from a smart device project is not supported.
>>---------------------------
>>OK
>>---------------------------
>>
>>The error message itself is seems to be reversed. Also, could it be because I added these new objects (Business, DataSets) later in the game?
>>
>>Thanks in advance.
>
>You can do the reverse though:
>
>http://msdn.microsoft.com/en-us/magazine/cc163387.aspx
>
>Snippets:
>The first thing desktop developers usually do when trying to port an application to a mobile device is to take an assembly built against the desktop framework and reference it from a device project. This will not work and is definitely not supported. Even if in your desktop project you’ve been careful to use only types and members that are also available on the .NET Compact Framework, you will still get TypeLoadException and MissingMethodException exceptions at run time. So, if you created a Visual Studio project by choosing a non-smart-device project template, the output of that project will simply not execute on the Windows CE platform (which is what Windows Mobile builds on, of course).
>

>
>and
>
>Though desktop assemblies cannot execute on the device, the good news is that the reverse is possible. If you create a smart device project and build it, the output (the EXE or DLL) can be executed on the desktop and can be referenced by desktop projects. This works because the .NET Compact Framework assemblies are retargetable. If you open one of them with ILDASM, you can observe that they have the System.Reflection.AssemblyNameFlags.Retargetable attribute (see Figure 2). This means that at run time all references to the .NET Compact Framework assemblies are retargeted to the desktop equivalents. So, to be clear, your assembly uses the desktop implementation, not the device implementation of the .NET Framework.
>


Great consolation, Tracy! :)

Thanks a lot. In the meantime I re-did DS project and I think BL should not give me problems if I'll just add cs files. But we'll see.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform