新手 新建了一个Silverlight 程序, 怎么运行不起来??
如题,就是按照 MSDN 上面说的,通过向导建立了一个 silverlight 程序。
但是 VS2010 程序报错。我把错误铁山来了,老鸟们看看怎么回事
Error1The "ValidateXaml" task failed unexpectedly.
System.IO.FileLoadException: Could not load file or assembly 'file://\\studenthome.qut.edu.au\group18$\n7063318\documents\visual studio 2010\Projects\SilverlightApplication3\SilverlightApplication3\obj\Debug\SilverlightApplication3.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file://\\studenthome.qut.edu.au\group18$\n7063318\documents\visual studio 2010\Projects\SilverlightApplication3\SilverlightApplication3\obj\Debug\SilverlightApplication3.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)
SilverlightApplication3
Error2System.NullReferenceException was thrown on "\\studenthome.qut.edu.au\group18$\n7063318\documents\visual studio 2010\Projects\SilverlightApplication3\SilverlightApplication3\MainPage.xaml": Object reference not set to an instance of an object.\\studenthome.qut.edu.au\group18$\n7063318\documents\visual studio 2010\Projects\SilverlightApplication3\SilverlightApplication3\MainPage.xaml11SilverlightApplication3
[解决办法]
http://blog.csdn.net/madaming/article/details/6329640