Showing posts with label Visual Studio Online. Show all posts
Showing posts with label Visual Studio Online. Show all posts

Monday, February 16, 2015

Visual Studio In-built Support for Windows Azure

As you are aware Visual Studio has evolved a lot and every new release Microsoft adds many features. Since Windows azure is the hot cake in the market, of course Microsoft added many inbuilt features in Visual Studio 2013. Today we are going to explore few important features which will help you to debug your application.
 
Lets go through one by one, lets connect to Windows Azure website form Visual Studio.

Now you can directly connect to your Azure website from Visual Studio. IN order to connect to the windows azure, first you need to sign in to your Azure account. If you are already connected then you can directly open the server explorer form View Menu.

image

Once you open Server Explorer, you can find an option named “Azure”. You may expand the Azure to find the available options under that. This links nothing but what you see once you login to your Azure account.
 
You can compare the feature list below. Except Visual Studio online everything can be found there. Visual Studio online is a different configuration so that is available under Team explorer in Visual Studio.

 image image
Now what we are going to explore is the features available under Websites.
 
Lets expand the Websites, you will notice that all the websites which is already hosted in your Azure account will listed there.
image
We will concentrate on one website now and will see what we can do directly from Visual Studio.
 
Lets right click on one website and select View Settings. You will be amazed to see the options which is opened in your right panel. Lets explore one by one now.
image
First one you would see is the Stop Website and Restart Website. If the website is in the stopped state you will find an option Start Website in place of Stop Website. As you are aware you stop the application inn windows Azure as well same like the way you do it in IIS.

I believe nothing more to explain this feature as it has got its literal meaning.

Next options which shows under Website Settings are mainly for debugging.

First option is definitely the Framework version. You will have two options either V4.5 or V3.5

image
You may choose the framework version depends on the one you want to run your application.

Next four settings are related to remote debugging.
1. Web Server Logging
2. Detailed Error Messages
3. Failed Request Tracing
4. Application Logging (File System)
5. Remote Debugging

You may enable all or the require logging options in case you are facing any issues with the application. It is very easy to know what exactly is the issue your application is facing by going through this log files. As soon as you change this logging options it will reflect in Windows Azure as well. Which means instead of logging-in to your windows Azure  account you may manage all these options from Visual Studio itself.

I will be stopping today, there are much more to explain about the log files which you are going to get by enabling this logging mechanism.

I will be writing a separate articles for each logs.
Thanks a lot of reading my article.

Wednesday, February 4, 2015

How to add team members and share code in Visual Studio online

This seems to be a small topic and a simple. Since I have been continuing the Visual Studio Online series I thought this is also important. If you don’t know how to add members and how to share the code which is already upload in your Visual Studio Online account then the whole idea is going to be waste.

Lets login to the Visual Studio online account first. Once you login you will find all the projects under your account. In this demo you will find only one project that is DemoVSOnline.

image

Just click on the project where you wanted to add the user and share the code. When you click on the project new page will be opened. I have highlighted two sections below. because first highlighted section is interesting.
image
You might have noticed “Team rooms” which has been highlighted. What exactly is Team room? Here comes the new idea from Microsoft. Suppose you have 5 to 6 members working on the same project and they are connected from remote locations. How do you contact them??? that is a challenge. So Microsoft thought about that and added a team room where you can interact with the whole team working on this project.

Second highlighted section is of course to add the members to your project.

Click on the “Manage…” button to open the page to add the uses.
image

Select “Add user” option to add the user. The screen which opens to add the user is self explanatory.

image

As an additional note, In order to add user to your project first you need to add the user to your Visual Studio online account.
 
If you haven’t read my earlier article related to this, the process is very simple, Go to your Visual Studio Account Home page. Now you will find a menu Users. Just click on that link to open the Manage Users page where you can add/delete/modify any users.
 
You can use Microsoft account or even other account as well. If you use Microsoft account there will be an added advantage. You may see the actual window which you have to use to add the user below.
image 

