Tuesday, July 22, 2008

workflow ownership issues

sometimes when working with windows workflow you get in a situation where a workflow has been abandoned for some reason, and you can't access it. you get an error saying the instance is not owned by the runtime or the ownership has expired. You need to unlock the workflow in order to make them runnable again. To do this set ownerID and ownedUntil = null in the InstanceState table.

Labels:

Tuesday, July 15, 2008

using msbuild to target the .net 1.1 framework

For safekeeping:

How to target the 1.1 framework with a VS2k5 project

1.  download msbee http://www.codeplex.com/MSBee
2.  unzip and run MSBeeSetup.msi

3.  import MSBee targets file, this can be done in one of two ways

3.1  Add the MSBee targets file directly to each project.
To import an MSBee .targets file in a VS project file, find the import element for the MSBuild .targets file.
For a C# project, the line you are looking for is shown below.
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

Immediately under this line, insert an import of a MSBee language-specific .targets file.
For a C# project, you will want to insert the line below.
<Import Project="$(MSBuildExtensionsPath)\MSBee\MSBuildExtras.FX1_1.CSharp.targets" Condition=" '$(BuildingInsideVisualStudio)' == '' AND '$(TargetFX1_1)'=='true'" />

3.2  Specify the target with the Custom Targets property of msbuild. This allows you to avoid having to import the MSBee .targets file in each project.
For example in a C# only solution the property would be:
/p:CustomAfterMicrosoftCommonTargets=%ProgramFiles%\MSBuild\MSBee\MSBuildExtras.Fx1_1.CSharp.targets

4.  Build the project with the TargetFX1_1 property set to true. The output will be in the [project]\bin\FX1_1 directory.
4.1  If added to the project:
msbuild [project file] /t:Rebuild /p:TargetFX1_1=true

4.2  If using the msbuild property:
msbuild [project file] /p:TargetFX1_1=true /p:CustomAfterMicrosoftCommonTargets=%ProgramFiles%\MSBuild\MSBee\MSBuildExtras.Fx1_1.CSharp.targets

To verify that the project was successfully build against .net 1.1 look at the generated build log.
The CorCompile task will use the 1.1 compiler as shown below:
Target CoreCompile:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Csc.exe ...

To verify a MSBee built project will run with .net 1.1, use Ildasm to view the manifest which shows the version of mcorlib being used by the application:

// Metadata version: v1.1.4322
.assembly extern mscorlib
{
  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
  .ver 1:0:5000:0
}

To build a release version use the msbuild propery Configuration, i.e. /p:Configuration=Release

See the MSBee docs for more options and for building mixed language solutions.

Labels:

Monday, July 14, 2008

District Champions

Well the last several weeks have been busy. Jake started All-Star practice the week after the regular season ended. We had about 3 weeks of practice before playing in the Sub-District tournament in Chelsea. There were four teams in that tournament, Chelsea National, Chelsea American, Vincent and Shelby County. We (Chelsea National) finished second to advance to the District championship. Chelsea American won the Sub-District to advance as well.

Last week we traveled to Thomasville, AL to play in the District double elimination tournament. Here's a recap:

Saturday - Thomasville, won fairly easily.

Monday - Monroeville, won a tough game 8-5, I believe.

Tuesday - Chelsea American, probably the best little league game I've ever seen. It was well played by both teams, went 2 extra innings, we won 8-7 in the bottom of the 8th.  This was a huge win for us.

Wednesday - Chiltauga, lost 9-7, we got down big early and battled back to make it close.

Thursday - Chelsea American, the rematch, loser goes home. We shut them down the top of the 1st and then scored 8 runs in the bottom of the 1st, great way to start a game. The lead never felt safe though, as Chelsea American is a great hitting team. We won 12-6.

Friday - Chiltauga, the rematch. Again, we struggled early, getting down 4-1 with Chiltauga threatening to score more in the 3rd, but we held them. We came back to tie it at 4-all in the 5th. In the bottom of the 6th our leadoff hitter got on base, stole 2nd, stole 3rd and then stole home to win the game on an overthrow. Unbelievable! Jake pitched in relief 3 1/3 innings, gave up 1 hit, 0 walks, 0 runs with 6 K's, and got the game ball.

 

Now we travel to Clanton to play in the state tournament. We play the first game Saturday at 4:00.