Bing Maps Silverlight Control, System.Windows.Browser .dll - silverlight

When I'm deploying application to WP7, application throws exception:
System.Windows.Markup.XamlParseException: The invocation of the constructor on type 'Microsoft.Maps.MapControl.Map' that matches the specified binding constraints threw an exception. [Line: 24 Position: 16] ---> System.MissingMethodException: File or assembly name 'System.Windows.Browser, Version=2.0.5.0, Culture=neutral, PublicKeyToken=7CEC85D7BEA7798E', or one of its dependencies, was not found.
When I'm deploying same application to emulator or mobile device(in debug mode) everything works as expected.
Do you have any idea how to make it work without debug mode?

First, check if System.Windows.Browser is referenced in your project, and if it already was, check in its property tab that it's marked as "Copy". The issue seems to be that your app is unable to find it at runtime.
If a System.Windows.Browser file is referenced, check if it's the one the control requires (2.0.5.0)

Related

how do I configure a codenameone project to install on external storage in Android

I am trying to get my codenameone application to install to external storage, so I do not need root permissions to debug what is writes to storage, as it does not work on Android, even if it does in the simulator.
First I assumed just having codename1.arg.android.installLocation=preferExternal in codenameone_settings.properties would do just that, but the application still installs to internal storage even after changing that installLocation to preferExternal from auto.
So I thought perhaps it needs quotes for the preferExternal, and proceeded to give them (=\"preferExternal\") - this gives a manifest build error on the build server, which shows the manifest with double quotes, so the original was the correct form.
From the error report, I saw that
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="false" />
so I thought perhaps this needs to be required for the install to external storage to actually be possible. I tried adding codename1.arg.android.permission.WRITE_EXTERNAL_STORAGE=true to the properties file like the documentation would suggest, but that fails in manifest merge:
Merging result: ERROR
/tmp/build6786351350686020379xxx/happy2/src/main/AndroidManifest.xml:48:7-69 Error:
Element uses-permission#android.permission.WRITE_EXTERNAL_STORAGE at AndroidManifest.xml:49:5-81 duplicated with element declared at AndroidManifest.xml:45:5-106
/tmp/build6786351350686020379xxx/happy2/src/main/AndroidManifest.xml Error:
Validation failed, exiting
Ok, so I thought that is always included, and thus I just need to change the required setting to true, and followed what the documentation says by adding codename1.arg.android.permission.WRITE_EXTERNAL_STORAGE.required=true to the properties. This builds, but the actual permission is not set to android:required="true", but remains false.
Using android.xpermissions tag to insert the wanted line <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:required="true" /> does insert it to the manifest, but manifest builder gives and error since the default false line will still be there too:
Merging result: ERROR
/tmp/build5902390972256151175xxx/happy2/src/main/AndroidManifest.xml:48:3-103 Error:
Element uses-permission#android.permission.WRITE_EXTERNAL_STORAGE at AndroidManifest.xml:48:3-103 duplicated with element declared at AndroidManifest.xml:45:5-106
/tmp/build5902390972256151175xxx/happy2/src/main/AndroidManifest.xml Error:
Validation failed, exiting
So the question remains, how do I configure a codenameone project to install on external storage in Android?
See this android:installLocation="preferExternal" not working
The gist is that parts of your app will always install in the hidden area and storage will probably go there.
If you want to write stuff to the SD card you can do that with the FileSystemStorage API which allows you to write to arbitrary roots. You can detect the SDCard root and just write there. I would suggest debugging in the simulator though where you can see the content of storage easily in the .cn1 directory.

prism5 wpf View-Switching Navigation QuickStart demo doesn't run

I'm new to PRISM, and downloaded the quickstart demos, and tried the View Switching Navigation.
i could build the solution, there is no error there, but when i try to run the application it gives error that cannot load CalendarModule.dll.
An unhandled exception of type 'Microsoft.Practices.Prism.Modularity.ModuleTypeLoadingException' occurred in Microsoft.Practices.Prism.Composition.dll
Additional information: Failed to load type for module CalendarModule.
Error was: Could not load file or assembly 'ViewSwitchingNavigation.Calendar.dll' or one of its dependencies. The system cannot find the path specified.
i've got this error at bootstrapper.run()
thanks for any hint!

Assembly referring resoruce dictionary is not getting loaded in prism

I am using WPF prism for modular application development and each module that is present in the module catalog file is in different folder and they get added and removed from the region one at a time.Each module gets loaded from a its own folder and application exe is at different location. All the dependencies of the module is in its own folder.
In one module (dll) the view which gets added to region is having resource dictionary and with Source of the ResourceDictionary as :
Source="/UIControls.Wpf.MessageBox;component/Themes/Generic.xaml"
If the resource DLL (UIControls.Wpf.MessageBox.dll) is present at the place where application exe is present then it works, that means view get added to the region. But this resource DLL has to be present at folder where module DLL is present(All the dependencies of the module is in its own folder). So if i remove this DLL from where application exe is then it gives FileNotFound exception and the module does not get loaded.
How can I give source/path of the resource dictionary as codebase of the module? Source I don't want as application exe relative,I want the source as the path from where module is getting loaded i.e its codebase. Is there any way or other syntax so that source code is not the application exe relative. Please give me some solutions. One option I have got is to use AssemblyResolved event. But i dont want to use that.

how to add PlaneProjection reference to silverlight project?

I'm trying to create silverlight project using eclipse.
i've used PlaneProjection tag in xaml page.
this automatically generated code in CSharp..
there i'm getting error like,
The type or namespace name 'PlaneProjection' could not be found (are you missing a using directive or an assembly reference
Page.g.cs /Hekllo/obj/Debug line 44 Problem Full Build Marker
what i've understood is there is no reference available here for PlaneProjection.
Please help me.
Your project must have a reference to System.Windows.dll
Typically it can be found here:
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\vX.X\System.Windows.dll

AppManifest.xml not getting updated by SL build

I'm starting an SL project in VS2010, and I'm finding that the AppManifest.xml file isn't being updated by the build. This causes the xap to fail to load in the browser, throwing an InitializationException. Doesn't VS maintain this file for you?
I noted that the Build Action listed for the AppManifest.xml file is currently "None", but I'm not sure what I should change that to, if anything.
The problem turned out to be that I didn't have any Application class in my project, nor the required App.xaml. (I had somehow deleted these files when attempting to customize the solution.) This caused the xap to fail to load, and the error message led me to believe that the root cause was the AppManifest.xml, which generates the AppManifest.xaml file.
This was a mistake. Fixing the Application class and the App.xaml solved the problem.

Resources