What dll is needed for Windows.Devices.Geolocation? - c#

I am trying to write a WCF application which will store current tablet's location to a local database. I can see that Microsoft has an API for querying current location. But I couldn't find any MSDN article specifying which dll's to add to my project in order to use the Windows.Devices.Geolocation namespace.
Here's the GitHub example provided from Microsoft, but I can't run it because it requires Visual Studio 2015. My company does not allow migration to VS 2015, so I am still stuck with VS 2013.
Could any one please explain how I can create a WCF project using VS 2013 and query current geo location of a tablet?
Thanks

From the article about Launch a Universal App from a WPF App, we can add references to Windows Runtime dll's manually by browsing to .NET folder: C:\Windows\Microsoft.NET\Framework\v4.0.30319
I am able to add using statements after adding references to System.Runtime.dll, System.Runtime.WindowsRuntime.dll, and most importantly, System.Runtime.InteropServices.WindowsRuntime.dll

Related

In Visual Studio 2019 community which is the procedure to consume a wsdl?

I've installed Visual Studio 2019, created a Console Project and I want to consume a Web Service via an existing WSDL.
I've already followed all the guides that I've found on internet about the previous versione but none of them apply to my situation.
Can you provide me a solution to accomplish this action?
There is some additional installation component that i need to add?
Kindly,
Roberto
I've found the solution. The issue has been generated by the integration of the git repository via Visual Studio IDE which has altered the solution.
I've deleted the project, recreated it, added the service and then, via command line, I've integrated it in git.
Now it all works fine.

How can I manage my projects versions using Visual Studio 2012 Professional

I am working on developing an asp.net mvc web application , using visual studio 2012 professional. now when I want to update my project, for example by adding new features, I do the following steps:-
I copy the project folder.
past it inside a "versioning" folder.
work on the original project , were I add the new features and code.
now if I want to revert my project back before the new features, I can open the folder inside the "Versioning" folder. and so on...
now my current approach is some how sufficient.. but I am trying to find a more automated approach where I can for example revert certain file let say a certain .cs file to its previous version , or revert back my whole project to certain point.
so can anyone advice how Visual studio 2012 can help me in managing my versioning ?
Thanks in advance for any help.
Regards
You'll want to use a version control system like Team Foundation Server (TFS), Git, Mercurial, Subversion, etc. I personally recommend Git. Many of them have a means of integration with Visual Studio 2012 (for example, see How to Connect Visual Studio 2012 with git (github)?). Version control software supports features such as tracking file changes, creating code branches, merging code from different commits/users back together, etc.
Here's what a very simple workflow might look like with version control (see https://guides.github.com/introduction/flow/ for an example of the GitHub flow):
You're ready to add a new feature/start a new version. For simplicity we'll assume you're working on a single branch (e.g. Git "master" branch).
As you program, you make incremental changes to you source code and commit those changes regularly. Each commit gives you a snapshot of the work you've done and you can go back to any commit at any point and compare the changes between commits. The VCS you choose will influence how you synchronize those changes with a central/remote repository. You can even check revision history and look at previous versions of specific files and your code is typically backed up on another server for you without much additional work.
When you're ready to release, you could tag a specific revision (or merge features branches into master, or ... etc.). Whatever the case, you can keep track of all the cumulative changes you've made for each release and be able to revert back to any point.
There are a few other steps you may consider for versioning such as updating the assembly information. In the AssemblyInfo.cs file there is assembly metadata specifying the assembly version, file version (or informational version, which I prefer). See What is AssemblyInfo.cs used for?. You can configure Visual Studio to auto-increment the version numbers.
Team Foundation Server should be available by default with VS 2012, although I'm vague on the details of setting up a TFS server to host your repositories. Visual Studio added direct support for Git (open source, very popular) starting in VS 2013, however there is an extension available for 2012 (https://visualstudiogallery.msdn.microsoft.com/abafc7d6-dcaa-40f4-8a5e-d6724bdb980c). The extension allows you to perform some of the most used Git functions such as committing, branching, and pushing.
Here are some links to get you started:
Why should I use version control?
Using Git with Visual Studio
https://git-scm.com/download/win
https://tortoisegit.org/
https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx
I use VSTS and it is fantastic. You can use GIT or TFS version control. Both are hosted by Microsoft. I prefer Microsoft due to the idea of long term support and reliability. You can see they are supporting VS 2008 to current.
https://www.visualstudio.com/team-services/pricing/
It is also free for up to 5 users.
From the link posted below.
It has full support for many versions of Visual Studio
Q: Which versions of Visual Studio can I use with Visual Studio Team Services?
A: You can use:
Visual Studio "15"
Visual Studio 2015
Visual Studio 2013
Visual Studio 2012
Visual Studio 2010, requires Service Pack 1 and KB2662296
Visual Studio 2008 SP1, requires GDR update To connect to Team
Services with
Visual Studio 2008 through 2012
Start Visual Studio.
From the Team menu or Team Explorer, go to Connect to Team Foundation Server > Select Team Projects > Servers.
Add your Team Services account ({youraccount}.visualstudio.com).
Select your team project, and finish connecting.
If you get connection errors, try choosing HTTPS as your protocol.
https://www.visualstudio.com/en-us/docs/setup-admin/team-services/connect-to-visual-studio-team-services
GIT Vs TFS Version Control - https://www.visualstudio.com/en-us/docs/tfvc/comparison-git-tfvc
One thing to look into is how you visualize editing and checking in code. I personally find that TFS version control follows a very simple and linear model. I prefer it to git. But its really Apples vs Oranges and usually people like what they are used to. I will say that Git currently is in active development and is not as feature rich as TFS-VC. Not to mention VSTS hooks into their entire ecosystem of plugins, build systems, test infrastructure and all of their cloud platform "Azure"
If you dont need to be sharing your version controlled stuff, I like TurtleSVN. Its simple and I like the UI it has for displaying modifications between versions. It adds a choice on the right-click menu of any file or folder in windows explorer for "TurtleSVN" and then all of the operations can be handled from there.
My Suggestion is still using TFS - I my project which is a product ( ASP.MVC application ) - we are using following structure in TFS..
we have a main branch - DEV branch a QA branch and a SP branch. See screen shot attached)
Main Branch - Where all the code is merged using scripts - before we start with new version of development and then a new DEV branch with version is created from this main branch.. - so we have track of every version and new features added to each version... and For new client the code from Main branch is given.
Dev - Based on features added we create different folder for each new set of features / enhancements and put the version.
SP - After development is completed - the DEV branch is freeze and we create a new branch id SP and deploy the code for QA team - any defect founs are fixed in SP and deployed to QA - once testing is done the code is SP is freeze with QA approved and deployed to main and provided to Clients..
Finally using script - every thing from SP is merged in to Main.. and for new development - a new Branch in DEV is created from the Main..
This way we have track of enhancements / feature for each DEV phase and related SP is available and our product is getting developed in Main.
Hope this Helps..

