The "ValidateXaml" task failed unexpectedly.

cs_mickael56100 Messages postés 94 Date d'inscription vendredi 12 septembre 2008 Statut Membre Dernière intervention 19 mai 2012 - 20 janv. 2010 à 13:45
sebmafate Messages postés 4936 Date d'inscription lundi 17 février 2003 Statut Membre Dernière intervention 14 février 2014 - 21 janv. 2010 à 11:41
Bonjour, j'ai une erreur lorsque je compile mon projet silverlight. Est ce que quelqu'un pourrait m'aider?

Error 1 The "ValidateXaml" task failed unexpectedly.
System.IO.FileLoadException: Could not load file or assembly 'file:///u:\visual studio 2010\Projects\TEST SL 2\IZI SL 2\obj\Debug\TEST SL 2.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///u:\visual studio 2010\Projects\TEST SL 2\TEST SL 2\obj\Debug\TEST SL 2.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.

at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.XamlValidator.Execute(ITask task)
at Microsoft.Silverlight.Build.Tasks.ValidateXaml.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)

TEST SL 2


Je n'ai pas ce probleme sur mon pc portable avec Windows Vista uniquement sur mon pc de travail avec Windows XP, sur lequel était installé la version 2 de silverlight.
Lorsque je lance un nouveau projet et que je selectionne Navigation Application, j'ai ce message d'erreur des la premiere compilation, je vois pas d'où cela peut venir.
En effet je pense que les modeles de Visual Studio 2010 Beta 2 ne comportent pas d'erreur.

1 réponse

sebmafate Messages postés 4936 Date d'inscription lundi 17 février 2003 Statut Membre Dernière intervention 14 février 2014 37
21 janv. 2010 à 11:41
Bonjour,

Je pense que ton projet VS2010 est un projet SilverLight 3.
Il faut donc que tu installes SL3 sur ton poste XP.


Sébastien FERRAND
Lead Developpeur
Microsoft Visual C# MVP 2005 - 2009
0
Rejoignez-nous