Monthly Archives: December 2015

Prečo Vám (možno) nejdú dáta v sieti operátora 4ka

Na Slovensku niekoľko dní späť potešil operátor 4ka svojich zákazníkov 1GB dátovým balíčkom zdarma. Super, poviete si. Vložíte SIM do telefónu, zapnete dáta a : nestane sa nič. Hľadáte problém.

A možno po pár minútach hľadania prídete na to, že váš mobil (teda min. ten môj s Androidom rady 4) nepozná operátora 4ka a teda nemá ani default nastavenia internetu.

Takže chtiac nechtiac, musíte vytvoriť nové. V podstate jediné čo potrebujete urobiť je, vytvoriť nový profil a nastaviť APN (access point name) na “internet” a profil pomenovať a uložiť a nastaviť ako aktívny. Návody ako na to nájdete tu :

http://www.fony.sk/clanky/10419-vyskusali-sme-4ku-problemom-mozu-byt-data-a-slabe-pokrytie

https://www.swan.sk/media/content/Ako_zistit_dostupnost_siete_a_nastavit_vlastne_zariadenie.pdf

http://mobilmania.azet.sk/clanok/106673/swan-ako-si-nastavit-mobilny-internet

Enjoy.

How to use NuGet packages even with PowerShell projects with Visual Studio 2015

Most of developers doesn’t use PowerShell on day to day basis, but Microsoft in Visual Studio 2015 made it 1rst class citizen by making PowerShell Tools for Visual Studio 2015 plugin optional on install. (Before that, we had just optional plugin for VS 2013 and VS2012 by same author).

More on this here : http://blogs.msdn.com/b/powershell/archive/2015/04/19/do-not-delete-publish-powershell-tools-for-visual-studio-now-available.aspx

and here

https://channel9.msdn.com/Shows/MsftPowerShell/Visual-Studio-2015-PowerShell-Tools-Overview

and would all be good, but there is still one downside and that is :

you can’t use NuGet packages in PowerShell projects in VS2015 (at least that is how stuff works on my machine). I am really not sure, if this “feature” was introduced with VS 2015 or with NuGet 3.x, but my project worked with VS 2013 + plugin for VS2013.

On my dev box I get error like this one when trying to right clicking References and Manage NuGet Packages…:

powershell nuget error menu

and like this one using Package Manager Console :

powershell nuget error console

The problem is, that it seems like NuGet doesn’t support .pssproj projects, so however your project contains packages.config it will be ignored and you will not be able to update packages. You will have track what you installed and reinstall same version, but you will not be able to update these. Which is quite shame.

There is currently no simple solution to this but you can do these workarounds :

Solution 1 :

If you have small number of packages, install them by hand from command line with help of command line NuGet.

  • download NuGet.exe from https://www.nuget.org/  ,
  • cd to directory where NuGet.exe is (or if you have NuGet.exe in your PATH, you don’t need to cd),
  •  nuget install package_name -o “path_to_packages_folder_or_folder_where_to_store_packages” – which will install latest version of package you want,
  • use the package

You can indeed make a shell script for this. With this solution, the shell script will hold the information about packages you need/want to have installed.

Solution 2 :

If for some reason you want to preserve packages.config file, than you will have to manually update latest versions of packages it contains (since update is not working). Then this file will bear the information about what packages NuGet will install/restore. If this is your way to go, you can follow these steps :

  • download NuGet.exe from https://www.nuget.org/  ,
  • cd to directory where NuGet.exe is (or if you have NuGet.exe in your PATH, you don’t need to cd),
  • update the packages.config file with latest version numbers from https://www.nuget.org/  ,
  • nuget install “path_to_packages.config\packages.config” -o “path_to_packages_folder_or_folder_where_to_store_packages”,
  • use the package

All these solutions are for for scenarios where you need NuGet packages in Packages folder (inside solution folder).

But what there is another way, if you can install chocolatey on you dev box and if you can find in chocolatey repository the package you need.

Then you can do this :

Solution 3 :

  • install Chocolatey from https://chocolatey.org/,
  • run “choco install package_name” (choco should also make sure your new tool will be in PATH),
  • use the package

I would suggest you will make a shell script and automate install of your packages. Again, the file that will hold the information about packages is the shell script.

And if you ask, what is the reason for all this, what NuGet package you might want to use in PowerShell project, my answer is : https://github.com/pester/Pester

Hope this helps,

Dušan