<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Just Coding</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/rido/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/rido/feed.xml</link>
    <description>Back to the future with dotNet</description>
    <lastBuildDate>Fri, 05 Oct 2018 01:10:43 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Back to the future</title>
      <link>https://docs.microsoft.com/archive/blogs/rido/back-to-the-future</link>
      <pubDate>Fri, 05 Oct 2018 01:10:42 GMT</pubDate>
      <dc:creator><![CDATA[Rido - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rido/?p=2455</guid>
      <description><![CDATA[Since I started working on Centennial (aka Desktop Bridge) tooling I created a simple sample app...]]></description>
      <content:encoded><![CDATA[Since I started working on Centennial (aka Desktop Bridge) tooling I created a simple sample app called BackToTheFuture to test the end to end scenario of creating an app publishing to the store.

The app is a WPF UI using some of the centennial goodness like the virtual registry, and access to Windows 10 APIs. 

The app is available in the store <a href="https://bit.ly/bttf-store">here</a> and you can see the source code in <a href="https://github.com/ridomin/backtothefuture">https://github.com/ridomin/backtothefuture</a>]]></content:encoded>
    </item>
    <item>
      <title>My NDC Oslo talk about JS Mobile development is live</title>
      <link>https://docs.microsoft.com/archive/blogs/rido/my-ndc-oslo-talk-about-js-mobile-development-is-live</link>
      <pubDate>Wed, 06 Jul 2016 18:15:00 GMT</pubDate>
      <dc:creator><![CDATA[Rido - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rido/?p=2395</guid>
      <description><![CDATA[NDC. What a great conference. I had the opportunity to talk about JS mobile development best...]]></description>
      <content:encoded><![CDATA[NDC. What a great conference. I had the opportunity to talk about JS mobile development best practices in Oslo. Here is the video if you are interested.

<iframe src="https://player.vimeo.com/video/171927612" width="640" height="360" frameborder="0" allowfullscreen="allowfullscreen"></iframe>

<a href="https://vimeo.com/171927612">Best Practices for using JS in your mobile app - Ricardo Minguez Pablos</a> from <a href="https://vimeo.com/ndcconferences">NDC Conferences</a> on <a href="https://vimeo.com">Vimeo</a>.]]></content:encoded>
    </item>
    <item>
      <title>Ionic 2 and Visual Studio</title>
      <link>https://docs.microsoft.com/archive/blogs/rido/ionic2-and-visual-studio</link>
      <pubDate>Wed, 11 May 2016 22:36:25 GMT</pubDate>
      <dc:creator><![CDATA[Rido - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rido/?p=2325</guid>
      <description><![CDATA[IMPORTANT UPDATES. 


July 18, 2016, Ionic 2 (Beta 10) Visual Studio 2015 Templates


July 1,...]]></description>
      <content:encoded><![CDATA[<blockquote style="border: 2px dashed red">IMPORTANT UPDATES. 

<div>
July 18, 2016, <a href="https://www.visualstudiogallery.msdn.microsoft.com/b21470f5-d29f-44a1-8f4b-8a3f96ac5860">Ionic 2 (Beta 10) Visual Studio 2015 Templates</a>
</div>
<div>
July 1, 2016 <a href="https://blog.ionic.io/ionic-2-beta-10-is-live//">Ionic 2 Beta 10</a>. 
</div>
</blockquote>
Although Ionic 2 is still in beta, the team working on Tools for Apache Cordova is so excited that we want you to be able to start building Ionic 2 apps in Visual Studio today. In this post I will walk through some tips and tricks you can use to avoid common problems working with Ionic 2 in Visual Studio.
<blockquote>This article targets Ionic 2 Beta 6,  based on Angular 2 Beta 15. Using Ionic 2 CLI Beta 25</blockquote>
<strong>Please note that this post may be outdated once Ionic releases a new version</strong>
<h2>Creating an Ionic 2 project</h2>
The first step will be to obtain the latest Ionic 2 beta version:
<code>
npm install -g ionic@beta
</code>

Then you will need to create the project.

<code>
ionic start MyIonic2App --v2 --ts --template sidemenu --skip-npm
</code>

There are some parameters you will want to use:
<ul>
	<li><code> --v2 </code> specifies that you want an Ionic 2 project</li>
	<li><code>--ts </code>specifies that you want to use TypeScript (if you do not specify --ts the project will be created with ES6, and this is not supported by VS yet)</li>
	<li><code>--template sidemenu </code> specifies the template you want to use, in this case we will be using the sidemenu template</li>
	<li><code>--skip-npm</code> disabled the npm package restore</li>
</ul>
As you can see in your console, ionic is not only creating all the project files, but it's also Installing all the npm packages specified in <code>package.json</code>. You need to understand that ionic will reuse the same npm version you have installed globally (see below a note about node versions in Visual Studio).
<h2>Start Building in Visual Studio</h2>
Ionic 2 comes with a set of predefined Gulp tasks that will help you to process the .ts and .sass files from the <code>app</code> folder and generate the output in the <code>www/build</code> folder. So, we need to customize the Visual Studio build process to set your project up with Visual Studio’s building and debugging functionalities.
<ol>
	<li>Import your Ionic 2 project into Visual Studio using the File-&gt;New-&gt;Project from existing code wizard (or you can use the tool I created for that: <a href="https://blogs.msdn.microsoft.com/rido/2016/05/10/ocpief/">ocpief</a>)</li>
	<li>Modify your project's <code>gulpfile.js</code> file within Visual Studio by adding as the first line in the file: <code>var Promise = require('es6-shim').Promise;</code></li>
	<li>Open the solution explorer side-pane, right click on “Dependencies”, and select Restore Packages</li>
	<li>Open the Task Runner (View-&gt;Other Windows-&gt;Task Runner Explorer) and right click on build to set your machine up for build, or watch to build with Live Reload (in Ripple only)</li>
	<li>If you did't specify <code>--skip-npm</code> you will need to delete the <code>node_modules</code> folder. In the command line, navigate to the root of your project and delete your current node_modules using the command <code>rd /s /q node_modules</code> Since Visual Studio uses its own version on npm, we want to remove the ones generated during Ionic2 project creation.</li>
	<li>Now, build and deploy the normal way using the menu bar</li>
</ol>
<a href="https://msdnshared.blob.core.windows.net/media/2016/05/tasks.png"><img class="alignnone size-full wp-image-2365" src="https://msdnshared.blob.core.windows.net/media/2016/05/tasks.png" alt="tasks" width="383" height="293" /></a>
<blockquote>Note that only the most recent versions of Ripple will support Angular2. If you have used Ripple before you should delete the cordova cache and build again. More info in the <a href="https://microsoft.github.io/vstacoblog/2016/05/06/update-to-ripple-angular2fix.html">TACO Developer blog</a></blockquote>
<h3>Known Issues with Ionic 2 and Visual Studio</h3>
There are some cases where the Task Runner Explorer can't list the gulp tasks, and fail.

<a href="https://msdnshared.blob.core.windows.net/media/2016/05/tre_error.png"><img class="alignnone size-medium wp-image-2346" src="https://msdnshared.blob.core.windows.net/media/2016/05/tre_error-300x86.png" alt="tre_error" width="300" height="86" /></a>

To see the error details you need to go to the Output Window and select the Task Runner Explorer Log.

<a href="https://msdnshared.blob.core.windows.net/media/2016/05/nodesass.png"><img class="alignnone size-medium wp-image-2345" src="https://msdnshared.blob.core.windows.net/media/2016/05/nodesass-300x157.png" alt="nodesass" width="300" height="157" /></a>

To solve this issue, delete the <code>node_modules</code> folder and try to restore it again from Visual Studio
<h2>Use VS for editing only, and build &amp; debug using Ionic Serve</h2>
Unfortunately, you can’t use Ionic Serve to debug in the Browser at the same time as Visual Studio. Ionic serve uses a build process that creates files in node_modules\ that is incompatible in Visual Studio.
So, if you want to use Visual Studio Intellisense, but not to build and deploy, here is how you build your project from the command line:
<ul>
	<li>Starting at the root of your project folder, enter <code>node_modules\.bin\gulp build </code> to get your output in your www folder</li>
	<li>Or enter <code>node_modules\.bin\gulp watch </code> to get your output in your www folder with live reload</li>
	<li>Then, entering <code>ionic serve</code> will build, monitor for changes, and also launch your default browser</li>
</ul>
From here you can import the project in Visual Studio using the File-&gt;New-&gt;Project from existing code (or my tool <a href="https://blogs.msdn.microsoft.com/rido/2016/05/10/ocpief/">ocpief</a>), and can start editing your project.
<h2>A note on Node versions and Visual Studio</h2>
As any other JavaScript tooling Node and NPM becomes the de-facto standard to get your JavaScript dependencies, however there are some limitations based on the version of NPM you are running.
<h3>Default versions installed with Visual Studio</h3>
If you installed TACO (Tools for Apache Cordova), you will have a globally installed version of node 0.12.2 and NPM 2.7.4. However the NPM Dependency Manager and the Task Runner Explorer will use node 0.10.31 and NPM 1.4.9. You can find these versions here:
<code>
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\
</code>
<blockquote style="border: 2px dashed red">
UPDATE. If you installed the new Web Tools version (as described <a href="https://microsoft.github.io/vstacoblog/2016/05/18/webtools-preview-updates-npm-version.html">here</a>), your node version will be 5.4.1 and npm 3.3.4, both located here:
<code>C:\Program Files (x86)\Microsoft Visual Studio 14.0\Web\External</code>
</blockquote>
<h3>Recent Node versions and Visual Studio</h3>
You can configure the npm package restore and task runner explorer to use a custom version of node, as described <a href="https://blogs.msdn.microsoft.com/webdev/2015/03/19/customize-external-web-tools-in-visual-studio-2015/">here</a>. In this case you won't need to configure the ES6-Promises, but if you go this route, remember that you should delete and restore your node_modules folder every time you change your node version.]]></content:encoded>
    </item>
    <item>
      <title>OCPIEF means Open Cordova Project in Existing Folder</title>
      <link>https://docs.microsoft.com/archive/blogs/rido/ocpief</link>
      <pubDate>Tue, 10 May 2016 22:25:21 GMT</pubDate>
      <dc:creator><![CDATA[Rido - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rido/?p=2286</guid>
      <description><![CDATA[If you work with Apache Cordova, probably you are using Command Line tools to scaffold your project,...]]></description>
      <content:encoded><![CDATA[If you work with <a title="Cordova" href="https://cordova.io" target="_blank">Apache Cordova</a>, probably you are using Command Line tools to scaffold your project, some examples are cordova, ionic, angular-cli etc...

Once you have your project created you want to open the project and start making changes.
<h2>Open in VSCode</h2>
If you use <a href="https://code.visualstudio.com" target="_blank">VSCode</a> you can use the <a href="https://marketplace.visualstudio.com/items?itemName=vsmobile.cordova-tools" target="_blank">Cordova Extension</a> and with a simple <code>code .</code> command you will open your editor in the current folder.
<h2>Open in Visual Studio</h2>
But if you are using Visual Studio with <a href="https://taco.visualstudio.com" target="_blank">Tools for Apache Cordova</a> (aka TACO), how can you open that project?

The official way to do it is using the "New Project From Existing Folder", available in File -&gt; New -&gt; Project From Existing Code, then navigate to that folder, setup a name and you are ready to go.

<a href="https://msdnshared.blob.core.windows.net/media/2016/05/NewProjectTACO.png"><img class="alignnone size-medium wp-image-2295" src="https://msdnshared.blob.core.windows.net/media/2016/05/NewProjectTACO-300x268.png" alt="NewProjectTACO" /></a>

However, if you do these steps several times (like me), you probably need a faster way to do the same thing, and this is why I created the OCPIEF tool. To install it run:

<code>npm i -g ocpief</code>

So the next time you want to switch from you CLI to VS, just type <code>ocpief</code> and the tool will create a jsproj file and will open it in Visual Studio.

The tool is available in <a href="https://www.npmjs.com/package/ocpief" target="_blank">NPM </a>and you can contribute to the source code in <a href="https://github.com/ridomin/ocpief" target="_blank">GitHub</a>]]></content:encoded>
    </item>
    <item>
      <title>Cordova demo app for Build 2016</title>
      <link>https://docs.microsoft.com/archive/blogs/rido/cordova-demo-app-for-build-2016</link>
      <pubDate>Thu, 31 Mar 2016 19:42:03 GMT</pubDate>
      <dc:creator><![CDATA[Rido - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rido/?p=2263</guid>
      <description><![CDATA[During the past weeks I have been working with ionic to ensure that the upcoming ionic2 framework,...]]></description>
      <content:encoded><![CDATA[During the past weeks I have been working with ionic to ensure that the upcoming ionic2 framework, based on angular2 will work with our dev tools, supporting different workflows and platforms.

We have talked about it at //Build 2016, the recording session is available at <a href="https://channel9.msdn.com/Events/Build/2016/B835">Channel9</a>

You can find the code in github <a href="https://github.com/microsoft/build2016-vsmobile">https://github.com/microsoft/build2016-vsmobile</a>  

]]></content:encoded>
    </item>
    <item>
      <title>Serving Static Content With IISExpress</title>
      <link>https://docs.microsoft.com/archive/blogs/rido/serving-static-content-with-iisexpress</link>
      <pubDate>Wed, 30 Sep 2015 17:08:00 GMT</pubDate>
      <dc:creator><![CDATA[Rido - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rido/2015/09/30/serving-static-content-with-iisexpress/</guid>
      <description><![CDATA[If you work in a modern frontend, you probably use node to server your static content.
Why not use...]]></description>
      <content:encoded><![CDATA[<p>If you work in a modern frontend, you probably use node to server your static content.</p>
<p>Why not use IISExpress to do the same thing? Running<strong> iisexpress.exe</strong> with the <strong>/path</strong> parameter should be enough, but the path should be an absolute path, so to do so in dynamic way you can use</p>
<p><span style="font-family: courier new,courier; font-size: medium;">"%ProgramFiles(x86)%\iis express\iisexpress.exe" /path:%cd%</span></p>]]></content:encoded>
    </item>
    <item>
      <title>New Era of this blog</title>
      <link>https://docs.microsoft.com/archive/blogs/rido/new-era-of-this-blog</link>
      <pubDate>Wed, 30 Sep 2015 16:52:45 GMT</pubDate>
      <dc:creator><![CDATA[Rido - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rido/2015/09/30/new-era-of-this-blog/</guid>
      <description><![CDATA[This week is a very special week. Me (and my family) decided to move to Redmond to join the VS...]]></description>
      <content:encoded><![CDATA[<p>This week is a very special week. Me (and my family) decided to move to Redmond to join the VS team.</p>
<p>I expect to start blogging again, so stay tuned.</p>]]></content:encoded>
    </item>
    <item>
      <title>App Studio at Build 2014 Conference</title>
      <link>https://docs.microsoft.com/archive/blogs/rido/app-studio-at-build-2014-conference</link>
      <pubDate>Thu, 24 Apr 2014 15:18:00 GMT</pubDate>
      <dc:creator><![CDATA[Rido - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rido/2014/04/24/app-studio-at-build-2014-conference/</guid>
      <description><![CDATA[Several people is asking for the code I used in the App Studio...]]></description>
      <content:encoded><![CDATA[<p style="text-align: left;">Several people is asking for the code I used in the App Studio @//build:</p>
<p><a href="https://channel9.msdn.com/Events/Build/2014/2-565">https://channel9.msdn.com/Events/Build/2014/2-565</a></p>
<p>Here it is.</p>
<script type="text/javascript" src="https://gist.github.com/ridomin/11271315.js"></script>]]></content:encoded>
    </item>
    <item>
      <title>Updated Traces for .Net</title>
      <link>https://docs.microsoft.com/archive/blogs/rido/updated-traces-for-net</link>
      <pubDate>Wed, 02 Oct 2013 12:25:00 GMT</pubDate>
      <dc:creator><![CDATA[Rido - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rido/2013/10/02/updated-traces-for-net/</guid>
      <description><![CDATA[Loooong time ago I wrote: https://blogs.msdn.com/b/rido/archive/2004/05/07/logsandtraces.aspx
Today...]]></description>
      <content:encoded><![CDATA[<p>Loooong time ago I wrote:<a title=" https://blogs.msdn.com/b/rido/archive/2004/05/07/logsandtraces.aspx" href="https://blogs.msdn.com/b/rido/archive/2004/05/07/logsandtraces.aspx"> https://blogs.msdn.com/b/rido/archive/2004/05/07/logsandtraces.aspx</a></p>
<p>Today I've updated with a revision to use some features that were not available then, like the TraceEventType</p>
<p>As usual it's in my Gist: <a title=" https://blogs.msdn.com/b/rido/archive/2004/05/07/logsandtraces.aspx" href="https://blogs.msdn.com/b/rido/archive/2004/05/07/logsandtraces.aspx">https://gist.github.com/ridomin/6798405</a></p>
<script type="text/javascript" src="https://gist.github.com/ridomin/6798405.js"></script>]]></content:encoded>
    </item>
    <item>
      <title>.Net for Business (a Tech Guide)</title>
      <link>https://docs.microsoft.com/archive/blogs/rido/net-for-business-a-tech-guide</link>
      <pubDate>Wed, 03 Jul 2013 13:49:16 GMT</pubDate>
      <dc:creator><![CDATA[Rido - [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/rido/2013/07/03/net-for-business-a-tech-guide/</guid>
      <description><![CDATA[In case you missed the announcement in last build, Microsoft Corp have released a set of whitepapers...]]></description>
      <content:encoded><![CDATA[<p>In case you missed the announcement in last build, Microsoft Corp have released a set of whitepapers to help organizations make proper use of .NET related technologies:</p>
<p><a href="https://www.microsoft.com/net/nettechnologyguidance">https://www.microsoft.com/net/nettechnologyguidance</a></p>
<p>It's a valuable resource in case you need to understand how to use .NET inside a big organization&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>