I hope now you are confident enough to add the user to your visual studio online account and to your project and also you learned how to chat with your team member via Team room.

Any doubt or questions related to this topic is always welcome.

Tuesday, February 3, 2015

How to add ASP.NET projects in Visual Studio online

Yesterday we learned how to create project in Visual Studio online and how to create local work space for that project. If you have learned that please go through my earlier article “How to create projects in Visual Studio Online”.

Today What we are going to do is, we will add complete ASP.NET project to the Visual Studio online project we have created yesterday.

For that first what we have to do is, if you already have a project then just copy the code into the local work space. Otherwise create a new project and save the project in your local workspace.
Here in my example I have already a project so I am copying the code from my original location to the local workspace.

image
Once you move the project to your local work space then open Visual Studio and then open the solution/Project we just copied in to the local workspace.

Once you open the solution click on TEAM menu and select “Connect to Team Foundation Server…”

image
Now it is time to Sync the code in VS online project which we created. Click On the “Changes” option and then Click on the Add All button to include all the files. You may nitice that as soon as you click on Add All, all the file be added to the “Included Changes”.
image
Now you enter the comment for the commit and click on “Commit” button.
image 
Once it is committed you will get a message your commit is created locally. Sync to share your changes with the server.
image
Just click on the Sync link to open the Sync page and now you can see the button with the name “Sync”. Just click on it to Sync the code.
image
As soon you click on the Sync code you can see the progress of your code syncing. It may take some time depends on the project size and of course your internet speed as it will be uploaded to Visual Studio online account.
image
Once committing is completed you will get a successfully committed the change message and you are done!
Just login to your Visual Studio online account and see the code you have committed.
image
I hope you enjoyed reading this article. Tomorrow we will see how to commit the changes, how to add team members etc.

Monday, February 2, 2015

How to create projects in Visual Studio Online

I hope you would already heard what is Visual Studio online and what is the purpose and advantages of using Visual Studio online. This is one of the simplest easy way to manage your code across the world without any headache of transferring code from one server to another. You create a visual Studio online account add the projects to it and then share with your team member who is sitting anywhere in the world.

In this article I am going to explain you how to create/Add projects in Visual Studio online and then how to share with your team member.

First I have created a simple website with a single page. While creating the project now in Visual Studio 2013 you can find a new option called “Team Project”.

You can use Visual Studio 2012. You can also use Visual Studio 2010, but you'll need to install Service Pack 1 and KB2662296 first. Or, you can use Visual Studio 2008 SP1, with this GDR update.
Select this option to create a new project which can be added to your Visual Studio online account.

image
If you already connected with your MSDN account then your Visual Studio online URL will show in the Team Foundation Server dropdownlist. See the window which I see when try to create a new projects in Visual Studio online.
image
If it is not connected then you can click on the “Servers…” button and then click on the “Add…” button to provide the URL of your VS online.
image
It might ask you to provide your credentials. Once you enter the credentials it will open your Visual Studio online account as well as your project.

If you are doing this first time then you have to create your local workspace. Similar to any source control tool. So click on close this repository or create work space option. Select the path where you wanted to keep the local copy of your code.

image
Once your local work space is created your empty Visual Studio online project is ready. Now you just click on the Web Portal link which will take you to the online account and there you can see that the new project.

image
Once you are redirected the online account you may see the project we created now like below.

 image

So your first project is online now. Now you can share with any of your team member. I will be writing more article towards sharing the code, committing the changes etc in coming days.

Tuesday, November 18, 2014

TransactionScope in ASP.NET

This is one of the good feature which will help you when you have to do multiple database operations and you wanted to make sure that all the transaction has to be either committed or roll backed as a single unit of work.
TransactionScope is exactly same as the one we use in database level. But sometimes we may not use transaction at database level if the data/table we are operating is completely different and there is no connections.
Couple of important points you have to remember while using TransactionScope is, TransactionScope class cannot be inherited, also this is part of the System.Transactions which means if you wanted to use the class TransactionScope then first you have to refer to the assembly System.Transactions.
image