Visual Studio 2013 – Clean Solution

I recently upgraded a project from Visual Studio 2010 / .NET4.0 to Visual Studio 2013 (update 4) / .NET 4.5.
Code that was working for weeks, didn’t work anymore (exceptions in Caliburn.Micro).

Summary:
I reinstalled all my Nuget packages, verified the public key tokens of the libraries via the Strong Name Tool (SN.exe -T my.dll), did “Clean Solution”, “Rebuild Solution”, rewritten code, etc…

In a desperate action I manually cleaned every bin and obj folder in my Workspace.
After this action the code started to work again.

Then I was wondering: Does the “Clean Solution” in Visual Studio 2013 work different compared to Visual Studio 2010.
An internet stranger gave me a good hint:

“Sorry, but this is simply not true. It does not delete the contents of /obj which are the root of the problem. At least this is the situation with VS 2013 update 3.”

http://stackoverflow.com/questions/755382/i-want-to-delete-all-bin-and-obj-folders-to-force-all-projects-to-rebuild-everyt#comment41784938_755390

After searching some more, I was happy that I was not the only one who had problems with Visual Studio 2013 and the Clean Solution:

“However, once I’ve converted my projects to Visual Studio 2013 I star receiving error on build or deploy:”

http://kitsula.com/Article/How-to-remove-bin-obj-folder-before-build-deploy

Conclusion: if you upgrade to Visual Studio 2013 and receive strange exceptions, clean the obj directories manually or change your project file to remove the obj directory before each build via the BaseIntermediateOutputPath property/parameter.

By default the BeforeBuild and AfterBuild are not used. You can see this by unloading your project in Visual Studio and then right-mouse click it and select Edit:

<!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->

Uncomment the BeforeBuild.
Your project file should now contain this:

<!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets. -->
  <Target Name="BeforeBuild">
    <RemoveDir Directories="$(BaseIntermediateOutputPath)" />
  </Target>
  <!--<Target Name="AfterBuild">
  </Target>-->

Information on the BaseIntermediateOutputPath property/parameter:

 “The top-level folder where all configuration-specific intermediate output folders are created. The default value is obj\. The following code is an example:  <BaseIntermediateOutputPath>c:\xyz\obj\</BaseIntermediateOutputPath>”

If you receive the Error after changing the project:

 Unable to remove directory “obj\”. The directory is not empty

Go have a look at this url: http://forums.asp.net/t/1976253.aspx
It might also be related to Visual Studio 2013…

Info:
https://msdn.microsoft.com/en-us/library/k5b5tt23(v=vs.110).aspx
https://msdn.microsoft.com/en-us/library/5ak1w89s.aspx
https://msdn.microsoft.com/en-us/library/bb629394.aspx

Fixing comctl32.dll WIN32Exception

A C# project was recently upgraded from .NET 3.5 to .NET 4.0.
The program worked fine, except on a Windows 8 Pro x64 machine where this error was given:

Win32Exception: Cannot load the “comctl32.dll” DLL into memory.

The solution that worked for us (after a long search) was removing CorFlags to set the application to 32-bits mode. When a new build was created without CorFlags and setting Visual Studio to build the project to x86 instead of x64 solved the problem.

It looks like CorFlags is not reliable…

Indie Game: The Movie (trailer)


(via)

Indie Game: The Movie is a feature documentary about video games, their creators and the craft. The film follows the dramatic journeys of indie game developers as they create their games, and as they release those works, and themselves, to the world.

Indie Game: The Movie is about making video games, but at its core, it’s about the creative process and exposing yourself through your work.

This trailer and the film features: Edmund McMillen & Tommy Refenes (supermeatboy.com) Phil Fish (polytroncorporation.com)  and Jonathan Blow (braid-game.com)

Find out more on www.indiegamethemovie.com or via www.imdb.com/title/tt1942884/

Microsoft Holoflector

Holoflector is a unique, interactive augmented-reality mirror. Graphics are superimposed correctly on your own reflection to enable a novel augmented-reality experience. Presented at Microsoft TechForum 2012, Holoflector leverages the combined abilities of Kinect and Windows Phone to infer the position of your phone and render graphics that seem to hover above it.

 

ASP.NET Web API

ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.

Can’t wait for the full version of MVC 4! :-)

[ link ]