Using Team Explorer to add an existing project Team Foundation Service - c#

I'm just getting into Team Foundation "Service", this in turn is my first exposure to Team Foundation Server.
Im a bit muddled about a couple of things. I have existing C# solutions, some comprising 30 C# projects. I want to put them under the version control of TFS. So a couple of questions:
Does version control only "apply" at the c# solution level. I dont seem to be able to add an individual project to TFS, only a solution.
Do all C# projects need to sit beneath the C# solution in an NTFS directory hierarchy? I cant seem to add a c# project to an online TFS collection unless that C# project has the C# solution folder as its root.
This is not always the case for me since I use solutions as "views" depending upon the aspect of the application I am developing.
So do I need to change my local layout to work with TFS and version control or can I somehow link projects from disparate local location to a single TFS repository?
All my Team Explorer Connect icons always appear in black?
And yet all the documentation and other posts I see on the net plus here ion SO have red/orange icons.
Do this mean I'm disconnected or something else? Also, I don't get the "Publish" option in the context menu. Instead I have to do what feels like the long way round buy doing a local commit then go changes/commit/push.

Related

MVC core MSI builder, how to create installer?

I've written an MVC core app. The next step is to wrap it in an MSI and distribute it to clients. The problem is this: I can't seem to find any built in way capture all the content files and dll's automatically and wrap them in an MSI. I've tried so far windows installer and wix (heat, to be precise) and both of them doesn't seem to have a built in way to work with .net core. Did Microsoft just decided it's not important enough or am I missing something important? I could try to put all the output and all the dependencies, file by file, but that would be hell to maintain, with the new Nuget approach there are many many dll's required for a project, together with all the content it becomes enormous. Any help would be appreciated
I'm still adjusting to this "modern" world and part of me wonders why you'd want to package a .NET core app as an MSI. I'd think you'd be running it in a docker container or windows server app (appx) in the "cloud" or on nano server which doesn't even support MSI. For actual windows servers I'd assume regular old .NET. (Which I still fondly love.)
That said, I have an open source program called IsWiX (CodePlex) and have a very simple pattern for creating ASP.NET website installers (see video at: https://www.youtube.com/watch?v=pgDf1kv8a-4) and I'd be willing to work with you to come up with a similiar story for asp.net-core mvc apps.
From what I read, .net core apps also have msbuild publish profile support. That is what I use to create the model from which I author my installers. From there I just drag drop my files into IsWiX and let it author all the XML for me.
FWIW website installers have always had a lot of files. Even before nuget and npm a website developer might add a few thousand files to their project just by adding say Infragistics. I once worked on an installer with over 300,000 files. Yikes! I always wished we had a way of just creating an uncompresssed archive of this stuff and IIS could see if as a directory but to my knowledge that never happened.
The MSI world is a declarative world where we need to explicitly list each of those files. Web developers live in a world where they just say "publish" and don't care about those details. That is the gap that I try to bridge with IsWiX.

Branding Xamarin application

I am searching a way to brand application for different customers. Android Studio build system, Gradle, offers a mechanism of flavors, which allows replacing resource or code files, depending on selected application version. This allows easily achieve such features as branding application or creating lite and pro versions.
The simplest way (I imagine) I can do the same in Visual Studio with Xamarin is to create different source control branches in the project, but unfortunately this solution is quite hard to maintain: every change must be manually merged with all branches before deployment.
Is there another specific mechanism meant for this task?

Is there a way to avoid installing VS extensions like "SQLite for WinRT" for each teammember?

We are developing a Windows Store C#/XAML application that has to (among other things) interact with SQLite database and display Bing maps for specific GPS coordinates.
"Official" way to do this seems to be to install two Visual Studio extensions - SQLite for Windows Runtime and Bing Maps SDK. I have two problems with this approach:
It is necessary to install them separately on machine of each and every team member. With new PCs, VS reinstallations and people coming and leaving the project, this can get tedious really quickly.
Updates. Let's say I install a specific version of an extension and commit the project referencing that specific version. Then, a new team member comes in and I need to install the extension to his PC as well. However, in the meantime, Microsoft has released a newer version of the extension and I am unable to download the older one - and now, because of one new person, everyone has to update their extensions, too.
Ideally, what I'd like to do is to somehow put these extensions to SVN. That way, they are stored in one place only and there is no hassle with constant installations and updates. I was able to extract .dll files from SQLite extension, but with the Bing Maps, there is a .winmd file as well as a native .dll. I am unable to reference .winmd directly, and loading it dynamically is, as I've come to understand, not possible.
Is there some way to achieve what I want and avoid all outlined problems? I hope I am overlooking something, because I can't believe Microsoft would decide on something so stupid...
Yes, there is a way.
You will find the explanation and an example in this blog post by Oren Novotny: http://novotny.org/blog/how-to-use-extension-sdks-per-project
Kudos to the writer of this post, it saved me tons of work.
I had the same problem when trying to do CI with TFSBuild service in Visual Studio Online in a project that had Bing Maps. We can't install anything in the integration server because is cloud based, so I had to do a very long search to find the solution. It involves modifying the .sln file and putting the files in source control maintaining a precise folder structure, but when you do all this correctly it works like a charm.

Mirroring source code to 2 different Team Foundation Servers

my Friends. I have my own TFS where I'm developing an application (only me). Now I would like to SHARE IT and make its source code public at Codeplex. So I went to the site, created a project and chose TFS as the source control system.
The problem comes that, in order to publish the code, I would have to change my current source control and it's a really tedious task. I would have to mirror the contents of my project to the Codeplex TFS to keep it updated. Sounds difficult, but...
... is there any way to replicate the contents of the TFS so my code can automatically be shared while keeping my current TFS setup without much hassle?
Thanks!
Don't know about a regular TFS workspace, but if it's a GIT repository, you can define multiple "remotes" in your local GIT repo, so that it pushes changes to both your local TFS and Codeplex

How to make a setup installer? For asp.net mvc 2.0, cmd line applications and webservices

I am wondering how can I make a setup project for each of these projects
Asp.net mvc 2.0
C# cmd line
Application C# web-service
I am using VS 2010 ultimate and I know that I can use the the free edition of install shield for at least the cmd line application. I am not sure about the other 2. I also know about the setup project that you can use. I just need a lot more than the basics so I am not sure how to make either one do these things.
So here is some criteria that each of my setups should be able to do.
Asp.net mvc 2.0 criteria
free (I really don't want to pay for an installer - you can list them just so I am aware of them).
Terms of service
Ability to force a user to setup certain settings. Like connection string, smtp settings. So they should be able to type it in through the setup wizard and the web.config should be updated based on this.
When it installs the stuff it should all be .dlls for all the C# code.
C# cmd line criteria
All criteria as above
I am not sure if this has to be done in the code but I have a html file that contains a template for a message. The path to this file is in the web.config so I a person needs to set this path each time they install it. I tried to do this in code but I could not figure out how to make it find the right path in development and the right path in production. It seems like If you run in VS the path is different.
Web-service
Pretty much everything I covered in the first 2 ones.
Thanks
If I were you, I would choose WiX as a platform for your installers for all these applications. Some reasoning behind this:
it is XML-based, that is, friendly to source control, diffing and merging
it has rich set of tools for most of scenarios you might need (harvesting lots of files, creating upgrades and patches, creating multi-lingual installs, etc.)
it is free and open source
it is production-ready (at least, version 3.0 - later versions are still in beta)
it is used by Microsoft to create installations for such products like MS Office
it has rich community at wix-users#lists.sourceforge.net and StackOverflow
it integrates into the VS like a charm
it is friendly to build engines like NAnt and MSBuild
VS setup project is not my choice because:
it is very limited in set of features-
it encourages bad practices like Installer classes
finally, it was retired by Microsoft
I'm not familiar with InstallShield Limited edition, though.
Hope this overview will help you finding the best option for your case.

Categories