I have a Visual Studio solution that was upgraded to use .NET Framework 4.5. It was working fine until I started getting the following error(s) running Code Analysis as part of the build:
CA0052 : No targets were selected
CA0055 : Could not load D:\dev\MySolution\MyProject\bin\Release\MyProject.exe. The following error was encountered while reading module 'System.Xml': Could not resolve type reference: [mscorlib, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089]System.Runtime.CompilerServices.IAsyncStateMachine
That seemed odd, as I confirmed that the application did have an assembly reference to System.Xml. I even tried re-adding the reference but that made no difference. The interesting thing is that the type (IAsyncStateMachine) is new in .NET 4.5, even though it is included in mscorlib Version 22.214.171.124. That’s because 4.5 is an in-place upgrade.
I did notice that you do get separate copies of the reference assemblies located in
C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework. Reflecting on the mscorlib.dll assembly in the v4.0 folder showed it did NOT have
IAsyncStateMachine, but the one in the v4.5 folder did. Could that be relevant?
Opening up the .csproj file, I discovered that another assembly reference suspiciously had the following HintPath defined
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.dll</HintPath>
Re-adding this reference, resulted in Visual Studio changing it to just this:
<Reference Include="System.Web" />
And then re-building the solution with Code Analysis enabled was successful.
In it’s 2 and a bit year history, this is the first time I’ve ever seen Aussie Toilets listed as a featured app in the Windows Phone 8 Store!
It’s one of the featured apps for 2nd July 2013. Nice!
It’s getting cold in Adelaide – the middle of June, and the leaves are turning yellow and red on some of the trees in our garden. The jonquils are blooming, and the daffodils won’t be far behind.
We’ve got a great crop of mandarins and lemonades. Been enjoying the mandies with lunches and juiced a couple of bucket loads of lemonades already.
The tangello has a few more fruit this year, and the new lime tree also has a couple already (though it obviously isn’t liking the cold as it’s lost most of it’s leaves. I hope they grow back in spring).
It’s been pretty wet the last few weeks, so there’s some interesting mushrooms growing in the garden mulch
I was introduced to “Lean Thinking” by my friend Jane, who’s been involved in applying the “Toyota Production System” principles in a major public hospital setting (not the first place you’d think of finding something that was created by a car manufacturer). After learning about Lean and considering that it seemed to have some overlap with the Agile software development processes that have become more popular in the last 10 years, I then discovered the work of Tom and Mary Poppendieck who had published Lean Software Development: An Agile Toolkit, the first of 3 books on the subject.
Reading their work is still on my ‘to do’ list, but it was while I was reviewing their recommended reading list that I decided to purchase Kniberg’s book.
Lean from the Trenchesis an fascinating case study in applying Lean and Kanban to the development of a software application for the Swedish Police. Kniberg worked as a coach part-time on the project for about 7 months before publishing this book. As I understand it, this was a ‘greenfield’ application (which might explain how they could do the 30 bug limit).
I found this book very interesting. In particular, the following stood out for me:
- the regular Process Improvement Workshops – initially a weekly cross-team meeting to look at implementing change quickly
- the way they used Kanban and the changes made over time to the board to make it work better.
- Identifying recurrent bugs with root-cause analysis
- Having limits for work in progress (which doesn’t include bugs)
- Not using story points (though features are estimated with Small/Medium/Large T-shirt sizes)
- The “Next 10 features”
- Balancing features and ‘tech stories’ (technical debt)
- Limit list of bugs to be fixed at 30!
- Testers working in development teams
- Many bugs get fixed immediately if possible
- Importance of visualisation and communication
I’m most familiar with Scrum, so there was a reasonable amount of familiarity with some of their practises. The focus on the Kanban board was interesting. I do like the fact that it is so visible. Kniberg feels having a physical board is important, though I wonder how that would work if he had to manage distributed teams.
In summary, a great read with some thought-provoking ideas.
I went to fire up Remote Desktop on my home PC on Wednesday and was greeted with this unusual error:
“The procedure entry point could not be located in the dynamic link library C:\windows\System32\WINMM.dll”
(Yes, there’s an extra space between ‘point’ and ‘could’ – I think that’s where the name of the entry point would normally be displayed). Taking a screenshot was quite tricky as even Paint refused to start, but I managed to get the Snipping Tool to save a .png (despite a few error along the way)
Very odd, as I had used RDP a few days earlier, and most other things still worked fine (launching IE etc).
Using the Windows 8 keyboard shortcut of Win-X and choosing the ‘Command Prompt (Admin)’ resulted in “File system error (-1073741511)”
This is not looking good. I could use the Refresh option but the downside of that is that you need to reinstall all your non Store apps. So I thought I’d try some of the other options before resorting to this.
First up, I brought up the Advanced Startup Options menu by Choosing ‘Restart’ and hold down ‘Shift’ key.
After reading Fixing component store corruption in Windows 8 and Windows Server 2012, I tried running
DISM /Online /Cleanup-Image /RestoreHealth
But that failed with:
Error 0x800f0906 The source files could not be downloaded
This might be because this PC uses a Wireless USB NIC which doesn’t get enabled when running in safe mode?
I then mounted the Windows 8 .iso and re-ran DISM with /source:i:\sources\SxS option, but surprisingly that failed too.
Next, I found a network cable, and rebooted to Safe Mode with Networking, and ran DISM again.. but no luck
Then I tried sfc /scannow
This reported corruption that was it unable to repair.
I had a bit more success using the PowerShell cmdlet Repair-WindowsImage -RestoreHealth and using the -Sources argument to point it to the Windows folder on my laptop (I’d shared this folder). That seemed to update some of the SxS files, but didn’t fix the actual problem.
Back to the Advanced Startup Options to Choosing System Restore. I selected the restore item, but that failed because there was a problem with it!
Finally, I went back to the Advanced Startup Options and chose the Command Prompt option. This is the one that brings up the command prompt and sets the current directory to X:\Windows\System32. I decided to give SFC one more try, but this time using the offline options. I first ran diskpart and then “list volume”, which told me that the boot drive (the one with the name ‘System Reserved’ was C: and my Windows drive was E:.
I then ran:
SFC /SCANNOW /OFFBOOTDIR=C: /OFFWINDIR=E:\Windows
This ran for about 10 minutes and then reported it had successfully fixed some corrupted files.
For good measure, I then ran a CHKDSK and then re-ran the SFC command. This time it reported not finding any errors.
Rebooting and FINALLY(!) it looks like everything is working ok again.
Now to make a good restore point and ensure I have better backups in place in case this happens again. Not sure what the cause was – I’ll have to keep an eye on the hardware incase it’s an SSD on the way out.