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

Wednesday, April 27, 2011

Visual Studio Smart Device Projects build slowly

If you are developing a smart device application using either Visual Studio 2005 or 2008, you may be experiencing extremely slow build times every time you make a code change. This can be very frustrating when all you want to do is continually build, deploy and debug. It is most likely that the slow build is being caused by the platform verification task (PVT), which is a post-build task that runs by default. More information can be found here on what the PVT is and why it is required. You can however disable it temporarily as it is not required to be run every time you build your smart device application.

To disable the PVT, you can perform the following steps.
  1. Open the file %windir%\Microsoft.NET\Framework\v2.0.50727\Microsoft.CompactFramework.Common.targets (if using Visual Studio 2005) or %windir%\Microsoft.NET\Framework\v3.5\Microsoft.CompactFramework.Common.targets (if using Visual Studio 2008) for editing.
  2. Go to the line which reads:
    ...
    
  3. Change it to:
    ...
    
  4. Add the SkipPlatformVerification environment variable to the system and set it to "true" (To re-enable Platform Verification set the environment variable to "false").
  5. Restart Visual Studio for the changes to take effect (If building from the command line using MSBuild, add /p:SkipPlatformVerification=true to your command line to turn off the task. You can specify the variable in the project file also, so that this information is persisted across sessions).

Source: Visual Studio For Devices blog

Thursday, May 13, 2010

Visual Studio 2010, Crystal Reports, GAC... ARGHH!

I wrestled with this issue along with my workmate for quite a few hours, so hopefully this helps someone out there.

With the recent release of Visual Studio 2010, we took the opportunity to install it at work and migrate our solution across from Visual Studio 2008. We decided to leave Visual Studio 2008 installed as you can have side by side installations of 2008 and 2010. After installation was complete, we managed to get our solution and its projects converted successfully. We thought everything was going well, and it was up till this point...

We then went to build the solution and this was when Visual Studio 2010 started complaining that it could not find the Crystal Report assemblies that our projects reference. There was that big fat ugly exclamation mark in a yellow triangle icon next to each of the Crystal assemblies in the reference list. Visual Studio could not find any of the Crystal Report XI Release 2 assemblies in the GAC, even though they were there.

Perplexed, we searched the internet for a solution but could not find anything documenting our problem. Eventually, we realised that there was an entry in Add/Remove Programs called "Crystal Reports Basic for Visual Studio 2008". This must have been installed with Visual Studio 2008. Upon uninstalling this and reopening our solution in Visual Studio 2010, the Crystal assemblies were all detected in the GAC by the projects.