VS 2010 Beta and Internal Builds

8 posts, 0 answers
  1. Clint Singer
    Clint Singer avatar
    133 posts
    Member since:
    Oct 2012

    Posted 10 Nov 2009 Link to this post

    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
  2. Clint Singer
    Clint Singer avatar
    133 posts
    Member since:
    Oct 2012

    Posted 10 Nov 2009 Link to this post

    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

  3. Milan
    Admin
    Milan avatar
    1989 posts

    Posted 11 Nov 2009 Link to this post

    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.
  4. Carl
    Carl avatar
    202 posts
    Member since:
    Oct 2012

    Posted 30 Nov 2009 Link to this post

    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!!!!!
  5. Clint Singer
    Clint Singer avatar
    133 posts
    Member since:
    Oct 2012

    Posted 30 Nov 2009 Link to this post

    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
  6. Carl
    Carl avatar
    202 posts
    Member since:
    Oct 2012

    Posted 02 Dec 2009 Link to this post

    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.

  7. Steve Y
    Steve Y avatar
    115 posts
    Member since:
    Sep 2008

    Posted 06 Dec 2009 Link to this post

    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
  8. Carl
    Carl avatar
    202 posts
    Member since:
    Oct 2012

    Posted 06 Dec 2009 Link to this post

    Sounds like a great tip!

    I'll certainly give it a try next time.

    Thanks,

    CT
Back to Top