How to get currently running project from Visual Studio extension

I am trying to create a VS extension and I need to know the currently executing project (for example, if someone is building a Xamarin.Android app and they have deployed it, I need the Xamarin.Android project). Further, I need to know the output directory of that project (so I can get some binaries from it). Can anyone help me with this?
I've tried using IVsSolution, and DTE2 (among other related things), but haven't found anything that tells me what is currently running.
Thanks
To know the output build folder of a project using automation (EnvDTE.Project), see:
HOWTO: Get the output build folder from a Visual Studio add-in or macro
To get the solution startup projects using automation see:
DTE.Solution.SolutionBuild.StartupProjects
Native VS services are somewhat more limited in this area than automation:
IVsSolutionBuildManager.get_StartupProject
The EnvDTE.Debugger object has properties to get the active process, etc:
Debugger Interface

Microsoft.TeamFoundation create project

Here is some info about tfs sdk for TeamFoundation.
http://geekswithblogs.net/TarunArora/archive/2011/06/18/tfs-2010-sdk-connecting-to-tfs-2010-programmaticallyndashpart-1.aspx
I'd like to create project within selected collection in TFS using my own script. Unfortunately I can't find any decent documentation :/ I've already managed to create Collection from .net script using instance of ITeamProjectCollectionService and method QueueCreateCollection(). I believe there is an option to create project as well somewhere in this SDK. Has any of you worked with this SDK?
I have a Powershell script to create a project according to our standards and it uses Team Foundation Server Powertools.
tfpt.exe createteamproject /collection:$collectionURL "/teamproject:$teamproject" /processtemplate:"Microsoft Visual Studio Scrum 2013.2" /sourcecontrol:New /verbose /noportal
Note: Team Explorer must be installed on the same machine; its version must be equal or higher than TFS' version.
Sadly, there is no option to choose Git version control instead of TFVC.

Get Access to Microsoft Azure Inside Visual Studio

I have a windows phone application build for windows phone 8, in Visual Studio 2012. I have started incorporating azure, and found that Visual Studio 2013, was a smarter choice for this. Therefore I installed the new VS, and opened the file, but I cannot get it to upgrade the solution.
I use the Visual Studio Version Selector as default opener, and it open the solution in my VS2013. But it is still VS2012 version, as can be seen on the picture:
I have tried to use Save as, which is stated as a solution here. But still the solution does not change. Anyone has a suggestion for how to upgrade the solution to VS2013?
What I want to use is what is shown in this video on Channel9. So I need to some how upgrade my project, or do I have to copy the code to a new project :-/ ?
I tried installing the SDK's from Microsoft Azure, but still no luck.
EDIT
The feature where you add connected service is not available for windows phone. And you do therefore not need to upgrade the VS solution. But still I had problems getting access to the server.
Go to "View", and click "Server Explorer". There one can see a windows/Azure logo, by clicking it you will add your windows azure account. apparently this does not mean adding your services even though it states that you are logged in and with the correct subscription.
Solution
However the solution I stumbled upon was to add a new Mobile Service. Where then get prompted to choose my subscription which then was not there. Apparently the subscriptions can be loaded in different ways. Therefore in this new popup under subscriptions choose import. And you basically get the route described.
After importing the subscription, you then cancel creating a new services(If you did not need it :)). And now all your azure stuff will be accessible to manage as seen in this link.
However it does not create the code lines since you are not using "add connected services" which is possible in windows apps.
Finally an answer :)
You cannot convert solution from Visual Studio 2012 to 2013 because it is not changed at all.
Sln is just xml file and it is remain same so there is no need to convert it from 2012 to 2013

Categories