Archive | Visual Studio RSS feed for this section

Child node exited prematurely. Shutting down.

13 Jan

As written yesterday I have spend the weekend working on a Windows 8.1 solution for a customer. For several good reasons (mostly fun) I tested the solution on my Windows 10 Preview machine running Visual Studio 2015 Preview.

When I compiled I got the following error:

Child node “2” exited prematurely. Shutting down. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt.

The error itself didn’t reveal much about the error but of course everything pointed at either Windows 10 Preview or Visual Studio 2013 Preview.

A quick search showed surprising few results. I found two leads that I tried to follow.

First lead was this one Problems with Parallel build using MSBuild at StackOverflow. It lead me into modifying the MSBuild process to run without parallel. I tested in a command prompt with the following command.

“C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe”
“C:\Source\[Customer]\[Project]\[Solution].sln” /t:Build /m
/v:q /p:Optimize=”True”;DebugSymbols=”True”;Configuration=”Release”

The issue remained and I had to follow my next lead HeatDirectory failure on TFS with MSBUILD error MSB4166: Child node “3” exited prematurely also from StackOverflow. It lead me into modifying the solution and projects to x86 instead of x64 as well as changing the MSBuild process to build on an x86 platform. The issue remained.

To be honest at this point everything seamed like a bug in Visual Studio 2015 Preview and I actually considered giving up and accepting the bug (hahaha I wouldn’t give up in a million years!). A little bit desperate I installed Visual Studio 2013 on my Windows 10 Preview machine. To my frustration the issue remained in Visual Studio 2013.

For fun I tried to begin to exclude projects and files in the solution. First the test projects (of course!), then the portable class libraries and then the nuget packages. The issue remained. Finally I began removing features and styles and suddently I could build and 5 minutes later I had identified the bug.

As part of our refactoring between the Windows Phone 8.1 project and Windows 8.1 project we had by mistake added a DataTemplate to a ResourceDictionary. Well it is actually ok but the issues was that a Button in the DataTemplate called the Tapped eventhandler (and that is definitely no-go!).

To reproduce the error all you need to do is add a ResourceDictionary to your solution (you don’t need to make a reference to it from the App.xaml file). Add the following DataTemplate to the ResourceDictionary:

<DataTemplate x:Key=”template1″>
<Grid>
<Button Content=”Hello World”
Tapped=”button_Tapped” />
  </Grid>
</DataTemplate>

With the eventhandler removed the solution compiled in both Visual Studio 2013 and Visual Studio 2015 Preview on my Windows 10 Preview machine. Finally! :D

Obviously something is changed between Windows 8.1 and Windows 10 in the way solutions are compiled or at least at what causes a compile error (looking into that now). And I guess a few improvements could be in place regarding the error message :)

// thomas

Xamarin for Visual Studio 2015 preview

20 Nov

As part of the Connect() event Microosft released Visual Studio 2015 preview. It is an awesome version of Visual Studio with lots of new exiting features. Building cross platform apps is now integrated deeply into Visual Studio giving even more focus on Xamarin as solid cross platform technology. For period we have begun looking at Xamarin as part of our portfolio in Bluefragments. Hence the even closer  relation between Microsoft and Xamarin is great for a company like Bluefragments.

photo-2-copy1

The installer for Xamarin for Visual Studio 2015 preview is available from within Visual Studio 2015 and you will be prompted to download it when you try to build your first Android or IOS app.

2014-11-20_203331

By default, the Xamarin Windows Installer will just update the components you have previously installed, when applying an update. Since you previously didn’t have 2015 components installed, then by default you won’t be getting them installed right now – that is a bug and the workaround is right here.

Happy cross platform development :)

// thomas

Code Sample Browser

18 Feb

Yesterday I had the pleasure of talking to a guy from the Microsoft All-In-One Code Framework team. He introduced me to a Code Sample Browser app for Windows Store that gives developers a way to search, download and browse over 4500 code samples from MSDN Samples Gallery. The Sample Browser is also available for the Desktop.

// thomas

twitter | linkedin | blog

Templates in Visual Studio 2012

1 Nov

For some time now I have developed XAML based Windows Store apps using Visual Studio Ultimate 2012. The apps are built for clients as part of my company targeting consumers. What I’m trying to get to is that I use Visual Studio and the built-in templates quite a lot. And with that also comes some features requests :)

The built-in solution templates are fine. They are good for getting started and learning about the new guidelines for building Windows Store apps and Windows Phone apps. I guess that every Windows Store developer have tried to build a demo app based on the templates. So my issues comes to adding new items to my projects. Every time I add a new Page or new UserControl to a project, I have to delete 20 lines of comments in the XAML and in the code-behind (especially for Windows Phone 8). The comments describe how to get started using the items and how to read more about the type of item. This is great information for new developers or developers getting to know the platform – but it’s not appropriate in a pro tool like Visual Studio Ultimate. Why not have it in a starter kit or in the Express editions of Visual Studio (only).

To answer a comment that most likely will pop-up – yes I’m aware that it’s possible to customize the content of the items. It just shouldn’t be necessary in pro tools like Visual Studio. I think.

// thomas

VS2010: Keeping Zoom In Sync Across All Tabs

11 May

Great VS2010 extension by Microsoft that keep zoom level in sync across all tabs.

“This extension creates a global zoom level so that if you zoom a single window, all editor instances will be updated to that zoom level. This helps a great deal if you want to use zooming during a presentation.”

Download it at http://bit.ly/9dqltR

by xamlgeek 
twitter.com/thomasmartinsen

Problem installing VS2010 Beta 2

18 Feb

VS2010 Beta 2 has support for SL3 development and includes SL3 SDK build 3.0.40818. There is a known issue installing VS2010 Beta 2 (and Web Developer Express 2010 Beta 2) on computers running SL3 SDK build 3.0.40624 that is installed with VS2008 and Expression Blend 3.

To fix the issue you need to uninstall SL3 SDK build 3.0.40624 from Add/Remove Programs and then install SL3 SDK build 3.0.40818 from http://go2.microsoft.com/fwlink/?LinkID=157102.

by xamlgeek

Visual Studio 2010 RC available for everyone to download

11 Feb

Visual Studio 2010 RC is now available for everyone to download. Read more at Jason Zander’s blog:

http://blogs.msdn.com/jasonz/archive/2010/02/10/visual-studio-2010-net-framework-4-rc-ready-for-general-download.aspx

or go directly to the download site:

http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx

by xamlgeek

Follow

Get every new post delivered to your Inbox.

Join 1,447 other followers