This is a migrated thread and some comments may be shown as answers.

VS 2010 Beta and Internal Builds

7 Answers 156 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Clint Singer
Top achievements
Rank 1
Clint Singer asked on 11 Nov 2009, 02:30 AM
Hi,

I have been using the released version of Q3 in VS 2010 Beta 2 without any issues.  I wanted to try the internal build to potentially fix some issues that I have run into.  I took the binaries from the internal build and overwrote the Silverlight folder (after backing up of course).  When I test my software in VS 2008 everything seems fine but when I try it in VS 2010 Beta I get the following error:

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: The "ValidateXaml" task failed unexpectedly.

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: System.IO.FileLoadException: Could not load file or assembly 'file:///C:\Program Files (x86)\Telerik\RadControls for Silverlight Q3 2009\Binaries\Silverlight\Telerik.Windows.Controls.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: File name: 'file:///C:\Program Files (x86)\Telerik\RadControls for Silverlight Q3 2009\Binaries\Silverlight\Telerik.Windows.Controls.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018:

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: at System.Reflection.Assembly.LoadFrom(String assemblyFile)

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: at Microsoft.Silverlight.Build.Tasks.ValidateXaml.Execute()

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018:

C:\Program Files (x86)\MSBuild\Microsoft\Silverlight\v3.0\Microsoft.Silverlight.Common.targets(210,9): error MSB4018:


I get the error in two of my projects which are my controls library and my main application.  If I copy back the old binaries the software compiles and runs fine.

I tried to "Unblock" the assemblies in the main folder but that didn't fix the problem. 

Any ideas?

Cheers,
Clint

7 Answers, 1 is accepted

Sort by
0
Clint Singer
Top achievements
Rank 1
answered on 11 Nov 2009, 02:44 AM
After posting I thought I would continue along the "Unblock" vein since I hadn't done every file.  It turns out that it worked!  Of course Unblocking each file was annoying so I used the SysInternals tool called streams.exe which allowed me to unblock all of the files in the folder.

Now I can use the internal builds in VS 2010 Beta 2.

Cheers,
Clint

0
Milan
Telerik team
answered on 11 Nov 2009, 07:45 AM
Hello Clint Singer,

Thanks for sharing this. It will be very helpful to other users that are experiencing the same problem.


All the best,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Carl
Top achievements
Rank 1
answered on 30 Nov 2009, 08:46 PM
Thanks for solution. I encountered same problem, same error, using latest internal build of Telerik Silverlight controls with VS 2010 beta 2.

Using Sysinternals streams.exe, I deleted all file streams on all instances of the Telerik *.dlls both in my project directories and in the Windows Program Files (x86) Telerik directories. However, that didn't quite solve the problem as the error persisted. So I closed Visual Studio, then re-opened it, "cleaned" the solution, then re-built the project and everything was OK.

So always be sure to clean the project before rebuilding after deleting the streams.

Dear Telerik, Is it possible to distribute your files without streams so that we do not have to delete them??? This would apply both to dll's and chm's. Thanks!!!!!
0
Clint Singer
Top achievements
Rank 1
answered on 30 Nov 2009, 08:59 PM
Well I am glad the solution worked for you. 

The "streams" aren't actually coming from Telerik.  When you extract files from the Internet Windows flags them with an internet zone attribute which Visual Studio sees as a potentially unsafe file.   I think this security feature is new to 2010 because I don't have the same problem with 2008. 

I use the Windows 7 built in "Extract All..." context menu to extract my files which is likely where the stream information is being added.  You may have different results if you use something like 7-zip, WinZip or WinRar.  (Haven't tried though).

It is also important to clean your solution because it ends up with older copies of the files.  Since you installed the new version they don't match so Visual Studio tries to be clever and changes where your files are supposed to come from which is your binary output.  (At least that is what I understand from experience.)

Cheers,
Clint
0
Carl
Top achievements
Rank 1
answered on 02 Dec 2009, 04:27 PM
Thanks for clarification on streams.

If anybody discovers an unzip utility that automatically prevents addition of streams and/or removes the streams, then please do post a note here, and let everybody else know.

0
Steve Y
Top achievements
Rank 2
answered on 06 Dec 2009, 09:24 AM
Instead of unzipping everything and then unblocking all the dlls one at a time, you just need to save the zip file to disk and then change it's properties to unblock. Then when you unzip it, all the dlls within the zip file will be unblocked too.

Regards, Steve
0
Carl
Top achievements
Rank 1
answered on 06 Dec 2009, 11:17 PM
Sounds like a great tip!

I'll certainly give it a try next time.

Thanks,

CT
Tags
General Discussions
Asked by
Clint Singer
Top achievements
Rank 1
Answers by
Clint Singer
Top achievements
Rank 1
Milan
Telerik team
Carl
Top achievements
Rank 1
Steve Y
Top achievements
Rank 2
Share this question
or