views:

373

answers:

4

I am trying to test out MVVMLight but the DLLs that come with it are BLOCKED. I have read about it and I am told to click the UNBLOCK in the file property.. but that doesnt exist for me.. Then I found out of a program called STREAMS that is suppose to unblock.. that didnt work... any other idea how to fix this?

Error 7 Could not load the assembly file:///C:\MIX10-MVVM-Samples\Mix10.MvvmDemo2 - End\Mix10.MvvmDemo2\Bin\Debug\GalaSoft.MvvmLight.Extras.SL4.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. Mix10.MvvmDemo2

+4  A: 

Unblock the zip file first, and then extract the dll's. Actually that's what they instruct to do here.

Otávio Décio
But there is not option on th ezip file as well to 'unblock' in the properties.... I don't know why I am missing this piece.. i can only guess it has something to do with security at the company?
punkouter
+2  A: 

The file contains an alternate data stream that indicates that the content was retrieved from the Internet and is not secure. This is a feature of the NTFS file system, one that's unfortunately well hidden because Explorer has no support for showing their content. You can see them from the command prompt with the DIR /R command option. And type their content with TYPE filename:streamname. And delete them with DELETE filename:streamname

Other tricks is to copy the file to a file system that doesn't support alternate data streams, that slices them off the file. A flash drive for example. Or a zip utility.

Hans Passant
so you are saying if I just copy the .dll that are blocked to a flash drive and then copy them back they will be unblocked? ill try that.
punkouter
@punkouter. Of cause if you copy a file to another drive which not support NTFS all additional steams will be deleted and you will have unblocked file.
Oleg
ok did it.. seemed to work! hate this feature! (or sercurity putting restrictions on my machine)
punkouter
+2  A: 

Only for general understanding. NTFS supports streams (see http://msdn.microsoft.com/en-us/library/aa364404%28VS.85%29.aspx). The full name of a stream is filename:stream_name:stream_type. So one can easy write some additional information about a file in an additional stream of file. If you download a file from the internet Internet Explorer write some simple information in a stream with the name Zone.Identifier. If you have a file test.dll downloaded from the internet you can use

more < test.dll:Zone.Identifier

to see information from the stream. You will see something like

[ZoneTransfer]
ZoneId=3

Unblocking is not much more as deleting of this stream. I recommend you to read http://weblogs.asp.net/dixin/archive/2009/03/14/understanding-the-internet-file-blocking-and-unblocking.aspx for more detaild information

Oleg
it seems like I don't have permissions to unblock . but I realized mvvmlight is open source so I suppose I can just compile it myself atleast.
punkouter
A: 

I simply opened the dll file in notepad++ and saved it with a different name.

ondesertverge