Error when installing packaged version of WinJS Windows 8.1 app using Bing Maps - windows-8.1

I've developed a Windows 8.1 app using the blank universal template. The app uses Bing Maps and runs fine when debugging using visual studio.
However, when I package and install the app locally, is fails with the following error:
Exception is about to be caught by JavaScript library code at line 1,
column 202459 in ms-appx:///Bing.Maps.JavaScript//js/veapicore.js
0x800a138f - JavaScript runtime error: Unable to get property
'replace' of undefined or null reference
Obviously this is some sort of issue with how I'm using or have referenced the Bing Maps api.
I've including Bing Maps using the following script references in my default.html file:
<script type="text/javascript" src="ms-appx:///Bing.Maps.JavaScript//js/veapicore.js"></script>
<script type="text/javascript" src="ms-appx:///Bing.Maps.JavaScript//js/veapiModules.js"></script>
The exception is happening when I go to initially create the map:
this.map = new Microsoft.Maps.Map(mapElement, mapOptions);
It looks right according to all the documentation I've looked at. Any ideas why it would run fine in the visual studio debugger but fail when packaged and installed? Am I missing something that needs to be included in the package?

Turns out that I needed to call:
Microsoft.Maps.loadModule('Microsoft.Maps.Map' {callback: initMap})
Then initialize the map in the callback. Apparently this isn't required when using Bing Maps AJAX on web pages (the docs I was referencing) but is inside required in a Windows 8.1 javascript app. Not sure why it was ever working without that piece when debugging in Visual Studio.

Related

Uncaught ReferenceError: module is not defined at push.js

I am developing an Android App using Phonegap and trying to add the Push Notification.
I already added the plugin successfully using "phonegap plugin add phonegap-plugin-push". Config.xml was also updated and i can see the version of push plugin as 2.2.3.
Note: i created the project using the push-template. Cordova.js is also coded in index.html.
When i try to view my application on google browser. I get these errors.
Uncaught ReferenceError: module is not defined
at push.js:330
Uncaught TypeError: PushNotification.init is not a function.
I am not allowed yet to post pictures so here's the link for the section which is having an issue.
https://i.stack.imgur.com/ezw6U.png
I've been trying to fix this. Read all related problem on github and stackoverflow but to no avail.
These are the versions i'm using.
cordova 9.0.0
phonegap 8.2.2
Solved!
The browser will give you this error if you are previewing your app using the index.html from the root folder of your application.
It should be compiled first to a specific platform so you can preview the app from the compiled files. This is the path in case of Android: platforms\android\app\src\main\assets\www

Xamarin.ios using DLL library

I have xamarin binding project (represents kind of bridge to native iOS static library) which works fine if added to a solution.
What I'm trying to do is to use /bin/libary.dll instead of binding project.
I created new xamarin.ios simple view project, added reference to library.dll.
Project compiles fine using API from that library but when run i'm getting fatal error:
so there is no even entry point to application
sorry probably for posting obvioues answer, but I need to get it working fast.

JHipster page won't render properly

When I run the command mvn spring-boot:run, I get no errors. The problem is when I localhost:8080, the site does not properly render. I can not post an image here, but Home, Account, and Language are all in bullet form. Now when I installed it, I did get the error MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe" which I believe is related to node.js. I downloaded Visual Studio Express 2013, but I still get the error. Could these two be related?
I had similar issues.
To resolve the issue, I had to recreate a new project and for the option to use the Compass CSS Authoring Framework, I chose "No".
That resolved it for me.

Could not find SDK Bing.Maps.Xaml, Version=1.113.0601.1

I am working with windows 8.1 store app.In my app using the bing map sdk. I have added the bing map sdk extention.But I got the error "Could not find SDK Bing.Maps.Xaml, Version=1.113.0601.1".Please give a suggestion.
The version of Bing Maps you are referencing is for Windows 8 only. There is a new version that is for Windows 8.1. The new version has some additional features and a lot of bug fixes. You can find the Windows 8.1 Bing Maps control here: http://visualstudiogallery.msdn.microsoft.com/224eb93a-ebc4-46ba-9be7-90ee777ad9e1
Check if you have installed the latest version of the sdk since the one you've added the reference to is not for Window 8.1.
Also, one other possible solution consists in editing and removing the reference to the Bing Maps elements directly in your csproj file.
So to do as said, here are the steps:
Edit the csproj (or vbproj) file directly as xml content (right-click, unload the project and right-click Edit the csproj)
Remove the element that references the Bing Maps control inside the section
Save the document and reload the project then add the reference using the usual way
If, for an unknown reason it won't work, it might be useful to uninstall and reinstall the Bing Maps extension (SDK) and do the same process as before by removing and adding back the reference to the extension.

NUnit not loading latest version of a Console Application

I am re-writing a console application and trying to use Unit Tests. I'm using NUnit, C#, .NET Framework 4 in Visual Studio 2010 on a Windows 7 PC.
When I change code within the application my unit tests don't pick up the latest changes. I can see that NUnit is reloading but for some reason it's not getting the latest version. The only way to get NUnit to work with the latest version is to remove the reference to the Console app, add it back and compile.
Is there a way to avoid doing this? I think the problem is that the the console app is compiled as an EXE, whereas with most applications I've unit-tested they have tended to be DLLs.
EDIT
I had hoped that this question: Unit Testing a Console Application inside Visual Studio contained the answer. If you look at the accepted answer this was the way I'd been proceeding but my test project wasn't picking up the changes. I've now created a class library and I'm applying my tests to that. My console app will simply load, then call, this class library.
Second Edit
I've now got my code to a stage where I can test functionality and I've noticed the same problem with my console app. Although it 'says' it is referencing the compiled DLL, it only picks up the latest change when I delete and re-attach the reference. So, I'm thinking that the problem isn't necessarily connected to NUnit, rather an issue/quirk with console apps.

Resources