CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
Type 'TagLib.File' is not defined
- Article ID:
214 - Date Created
Saturday, March 25, 2017 - Last Updated
Wednesday, December 15, 2021 - This Article Has been Viewed
1533 times - Short Desc
Using the taglib-sharp.dll on a website without a reference to the DLL library, you will receive Type 'TagLib.File' is not defined. - Details
When using Visual Studio, you add a reference to the taglib-sharp.dll, which will add files to the /bin folder within your website directory. You can then make references to the Library using simple code like this.<%
Dim mp3 As File = File.Create("G:\WebSite1\01Fantasy.mp3")
Dim strTitle As String = mp3.Tag.Title
Label1.text = strTitle
%> - Recreate Issue
To Reproduce this issue.
Using the code above that works within Visual Studio does not work in a website without referencing the DLL file within your project. - Resolve Issue
This is taken from the blogs over at Microsoft. Thanks to their Blog Member. tolong« for this information.
Using the Visual Basic Developer Command Prompt.
Click on your [Start] Menu.
Choose [Programs]
Scroll down to the [Visual Studio 2015] (your Version number here)
Choose [Developer Command Prompt for VS2015] (your Version number here)
When the window opens, do the following commands.
C:\Windows\system32>
type in
cd G:\ (Replacing the G with the drive you have your DLL files at)
G:\>
Type in cd Packages (To in the rest of the location here, and hit Enter)
G:\Packages>
NEXT
G:\Packages>gacutil -i taglib-sharp.dll
If successful, you will receive this message.
[Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
Assembly successfully added to the cache]
NEXT
G:\Packages>gacutil -l taglib-sharp
If successful, you will receive this message.
[Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0
Copyright (c) Microsoft Corporation. All rights reserved.
The Global Assembly Cache contains the following assemblies:
taglib-sharp, Version=2.1.0.0, Culture=neutral, PublicKeyToken=db62eba44689b5b0, processorArchitecture=MSIL
Number of items = 1]
The above string you will need.
>> taglib-sharp, Version=2.1.0.0, Culture=neutral, PublicKeyToken=db62eba44689b5b0
With the above done, you will need to add that information into your web.config file, which will look like this.<%
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" strict="false" explicit="true" targetFramework="4.5">
<assemblies>
<add assembly="taglib-sharp, Version=2.1.0.0, Culture=neutral, PublicKeyToken=db62eba44689b5b0"/>
</assemblies>
</compilation>
</system.web>
</configuration>
%>
You will then be able to run your taglib-sharp website on your server.
how-to-get-your-publickeytoken«
--------
Related Articles
TYPE 'EXIFREADER' IS NOT DEFINED«
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16825