Select to view content in your preferred language

Using Templates from the Template Gallery

833
7
08-17-2010 04:01 PM
DavidAshton
Frequent Contributor
Hello,

I am just getting started and I wanted to try and implement a template that I downloaded from the template gallery samples.  When I load the template in VS 2010 I get a bunch of errors (21).  The first one is stating
"Error1 : Unable to load the metadata for assembly 'FrostedTabs'. This assembly may have been downloaded from the web.  See http://go.microsoft.com/fwlink/?LinkId=179545.  The following error was encountered during load: Could not load file or assembly 'FrostedTabs' or one of its dependencies. The system cannot find the file specified C:\SilverLight_Apps\FrostedTabs\FrostedTabs\MainPage.xaml"

When I go to the Mircosoft website I see the direction to unblock the assemblies and when I go into my download folder I notice most of the files are blocked.  Under the General tab the security statement is say that "the file came from another computer and might be blocked to help protect this computer."  and have the option to unblock.

My questions are: is this my problem? If so do I need to unblock every file manually or is there and easier faster way to do this at the folder root level.

Thanks
David
0 Kudos
7 Replies
JenniferNery
Esri Regular Contributor
Based on the link you provided, there is a way to unblock the files inside the zip collectively if you are using Windows 7. You did not do anything wrong, it's just that these files were marked unsafe and needed to be unblocked prior to use.

For Windows 7,
1. Right click on the zip file
2. Click on 'Properties'
3. Choose 'Unblock' in the 'Attributes' section
4. Extract file

Note: If you unzip the file before unblocking, all files in the extracted folder are flagged as unsafe.
0 Kudos
DavidAshton
Frequent Contributor
Jennifer thanks for the reply.  That helped, I now have all my files marked a safe. 

I'm still running into the same problem.  When I open the Template in V.S. 2010, it loads and if I click on main xaml page I still get 21 error messages and 7 warning.  The first error reads:

Unable to load the metadata for assembly 'FrostedTabs'. This assembly may have been downloaded from the web.  See http://go.microsoft.com/fwlink/?LinkId=179545.  The following error was encountered during load: Could not load file or assembly 'FrostedTabs' or one of its dependencies. The system cannot find the file specified.
C:\SilverLight_Apps\FrostedTabs\FrostedTabs\MainPage.xaml
FrostedTabs


Am I missing something?  Is there a quick tutorial or video on getting started with the templates?  I'm new to Silverlight but having experience with programming so.....I shouldn't be this lost.
0 Kudos
DarinaTchountcheva
Frequent Contributor
Hi Dave,

You can add this to your web.config file under the "configuration" tab to get you started:

[HTML]<runtime>
    <loadFromRemoteSources enabled="true"/>
</runtime>[/HTML]

I like the frosted tabs too. 🙂
0 Kudos
DavidAshton
Frequent Contributor
Darina,

Thanks for the reply.   I think that helped with my 7 warning message but I still have the 21 error messages.  So I just tried to build a new application from scratch and when I debug/build the app. I get an error message "Unable to start debugging.  The Silverlight Developer Runtime is not installed.  Please install a matching version.

I have Silerlight Deve Runtime installed. (Silverlight 4).  Do I need Silverlight 3 runtime? 

Are my problems with the template the same as this problem.
0 Kudos
DarinaTchountcheva
Frequent Contributor
Hi Dave,

I am not sure what exactly has happened but you might have installed a higher non-debugging version of Silverlight on your machine.

Here is a link that might help you solve your problem:

http://blogs.msdn.com/b/alikl/archive/2010/07/14/resolve-unable-to-start-debugging-the-silverlight-d...

And make sure you have all the necessary SDKs and tools (look under Installation):

http://help.arcgis.com/en/webapi/silverlight/help/index.html

Good Luck!
0 Kudos
DavidAshton
Frequent Contributor
Darina,
Thanks a bunch for taking the time to solve my problem.  The blog download solution worked:  it allowed me to debug the website I built from scratch and it allowed me to debug the template which eliminated all my errors except one.

The only error I'm receiving now is
Undefined CLR namespace. The 'clr-namespace' URI refers to a namespace 'Toolkit' that is not included in the assembly. C:\inetpub\wwwroot\FrostedTabs\FrostedTabs\MainPage.xaml
Line: 8 Column: 19 FrostedTabs


I'm wondering if the reference to toolkit should be something else:

Currently it looks like this

xmlns:toolkit="clr-namespace:Toolkit"


I'm wondering if it should be this
   
    xmlns:toolkit="clr-namespace:Toolkit.Icons"

or
 xmlns:toolkit="clr-namespace:FrostedTabs"


Well thanks again for all your help.
0 Kudos
DarinaTchountcheva
Frequent Contributor
Dave,

You can just delete this namespace. It is not used anywhere.
I downoaded the template, and got that same error. Deleted the namespace, and the application worked.

Good Luck!

Darina
0 Kudos