Excluding Files from ASP.Net deployment

I have a web application that has to reference some common code assemblies, but some of those common code assemblies depend on x86 dlls. Even though I never call into anything that requires x86 these dlls still get copied to my bin folder which prevents me from running my worker process as 64 bit.

Since I create zip files using package / publish feature of asp.net I needed a way to tell it to exclude these files. To make things a little more complex I have to build under TeamBuild so the OutDir property gets set which can screw up your paths.

It took a while but after delving into C:\program files (x86)\msbuild\microsoft\visualstudio\v10.0\Web\Microsoft.Web.Publishing.targets I was able to come up with a solution.

In your project before you import Microsoft.WebApplication.targets define this property

    <ExcludeFilesFromPackage>True</ExcludeFilesFromPackage>

Then after importing Microsoft.WebApplication.targets define an ItemGroup

  <ItemGroup>

        <ExcludeFromPackageFiles Include="$(OutputPath)Bad.x86.dll">

            <FromTarget>Project</FromTarget>

        </ExcludeFromPackageFiles>

    </ItemGroup>

One other very useful thing I learned while doing this was this property

<EnablePackageProcessLoggingAndAssert>True</EnablePackageProcessLoggingAndAssert>

Setting that property will create another folder in your _PublishedWebsites folder called _Package with a Log folder in it.

There are some useful log files that get created during the package / publish process

AfterExcludeFilesFilesList.txt

AfterTransformWebConfig.txt

ExcludeFromPackageFiles.txt

PackageUsingManifest.parameters.xml

PostAutoParameterizationWebConfigConnectionStrings.txt

PreAutoParameterizationWebConfigConnectionStrings.Log

PreExcludePipelineCollectFilesPhaseFileList.txt

Prepackage.txt

PreTransformWebConfig.Log

Speed: NGen Revs Up Your Performance with Powerful New Features

If you are using strong-named assemblies, NGen is probably not a gain for you unless they are in the Global Assembly Cache (GAC). The CLR loader does extra validation on strong-named assemblies that aren't in the GAC, which causes nearly every page in the native image to get touched, thereby usually completely eliminating any startup gains that would be realized through the use of NGen.

4 Rules For an Effective 'Thank You' | Inc.com

How to best praise effectively?  Try these four ideas.

  • Be sincere.  Give praise only where it is due.
  • Give public praise.  The goal is to encourage employees to keep up the good work, while simultaneously encouraging others to put out greater effort.  Praising in public raises general morale.
  • Be specific in your praise.  Identify exactly what the employee worked on and what he or she accomplished.  Don’t just say, “Well done, Maggie.”  If the employee feels the praise isn’t genuine, it could have a negative effect.
  •  Provide some lasting recognition.  Consider a letter in the employee’s file or a simple celebration for the department that overcame a tough challenge.  Appreciation is not a one-shot event.  It needs to be ongoing.

You’re Unhappy Because You’re Focused on Outcomes, not Process | Dale Thoughts

Self Improvement, Success Strategies, Travel

You’re Unhappy Because You’re Focused on Outcomes, not Process

http://dalethoughts.com/?p=325">0 Comments 06 March 2012

Having process goals is more important than having outcome goals when it comes to your general happiness.

Outcome goals are stressful and uncertain.

The primary reason they are stressful is that they are generally externally generated. You read about Mark Zuckerberg and think, “Oh man, I’m waayyyy behind. I’m not a billionaire and I’m way older than he is. In fact, I don’t even have a positive net worth, I’m in debt.”

Actually, the mega-successful people are not usually the source of outcome oriented goals. The people who will cause you the most stress are your peers or almost peers that you perceive to be more successful than you. I really enjoy Facebook, but because it generally highlights only the positive aspects of your friends’ lives, you are constantly comparing yourself to them and setting goals that are inappropriate.

Process goals are much better for your well being. They are generally within your self control and if you follow them consistently, they lead to better outcomes without the stress of focusing on outcomes. The correct ratio of process to outcome focus should be about 9:1.

Based on my experience, here are three process-oriented goals I think you should adopt:

1. Consumption Goal. This is one of the most rewarding (and classic) goals you can have. It consists of saving money for an extended period of time in order to purchase some sort of good or experience. My consumption goal is to take a round-the-world trip with my girlfriend in a few years. I estimate for the both of us we will need $40k – $50k for a year of travel. You may say I’m working towards an outcome (the RTW trip), but the process is defined and straight forward. All I have to do is put money in a savings account. There is zero ambiguity and I make progress every paycheck. Whatever consumption goal you have, make sure you’re making incremental progress over an extended period of time. (Note: For an awesome book about long term travel, read Vagabonding: An Uncommon Guide to the Art of Long-Term World Travel by Rolf Potts)

2. Physical Goal. This is not a “lose 20 pounds by summer” goal. The lose weight/improve your body goal is outcome focused, not process focused. What I suggest instead is having a physical activity goal. Right now, my goal is to lift weights three times per week. I try to lift heavier weights each week. If I don’t, no big deal. When I lived in San Diego, I joined a marathon training club. I had a time goal, but what I really enjoyed most was the routine of running every Saturday morning with a group of people I enjoyed being around. I suggest joining a local sports club with a routine schedule. You’ll be happier and there’s a good chance you’ll end up losing the 20 pounds
3. Side Project/Side Hustle. My side project right now is TrekDek. Yes, of course I want it to turn into a super successful business, but whenever I start thinking that this project has to be the one that makes me rich, I don’t really want to work on it. When I treat it as a side project and learning experience, I find I get a lot more done and enjoy myself more. You don’t have to start a business as your side project. Taking classes and developing new skills also fall into this category.

 Focus on process, not outcomes.

HTTP Message Handlers: The Official Microsoft ASP.NET Site

Because HttpServer is a message handler, you can plug it directly into the HttpClient class, as shown in the following code:

var config = new HttpConfiguration();config.Routes.MapHttpRoute("default",     "api/{controller}/{id}", new { id = RouteParameter.Optional });HttpServer server = new HttpServer(config);// Connect client directly to serverHttpClient client = new HttpClient(server);var response = client.GetAsync("http://anything/api/products").Result;

Awesome