book
Article ID: KB0079247
calendar_today
Updated On:
Description
While validating custom extension projects added in the SDK Package Builder, you may encounter the following error.
-----------------------------------------------------------------------
NotSupportedException at :
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
------------------------------------------------------------------------
Issue/Introduction
Resolving common errors with SDK Package Builder.
Resolution
This is a commonly generated error by a Windows protection mechanism, which occurs when Windows blocks assembly files or executable files that were downloaded from the internet. Although it is possible to “Unblock” every Spotfire assembly file individually, it is recommended to unblock the entire downloaded SDK zip archive file, then re-extract the contents to ensure that all potential blocks are removed.
Steps:
1). Right-click on the downloaded SDK zip archive, and select Properties to view the attributes.
2). Look at the bottom of the General option. If you see a Windows security message pertaining to the computer potentially blocking the archive, click on the unblock button "Apply", then click OK.
3). Re-extract the SDK zip archive.
While validating custom extension projects added in the SDK Package Builder, you may encounter the following error:
-------------------------------------------------------------------------
Error message: Object reference not set to an instance of an object.
NullReferenceException at Spotfire.Dxp.PackageBuilder:
Object reference not set to an instance of an object. (HRESULT: 80004003)
Stack Trace:
at Spotfire.Dxp.PackageBuilder.Configuration.GetAssemblyBindings()
------------------------------------------------------------------------------------
Resolution:
The error message suggests that a valid TIBCO Spotfire Distribution was not added to the Package Builder configuration.
Steps:
1). In the Package Builder dialog, click "Manage".
2). In the Manage Configurations dialog, click "Add" and in the resulting Add Configuration dialog, provide a Configuration name.
3). Click File > Add TIBCO Spotfire Distribution, then navigate to the full path of your Spotfire Analyst/Professional client installation directory.
4). Browse to the Modules folder for your TIBCO Spotfire Analyst installation, and then click Select Folder.
For example, "C:\Program Files (x86)\TIBCO\Spotfire\<versionNumber>\Modules". If you do not have Admin rights to the computer, packages are installed in your local User profile directory. For example, "C:\Users\<username>\AppData\Local\TIBCO\Spotfire\<versionNumber>\Modules". The Spotfire distribution is displayed in the Spotfire Package Builder.
5). Select the check box next to the Spotfire Distribution if it is not automatically selected. Then, click the "Validate" and "Save" button.
While validating custom extension projects added in the SDK Package Builder, you may encounter the following error.
---------------------------------------------------------------------------------------
Package 'packageName' has unresolved assembly references:
'Spotfire.Dxp.Web, version xx.x.xxxx.xxxx' is referenced by 'assemblyFileName.dll'.
---------------------------------------------------------------------------------------
Resolution:
This error message can be generated for any native Spotfire assembly files that is not part of the Spotfire Analyst client default distribution. To resolve, you can include the native Spotfire assembly file in the custom extension folder. This is done by setting the build property on the assembly file reference in Visual Studio. Pay attention to not select and include native Spotfire assembly files in the custom extension package, because it will result in file dependencies conflict upon deploying the custom extension package on the Spotfire Server or during a Spotfire Server upgrade.
Another method to resolve the issue is to add the Spotfire assembly file to the global assembly cache.
1). Launch the Visual Studio command line prompt. Add the assembly file to the global assembly cache (GAC) using the following command.
gacutil /i [assembly file path]\assemblyname.dll
Example
==============================================================================
C:\SDKversion7.0_Install\Binaries> gacutil /i Spotfire.Dxp.Web.dll
Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.17929
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly successfully added to the cache
============================================================================
2). Validate and Save the custom extension project.
Note: If you would like to remove the assembly from the GAC, run: gacutil /u assemblyName
Example
gacutil /u Spotfire.Dxp.Web
Additional Information
Doc: TIBCO Spotfire Package Builder