Warning: strpos(): needle is not a string or an integer in /customers/a/f/c/fjorden.se/httpd.www/joel/index.php on line 49 Blog by Joel Fjordén a.k.a. Will o Wisp - Open and Build .NET Compact Framework Projects in Visual Studio 2010
Open and Build .NET Compact Framework Projects in Visual Studio 2010 
Monday, December 28, 2009, 04:00 PM - Visual Studio
.NET Compact Framework (Smart Device) projects are still not supported in Beta 2 of Visual Studio 2010, but there is a workaround until support is added in the final version.

Things to change in VS 2008 .NET Compact Framework (Smart Device) projects to make them load and build in VS 2010 while still targeting the .NET Compact Framework.

1) Edit the project file (*.csproj) for your smart device project.

2) Make sure the ToolsVersion attribute is set to 4.0.

3) Remove the ProjectTypeGuids property item from the main property group.

4) Both PlatformFamilyName and PlatformID are important for the project to correctly target the .NET Compact Framework.

5) Change the import item for the Compact Framework build task to specify the location of the Microsoft.CompactFramework.CSharp.targets file. Either hard-code the path in the task or add the path to a property item in the main property group and reference that in the import item.

Example #1:
<Import Condition="'$(TargetFrameworkVersion)' == 'v3.5'" Project="C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.CSharp.targets" />

Example #2:
<PropertyGroup>
<MSBuildBinPathCF Condition=" '$(MSBuildBinPathCF)' == '' ">C:\Windows\Microsoft.NET\Framework\v3.5</MSBuildBinPathCF>
</PropertyGroup>

<Import Condition="'$(TargetFrameworkVersion)' == 'v3.5'" Project="$(MSBuildBinPathCF)\Microsoft.CompactFramework.CSharp.targets" />


6) Remove the import tasks for older versions of the .NET Compact Framework or configure them correctly.

7) Copy the "Microsoft.CompactFramework.Common.targets" file from [Windows]\Microsoft.NET\Framework\v3.5 to [Windows]\Microsoft.NET\Framework\v4.0.21006.

8) Reload the project. It might still ask for a conversion but this time it will load the project correctly.


Things to change in VS 2010 project files, targeting .NET 3.5, to make them target the .NET Compact Framework 3.5.

1) Replace the MSBuild project task targeting the .NET Framework to the one targeting the .NET Compact Framework, i.e. Microsoft.CompactFramework.CSharp.targets. Either hard-code the path in the task or add the path to a property item in the main property group and reference that in the import item.

Example #1:
<Import Condition="'$(TargetFrameworkVersion)' == 'v3.5'" Project="C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.CSharp.targets" />

Example #2:
<PropertyGroup>
<MSBuildBinPathCF Condition=" '$(MSBuildBinPathCF)' == '' ">C:\Windows\Microsoft.NET\Framework\v3.5</MSBuildBinPathCF>
</PropertyGroup>

<Import Condition="'$(TargetFrameworkVersion)' == 'v3.5'" Project="$(MSBuildBinPathCF)\Microsoft.CompactFramework.CSharp.targets" />


2) Add the following property items to the main property group:
<PlatformFamilyName>WindowsCE</PlatformFamilyName>
<PlatformID>E2BECB1F-8C8C-41ba-B736-9BE7D946A398</PlatformID>


3) Copy the "Microsoft.CompactFramework.Common.targets" MSBuild .NET Compact Framework target file, from [Windows]\Microsoft.NET\Framework\v3.5 to [Windows]\Microsoft.NET\Framework\v4.0.21006:

4) Reload the project.
3 comments ( 261 views )   |  related link

Support is Coming for DXCore 9.1.3 
Friday, April 24, 2009, 08:07 AM - Code Style Enforcer
DevExpress recently released new versions of DXCore, CodeRush & Refactor, where they have a new versioning and installation structure.

A new version of Code Style Enforcer is on the way, with support for the latest DXCore. The only difference, really, is the installation path of the CSE plug-in, so until I've fixed this you can simply copy the DX_CodeStyleEnforcer DLL from the "C:\Program Files\Code Style Enforcer" folder, to the DXCore plug-ins folder located in something like "Documents\DevExpress\IDE Tools\Community\PlugIns".
10 comments ( 249 views )   |  related link

Sony Sucks When It Comes to Support and Guarantee for Playstation 3 
Wednesday, February 25, 2009, 11:41 AM - General
I write this to inform you all about my experiences with the horrible Sony support in Sweden. It all started when the blueray drive in my one year old PS3 (40 Gb) stopped reading blueray discs, games and movies. I then contacted the support in order to try to get it fixed, guarantee or no guarantee. After some phone calls, which by the way cost about 1$ per minute, and a lot of e-mails, I understood that they were not interested in trying to find a solution, and I was told that a simple diagnose would probably cost more than a new console. I know for sure what the problem is, so why not simply exchange the drive or let me buy it as a replacement part so that I could replace it myself?!

The problem with the blueray drive is so very common, that I really think Sony should extend the guarantee period for these units, or at least try to be a little more professional in handling these issues. If you google for this problem you will find hundreds of hits in forums and YouTube also has an insane number of videos where people show you how to try to fix it or exchange it.

This blog article, that describes my experiences with Sony in more detail, is unfortunately in Swedish, but I guess you can always use a translation tool if you're interested in reading more about it.

Quick Navigation in CodeRush 
Wednesday, November 26, 2008, 09:11 AM - CodeRush/Refactor!
A lot of Resharper people are complaining about the lack of CTRL + T (Go to type) feature in CodeRush, but I can now happily announce that a similar feature does exist.

The feature is called QuickNav in CodeRush and it must be manually configured in the DevExpress Options menu. Below the IDE category, you'll find Shortcuts where it's possible to change the key combination for a certain Command or add new ones. In order for the QuickNav to work optimal for both finding types and members to Shortcuts must be added.

I've mapped the "Go to type" feature to "CTRL + T", with QuickNav as command and AllTypes, , AllVisibilities, CurrentSolution as parameters (note the empty members param).

In order to get the "Go to member" feature, I've mapped it to "CTRL + ." with QuickNav as command and AllTypes, AllMembers, AllVisibilities, CurrentFile as parameters.



New Version Finally Here! 
Wednesday, November 12, 2008, 08:37 PM - Code Style Enforcer
The new Code Style Enforcer version is 2.2.10.

New Features

• Settings file and default location for custom rules is changed to the user's documents folder. UAC should no longer be an issue.

• Rules are now only enforced for C# and VB projects/documents.

• Possible to activate/deactivate Code Style Enforcer for each individual project in a solution.

Bug Fixes

• Method parameters are now checked for violations again.

• Implicit and explicit cast operators no longer report invalid violations.
6 comments ( 123 views )   |  related link


Back Next