Click Once Deployment – Improperly Formatted

Error Message:
Cannot continue. The application is improperly formatted. Contact the application publisher for assistance.

Application validation did not succeed. Unable to continue.
Unable to retrieve application files. Files corrupt in deployment.

Solution:
For every project in your solution,

  1. Close your solution
  2. Open every project file in notepad ( csproj for c# projects )
  3. Look for the ToolsVersion attribute
  4. Make sure all projects are using the same ToolsVersion
  5. Save
  6. Load your solution and deploy.
Note: The Target Framework Framework is not the same as Tools Version

I had searched for hours for a solution, so I hope this helps someone else.




Value of Social Media to an IT Professional

The value of social media is all in how it is used and measured. Tech savvy users often use social media to stay informed, collaborate and to broaden the colleague base. Often business owners will make policies that make using social media websites an outlawed activity without any thought of why their Information Technology department would use it. Employers often believe that using social media sites will decrease the amount of work that one can get done in a day. It can also be believed that they are risking the loss of an employee to another company, should that employee network properly. Although employee poaching is a possibility, it is unlikely if the employee is satisfied.

Why do I use social media websites? I use social media sites to ask for help from other professionals, be in the know of events, and know about new technologies and to help mentor juniors that do not work directly with me in me field of work. Without the social media sites, I would be limited who I could ask for advice from and I would not be as educated in what I do. Every day I pick up at least one new technique from my social media channels. Today’s graduates that are using social media sites are often bubbling with knowledge through their blogs and other forums. I use my Google reader RSS feeds and my Twitter as a daily technology newspaper.

Some social media sites I use are:

  1. Twitter – Short instant messaging between users
  2. Google+ – Social media channels, organizer and broadcaster
  3. Facebook – Social media channels, organizer and broadcaster
  4. LinkedIn – Professional Social Media channels, organizer and broadcaster
  5. Blogger – Tool to be used for personal journalism
  6. Paper.li – Consolidate Twitter and Facebook information into a newspaper format
  7. BufferApp.com – Schedules Tweets to send to twitter.
  8. HootSuite – Twitter, LinkedIn, Facebook feed reader.

Yes, it is true that social media can be abused. Users can post to often and about inappropriate things. Knowing your boss or family could be reading what you post, you should probably not post about going to work with hangovers, your bad dates (or an dates) or you interview that are going to or had. Always think your social posts can directly how people portray you. If you are posting every five minutes during the day when you should be working, probably means you are getting nothing done.

To know how effective you social media, you need to subscribe to metric sites. While there are lots of services popping up every day, you need to make sure the data they are providing is accurate and useful. On my radar right now is www.Klout.com. I like Klout because they publish how their metrics work, their graphs are easy to read and they watch more than one site. They are by no means perfect, but they give me a pretty good idea of where I sit. It is important to know your broadcast range, the number of republishing posts and acknowledges and it is important to know what topics you are known for.

What do the social media sites get out of their services being free to us? They get advertisements to the masses, but not in an annoying way. They gear the advertisements to what you are talking about and what you are interested in. They also get data sources of what is popular, trending and new. We as the social media users essentially build their businesses. get data sources of what is popular, trending and new. We as the social media users essentially build their businesses.

Why use LINQ

I was asked “Why I never used LINQ?”   I guess the real answer was, I never thought about it.  I really had no good reason for not using LINQ other it was new and unfamiliar.  When I finally used LINQ; I found I was getting rid of old habits and making code simpler and cleaner.

Example of code written in C#:

foreach (Charges charge in (ary))
{
if (charge.ChargeDescription.ToLower().Contains("total"))
{
ary.Remove(charge);
}
}

Code converted to LINQ:

var rslt = from Charges charge in ary where charge.ChargeDescription.ToLower().Contains("total") select charge;

while(rslt.Count() > 0)
{
Charges chargese = rslt.ElementAt(0);
ary.RemoveAt(ary.IndexOf(Chargese));
}

To this day I still use C# with a little LINQ to simplify my code.   I use LINQ for validations, quick look up and data manipulations.  It is definitely a change from what I used to do, but worth learning.  What I like about the above code is I had eliminated the nested if without complicating the code.

Excel Interop Used In Web Service

If you are using the Excel Interop in a web service or even a web page you may get the following error.

Error:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.

Generally speaking you probably should not be trying to use the Excel application from a web services or web page for security reasons; however, for my purpose I needed to do some manipulation at the server level. If you must use the Excel interop at the server level you can use the following to get around the error. Just be careful as you may be opening a security nightmare by possibly allowing remote access to it by viruses or other rogue services.

Solution:

goto Controlpanel –>Administrative tools–>Component Services –>computers –>myComputer –>DCOM Config –>Microsoft Excel Application.
right click to get properties dialog. Goto Security tab and customize permissions accordingly.
In Launch and Application Permissions, select Customize, Edit. Add the user / group that calls the application.

Mine Mine Mine

In any work environment you here things like “Don’t step on my toes”, “Do not touch my desk or my projects”.  Walls are formed to protect what they believe is their own best interest; protecting their job in essence.  Is this really the case though?  Software developers seem particularly protective because they believe someone may mess something up on them, break something or take credit for something.
I believe it is time to rip down those walls that we have formed.  Let others come into our space and collaborate.  Yes it is sometimes a shock to come back from vacation and find someone has messed with “your” code, work or tells your customers something different.   Reality is though it is not your code, work or your customers.   The customers belong to the company you work for along with the code and your work.   It is to our best interest to let others do things for us.  They may find something we had missed, done wrong or have a better way of doing it.   From time to time it can even generate a good laugh as we are reading through the code comments.
Another advantage of not keeping all of the work to ourselves is we can drop the old in favor of new work.   You cannot do everything so you must give up something.  Old work can get boring sometimes and you become complacent and dull.   You need to stay sharp.   If you don’t give up some of your old work / customers, you cannot take on new.   Taking on new work and customers allows your mind to stay sharp.   Allows you to investigate new things rather than dwelling on the old.
If a Senior Developer shares their work with a junior, the junior then has an opportunity to learn from the senior.   They will be reading through tried and true code and learning “best practices”;  alternatively, the junior than can challenge the senior and perhaps show an old dog new tricks.
It is to everyone’s advantage to share work.  Teach someone else what you are doing, so that they can do it to.  This will cut the number of hours you need to spend after hours and it will allow to take stress free vacations, knowing someone else besides you can do the work.
It is not job security to keep things close to you.   It can actually burn you out as an employee and because you cannot take on anything new, it makes you less of a team player.   Drop the “mine, mine, mine” mentality and share the love.   You and your fellow work mates will be better for it.

How To Be Awesome

Being awesome is not the same as being perfect.  Being perfect is not possible, so you may as well shake that notion out of your head.  Being awesome is being the best you can be.  It is bringing everything you have to the table and doing it well.  You cannot be good at everything, so be awesome with what you enjoy and what you know you are good at.
There are reasons people do what they do and it is because they are good at it.  I am not good at plumbing and I know that I am not, so I hire it out.  If I chose to do plumbing, I would sit down and learn it until I know it.   I would look up to see what the building codes say.  I would watch how to movies.  Practicing soldering on small pieces of pipe would probably even happen.  I would be the best I can be for this job and learn everything I can about it.   I would be awesome.
Everyday I go to work and do the best that I can.  I work hard, learn new technologies and listen to everyone around me.   I work hard at being a leader and being a team member.   I take my time and do a good job.   I am awesome with the work I do, because it is the best I can do you.
Steps to Being Awesome
  1. Know your subject, read, watch videos, ask those who know

  2. Be in the right frame of mind.  Shake off the nerves, the stresses and give the job or project 100% of your focus

  3. Don’t limit yourself.  You can do anything if you put your mind to it.  Look past what your limits and reach for the sky.
  1. Listen to people.   There are a lot of people around you that know stuff.  You cannot know everything, but you can know what you need to know.  Use knowledge found around you to help you.  Being awesome is all about attitude.
  1. Remember – There is no such thing as perfect.
  1. Practice, Practice, Practice.   Practicing every day will help you do better every day.  Without practice you are limited to the abilities you hold today.
  1. Learn from your failures.  Failures only mean there is another way.  Search out the other way and try it.  You may fail multiple times before you find the right way.
  1. There is always someone who says you cannot do it.   Ignore it.  Use it as a prompt to only try harder.   If it is getting to you, pause take a break.   Proceed when your head is clear.
Challenge
Learn something new every day.  I can be learning something to build on what you already know, or learn something totally new.  Learn it well, practice it and do not move on until you have a good grasp of it.   If it takes longer than a day, don’t fret, it will be worth it.

Effective Listening

A skill that seems to be lacking in a lot of people is effective listening.  Effective listening is not 100% listening to others, but it is also the art of listening, asking questions and evaluating what you are hearing.  Lately it is not just the spoken word that is getting missed, but also the written word.   I have recently experienced people only reading the first line or two of an e-mail.   Too often people are quick to respond verbally or written.

Steps to Effective Listening ( verbal )
1. Relax and filter everything else out.
2. Look at the person in the eye who is speaking.   This guarantees a focus of concentration.
3. Make a mental note of key points.
4. When the person is done talking, ask for points of clarification where required.
5. Evaluate everything that was said.  Be slow to act on what is said.
6. Note taking can be used as a tool.

Note:  Do not interrupt the speaker.  This could be a distraction that would result in loss of information.   Wait for a proper break to ask questions or comment.

Steps to Effective Listening ( written )
1. Carefully read the message or email.
2. Remember, there is very little to no emotions in most written word.   Read it accordingly.
3. If uncertain of meaning or intent of the message or email, read it again.
4. Ask questions, but remove your emotion.  Be thorough with your questions or comments.
5. If uncertain about content of your reply, type it up, close it as a draft.   Come back to it later.
6. If you are not in the frame of mind for processing what was said in the email, put it into a folder to reply to later.

Note: Remove your emotion when replying or typing emails.  When reading and email, remove the other persons emotion.   Read at least twice.

A Call To Senior Developers – Rise Up

Every year is there is an influx of newly trained developers from our local colleges.  They have paid good money to become book smart and if they are lucky maybe some practical from their co-ops.   They enter the work force with nothing more than a smile and a piece of paper; often not knowing where to turn.  They look around, but there are no “Help Wanted” signs.   Once they are in, they are thrown projects with very little guidance.
I was asked a question recently and I gave my opinion on how it should be done.  After, I had instructed the person to go their senior developers for some guidance of how they would like to see it.   I was told they do not care as long as it works.   I thought this is crazy, how could they not care?   We are the Senior Developers with the experience.   We know how it should be done and how it should look.  Sometimes the “how” is more of a company culture, but it makes the code easier for everyone to read after the fact.   If we do not teach them how to do things, style and logically; we will essentially create ourselves more working fixing things that could have been done correct the first time. We are the guides for the young people.  If we know of a job in the city, we should promote it.  If we know how to do something or how it should look, we should teach it.
There is far more to being a Senior Developer than years of service. I believe deep down inside they are afraid the younger developers will steal their positions.  It is a possibility, but not likely.  If we stand up and take the younger developers by the hand and guide them.   Teach them to do their jobs to our standards; we will essentially create a little job security for ourselves.  The employer will see that we care about the projects and we care about the mentor-ship of others.  
We are a team and together we will make things happen within our employment.  The Senior Developer is the leader of the team.  Stand up, take your job seriously and help those who are starting out.  In-turn, you will gain the reward of lesser work, a developer you can trust and the respect of your employer.
Probably more to come on this topic… but not today.