FAQ: Using Graphics Mill for .NET
This topic contains answers for the frequently asked questions related to the problems with
Graphics Mill for .NET usage. Be sure to read this topic
before creating support case.
In this topic:
I am trying to use Graphics Mill for .NET, but receive an error message:
"Could not load file or assembly". How to eliminate it?
Eliminating this problem on the development computer
To eliminate this problem you should install Microsoft Visual C++ 2005 Service Pack 1 Redistributable
Package ATL Security Update on your development computer before using
Graphics Mill for .NET. You can download this package from Microsoft site:
http://www.microsoft.com/downloads/details.aspx?familyid=766a6af7-ec73-40ff-b072-9112bab119c2.
Eliminating this problem on the target computer
If you are going to distribute your application which uses Graphics Mill for .NET to
computers where it is not guaranteed that Visual C++ 2005 is installed, you should redistribute Visual C++ DLLs
along with your application. There are three ways to redistribute Visual C++ DLLs with your application:
- Use Visual C++ Redistributable Merge Modules to install a particular Visual C++ library as shared
side-by-side assemblies into the native assembly cache (WinSxS folder). This is
the primary recommended way for redistributing Visual C++ libraries. Access to this folder requires that the
installer application be run by a user with administrative rights.
- Use Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update to install all Visual C++
libraries as shared side-by-side assemblies into the native assembly cache (WinSxS
folder). This package can be downloaded from the Microsoft download site using the link above.
To deploy Visual C++ libraries by using Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update,
perform the following steps:
- Create a folder structure on the development computer that matches the folder structure to be used on the target computer.
- Copy this folder to the target computer.
- Copy Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update to the target computer.
- Run vcredist_x86.exe (or vcredist_x64.exe) on the target computer.
- Install a particular Visual C++ DLLs as private assemblies for the application using files provided in the
C:\Windows\WinSxS directory. This way is recommended to enable installation of applications by users who do
not have administrative rights or when it should be possible to run an application from a share. To deploy Visual C++ DLLs as private
assemblies, perform the following steps:
- Create a folder structure on the development computer that matches the folder structure to be used on the target computer.
- On your development machine open C:\Windows\WinSxS folder and copy the following folders to
the folder containing binary assemblies in your application:
x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_[...];
x86_Microsoft.VC80.OpenMP_1fc8b3b9a1e18e3b_8.0.50727.4053_[...].
- Rename folders copied in the previous step:
x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_[...] to Microsoft.VC80.CRT;
x86_Microsoft.VC80.OpenMP_1fc8b3b9a1e18e3b_8.0.50727.4053_[...] to Microsoft.VC80.OpenMP.
- Open C:\Windows\WinSxS\Manifests folder on your development machine, take the following files:
x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_[...].manifest,
x86_Microsoft.VC80.OpenMP_1fc8b3b9a1e18e3b_8.0.50727.4053_[...].manifest,
and copy them to Microsoft.VC80.CRT and Microsoft.VC80.OpenMP folders, accordingly.
- Rename the files copied in the previous step:
x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_[...].manifest file to Microsoft.VC80.CRT.manifest
x86_Microsoft.VC80.OpenMP_1fc8b3b9a1e18e3b_8.0.50727.4053_[...].manifest file to Microsoft.VC80.OpenMP.manifest.
- After that make installation package included the files and folders prepared above and redistribute it.
Note
- Make sure that you copy folders with DLLs and manifests of .4053 version (this version should be in the name of folders and manifest files).
- If you use x64 system you should copy the same folders and manifests with the difference that their names are started with x64_[...].
- You can use the third way for Windows Applications only. For Web Applications you need to use
Visual C++ 2005 Service Pack 1 Redistributable Package ATL Security Update as described in the second way.
Q: How should I properly shutdown Graphics Mill for .NET to be sure
that it releases all resources and removes all temporary files.
Graphics Mill for .NET module and add-ons are represented with
GraphicsMillLibraryModule,
AdvancedPsdLibraryModule,
AviProcessorLibraryModule, and
MediaProcessorLibraryModule classes respectively. Each of these
classes expose the static method ShutDown()
which deinitialize the corresponded module and releases all the temporary files created by this module. Thus it is recommended to call the
ShutDown() method when you close an application
based on Graphics Mill for .NET and/or add-ons.
Q: How should I properly configure my Web application based on Graphics Mill for .NET?
Graphics Mill for .NET and add-ons are written in the Managed C++ and mix managed and unmanaged C++
code in assemblies. These assemblies are non-verifiable and require SkipVerification permission to be
run. Therefore, any Web application which uses Graphics Mill for .NET and add-ons must be run in the
Full trust mode.
There are two ways to set the necessary trust level:
- Modify web.config file:
XML
<system.web>
<trust level="Full" originUrl="" />
</system.web>
- Add Graphics Mill for .NET and add-ons assemblies to the Global Assembly Cache (GAC). You can find
the detailed information about installing assemblies into the GAC in MSDN article
How to: Install an Assembly into the Global Assembly Cache.
By default, Web applications are configured to run with Full trust level. But under certain circumstances the trust level can be reduced.
For example, hosting providers may reduce the trust level due to security policy. In that case, you should contact your hosting provider to solve this question.