Bill Morefield My thoughts, discoveries, and occasional rambiings.

June 27, 2012

Fixing Error when Building Windows Phone Apps on Network Drive

Filed under: development — Tags: , — Bill Morefield @ 6:31 pm

I’m working on building a Windows Phone application and ran into an interesting error that took some time to track down and I thought I’d share the fix here. I normally develop on a Windows virtual machine running on my MacBook. To make backups simpler and to sharing files between machines easier, I map the documents of the virtual machine to the MacBook’s documents folder. This means that my documents folder inside the VM appears to be on a network drive.

When I tried to compile my phone app for the first time I got an error similar to this:
Error : Could not load the assembly
Path to Assembly\MyApplication.dll.
This assembly may have been downloaded from the Web. If an assembly has been downloaded from the Web, it is flagged by Windows as being a Web file, even if it resides on the local computer. This may prevent it from being used in your project. You can change this designation by changing the file properties. Only unblock assemblies that you trust. See http://go.microsoft.com/fwlink/?LinkId=179545 for more information.

This belongs on the all time list of bad Microsoft error messages in that it not only is wrong, it’s downright misleading. the article discusses assemblies downloaded from the web. In my case the problem couldn’t have anything to do with the assembly being downloaded form the web. First the assembly in question is one that I’m trying to compile. There is no option to unblock as the article suggests as a fix.

I finally figured out the problem comes from the assembly, and my whole project, resides on a network drive as far as Windows is concerned. The first and most common fix I found was to move the project to the local hard drive. That wasn’t my first option so I looked into alternatives.

I finally found an article on Microsoft’s web site that gives a fix at http://msdn.microsoft.com/en-us/library/dd409252%28VS.100%29.aspx, but even this article has problems. It tells you to ignore it in the header and refers to the other article in spite of it being the actual fix for what’s probably a more common problem (purely my speculation, but I feel more people are probably accessing assemblies on a network drive than downloading them from the Internet). It also doesn’t really tell you where to apply the fix. The change needs to go into the devenv.exe.config file under C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE (or C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE if you’re running a 64 bit OS). Under Windows 7 the file and folder are protected making the file a bit tricky to edit so here’s the process I used.

  1. Copy the devenv.exe.config file from the appropriate IDE path for your OS to a directory you have full rights to (your documents folder for example).
  2. Open the copy of the file in a text editor (Notepad for example) and look for the line
    <runtime>
    which will be close to the top of the file.
  3. Directly under this line add the following line
    <loadFromRemoteSources enabled=”true”/>
  4. Save the changed file.
  5. Now copy the edited file from your temporary directory back to the directory you moved it from. You will be told it requires admin rights and have to grant them. Do so.
  6. Restart Visual Studio and it works.

June 4, 2012

What I Want in IOS 6

Filed under: apple,iPhone,mobile technology — Tags: , , — Bill Morefield @ 1:17 pm

By the time IOS 6 likely comes out in the fall I’ll have been using IOS for two years.  Overall I enjoy my iPhone and iPad in spite of the occasional quirks.  No technology is perfect and I’m too much of a technically minded user to ever completely like any system that I didn’t create.  With IOS 6 likely to be announced soon, I thought I’d throw my two cents on the changes I’d like to see in the next version of Apple’s mobile OS.

A Common Documents Storage

Many of my annoyances with IOS would go away with this single change.  I’m not talking about a full file system access to everything on the device, but just a single document area that all apps can access.  I want to be able to create a file in QuickOffice and be able to edit it in Pages.  I want to be able to save a file as a PDF in one app and then read it in GoodReader later.  The independent silos where all apps are self contained mean I often have the same file on my device multiple times.  I think this is the biggest obstacle to using the iPad as a creation device.

Another thing a centralized document system would allow are easier email attachments and multiple attachments to an email.  Imagine being able to email two photos at the same time to someone.

Better Data at a Glance

With IOS an icon generally tells me nothing other than I can tap it to start an application.  I can get a number, but a single number can only tell you s much.  It’s useful for how many like unread messages or voicemails I have, but tells me nothing about who sent those messages or called.

Microsoft is doing this right in Windows Phone and Windows 8.  The weather apps shows me at a glance if I need my umbrella that day.  The sports app shows me who won last night.  I’d love a small block on my iPhone to show me these things.  When I’m busy let me find what I need and go.

Conduits Between Apps

Why does every developer have to write DropBox integration into their App?  Give an interface that app developers can write against and then let DropBox, SugarSync, Google Drive, and everyone else write their own handler of that interface.  If I want to use Microsoft’s SkyDrive to store my files, I don’t want to worry about if the developer chose to integrate it.  Let Microsoft write an implementation of SkyDrive and then every app instantly supports it.

This would work for so many things.  Let’s say I have a program to manage my photos on my device.  I use 500px to post my photography, so why not a search interface that let’s me search for photos there just like searching for photos on my device?  The integration options would really open up apps to the world.

Better App Organization

I really don’t need or want two folders with the same name because I have one more than the limit Apple decided I should keep in one.  There is no way that having Games 1 and Games 2 makes sense.  Let me put more things into a folder or even better let me put as much as I want into a folder.

Centralized Communication

I’ve always wanted a unified communication point.  I want all my email, text messages, even phone calls and voicemails in one place.  I want to see Facebook updates, RSS updates (yes I still use those), Google+ posts, and tweets there too.  Tie this in with the connectors mentioned above so that anybody could make their service available to the hub.

Bring my digital life to a centralized point and let me choose what I want to see at a given time.  If I’m meeting someone for dinner I may want to just look for any texts or emails from her or for a tweet about being traffic letting me know she’ll be a little late.  If I’m coming back from a week’s vacation in the mountains, I want to see everything work related from the last week, but only from co-workers.

Stop Worrying So Much if Apple Gets it Cut

I know this one has zero chance of happening, but it’s just an annoyance I’d like to see go away.  Apple seems determined to make sure nothing happens on the device where Apple doesn’t get it’s 30% cut.  Want to buy a book for the Kindle App?  Have to go to the web site as Apple’s rules would require Amazon to give Apple a 30% cut if it could be done there.

This simply makes my life less convenient and isn’t making Apple any more money.  Vendors have overwhelmingly shown that they’ll just remove the functionality to purchase in app and rely on their customers to find them somewhere else.  And it’s working.  I don’t use iBooks because it’s more convenient, I use Kindle because it’s what I want.  My audiobooks come straight from Audible.

That’s my wish list for iOS 6.  Anyone else with requests?

Powered by WordPress