where to find cordova.js in the visual studio 2015 hybrid app - visual-studio-cordova

I have installed VS 2015 preview. I am trying to use the Hybrid App javascript template to create a new project. But I do not see any cordova.js in the project. Trying to learn following the sample given here [ http://msdn.microsoft.com/en-us/library/dn832630.aspx ] it refers to referencing the cordova.js file from root of the project. But there is no such file visible. Nor are there any instructions to explicitly import it. What am I missing?
The application does build and show up in Ripple OK. But i am trying to figure out where does cordova.js file reside.
Thanks.

Cordova.js is added at the build time, after you build the project, you can find the cordova.js at \bld\Ripple\Android\Debug or \bld\Debug\platforms\android\assets\www (in case of Android similarly for different platform).
Therefore when you add reference to cordova.js in index.html, it is picked at run time. That's the reason your app is running fine even though Cordova.js is not present in Visual Studio project directory.

Related

Xamarin.Forms upgraded to Maui - Visual Studio Cannot debug/run?

Application upgraded using Microsoft's auto upgrade command line tool.
Some code fixes, and the code builds successfully.
Visual Studio however does not show me any way to debug my app.
When trying to click on Debug anyway, a random Android Emulator from my list(which is not showing currently)
Will open, but deployment will fail without specifying the reason.
Has anyone managed to upgrade an existing Xamarin.Forms project to Maui?
I managed to make VS recognize the Android project in my converted solution.
I added the <SingleProject>true</SingleProject> property into my Android project's .csproj file under the first/main property group, closed VS, deleted Bin, Obj, .vs folders.
After starting VS again , I rebuilt and VS allowed me to debug on selected .net targets like a single project Maui solution.
This is very strange that it works, since this solution is made of 3 project like in a Xamarin.Forms solution, so it doesn't make since that adding this property solves the issue, but there you go.
Delete .bin and .obj folders. Delete solution's hidden .vs folder. Build. Does it show debug option now?
Try restarting VS (after the successful build). Now work?
If not, Create a new project using Maui template.
Use solution / manage all nugets to add nugets used by your project.
Copy all your source files into that new project.
Project / "Add existing items": all those source files.

.NET Maui IOS Release build doesn't contain iTunesArtwork?

Just wondering about the white picture after deploying my app to itunesconnect.
After renaming the .ipa file to .zip and browsing through it it noticed that .net has not include an itunesartwork... file. Only the appicon and my icons for the tabbar included.
I created the .ipa with the terminal command:
dotnet publish -f:net7.0-ios -c:Release /p:ArchiveOnBuild=true
Did i miss something? Is there an optional parameter to force Visual Studio 2022 to create that 1024x1024 graphic?
If i look in the iossimulator folder for that app it includes all the graphics, and i think the file appiconItunesArtwork.png is the important one?

How do i use DocFX to generate c# documentation from source code without VS2017?

I am trying to follow the tutorial from the command line. I have generated the project and deployed the blank website then added a vs2012 project to the source folder maintaining the original heirarchy. I have edited the docfx.json file to include "src/.csproj" "src/.cs*" which i assume are searched recursively. The project was previously commented for use with SandCastle so there should be plenty to extract or generate metadata from. I currently have vs2012 msdn installed. My issue is that the metadata never builds and even when I'm using the sample seed project all the md files show up on the webhost but not the documentation from the source files.
There is no requirement to have the complete VS2017 installed, instead you can just install the build tools of VS2017. Download
Just start a developer prompt for VS2017 environment and do docfx from there, it should then be able to extract metadata. I had problems with VB.NET projects with docfx and older Visual Studio tooling for some reason.

Visual Studio 2015 codelens issues when using Typescript

I'm using Visual Studio 2015 Enterprise RTM.
When creating an ASP.net 4.6 web application using the Web Api template, I noticed as soon as I add a TypeScript file, the codelens indicators stop working.
I tested this on a new installation, with no extra extensions installed, as well and tried other asp.net 4.6 templates.
When running in safe mode the problem doesn't occur.
Steps to reproduce:
Set the framework to 4.6
Create a web application by using the web api template.
Change authentication to no authentication
Open the webapiconfig.cs in App_Start
The codelens indicator on the register method should say: 1 reference
Add a typescript file called app.ts (doesn't really matter) in the scripts folder, tit may remain empty
The codelens indicator in the webapiconfig file should still say 1 reference
Close Visual Studio
Reopen Visual Studio and open the solution
Check the webapiconfig file, the codelens doesn't show references anymore or on any other file
Any idea on how to debug codelens or does anyone have this problem as well?
I work for the visual studio team that is responsible for codelens references indicators. I can confirm that this is indeed a bug in VS2015 where codelens references stop working when you add typescript files to your project or typescript projects to your solution :( Unfortunately, we missed this bug for RTM. We're currently actively investigating this bug. At the moment, I am not aware of any workarounds for this problem. I can post an update when we have more information to share on this bug.
I may have found a workaround that seems to do the trick for me:
So, I have a solution with multiple projects, only one of which has TypeScript files.
I just unloaded the project, cleaned + rebuilt (some restart to Visual Studio at this point may help + close all opened files), then loaded again, cleaned and rebuilt and now CodeLens shows my references (again, close all open files).
Note that until this bug is fixed, you may have to do this each time you open VS.
Hope this helps!
EDIT: If you only have a single project, then exclude the Scripts folder from the solution, clean, rebuilt, close Visual Studio then open it again. Now you should have the references back. Simply include the folder again.
Best of luck!
in my case references start working after uninstalling vssonar extension, vs2015ent

How to build an existing Qt project in Visual Studio?

I have a visual C++ project that contains references to Qt libraries but I am unable to build it in Visual Studio. I installed Qt 5 sdk and plugin in VS 2012 and the initial sample Qt projects work fine, but not the older project - it could be an issue related to the project being compatible to an older version of Qt - but I don't know how to solve the problem. The error keeps showing - "The system cannot find the path specified visual c++. Moc'ing .. Uic'ing.."
The error says MSB6006: "cmd.exe" exited with code 3. The solution explorer contains some moc_xx.cpp files which are only references and are not present in the project directory. I removed them and tried rebuilding but it gives the same error
QTDIR must be set prior to starting Visual Studio for the project to properly find the location of moc.exe and uic.exe.
The Qt Visual Studio Add-in will create custom build steps for .ui and header files whenever Qt files are added or modified. It is then Visual Studio that runs the custom build rules but these rules typically reference $(QTDIR)\bin\moc.exe.
I too had the similar issue recently with an old VS project created years ago by a colleague.
The VS project was created using qmake. It contains the absolute full path to the moc.exe, of the machine where it was originally created. That is, of the PC of my colleague who left the team.
I do not have moc.exe at same location as he had it.
Therefore, the MOC step in build fails, with the error: the system cannot find the path specified.
You could find what the path is, by raising build output verbosity to diagnostic for instance.
Hope it helps.

Resources