---
title: "Hittar ej assembly"
type: "forum-thread"
url: "https://www.webforum.nu/amne/dotnet/53231-hittar-ej-assembly"
topic: ".NET"
topic_url: "https://www.webforum.nu/amne/dotnet"
author: "Dino"
published: "2002-09-14T17:36:39.000Z"
updated: "2002-09-15T14:11:14.000Z"
replies: 8
views: 212
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/dotnet/53231-hittar-ej-assembly"
---

# Hittar ej assembly

## #1 — Dino, 2002-09-14T17:36Z

Har komplierat en .vb fil och den hamnade där den skulle, men när jag skall köra .aspx filen så hittar den inte assemblyn. Någon som kan rada up vanliga fel om detta som man kan använda för att felsöka. Använde detta vid komplieringen

```
vbc /t:library /out:..\bin\CustomControld.dll /r:System.dll /r:System.Web.dll CustomControl.vb
```

  behövs det mer eller skall detta räcka.

Permalänk: https://www.webforum.nu/p/53231

## #2 — Pace, 2002-09-14T19:18Z

Visa lite kod och sökvägen till filen så ska vi nog kunna hjälpa dig.

Permalänk: https://www.webforum.nu/p/785926

## #3 — renholm, 2002-09-14T19:46Z

Plus fullständigt error meddelande.

Permalänk: https://www.webforum.nu/p/785944

## #4 — Dino, 2002-09-14T20:00Z

Detta är ett bokexemple och koden är som den är skriven i boken så enligt felmeddelandet så måste det ha något med sökvägen att göra.
Till .vb filen:
C:\\Webbsidor\\dot.net\\books\\aspnet3veckor\\dag6\\ovning02_02_CustomControl.vb
Till .dll filen:
C:\\Webbsidor\\dot.net\\books\\aspnet3veckor\\bin\\CustomControls.dll
Till .aspx filen:
C:\\Webbsidor\\dot.net\\books\\aspnet3veckor\\dag6\\ovning02_01_CustomControl.aspx 

Felmeddelandet:

```
Server Error in '/dot.net' Application.
--------------------------------------------------------------------------------

Parser Error 
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: File or assembly name CustomControls, or one of its dependencies, was not found.

Source Error: 

Line 1:  <%@ Page Language="VB" Trace="True" Debug="True" %>
Line 2:  <%@ Register TagPrefix="ACME" Namespace="MyCustomControls" Assembly="CustomControls" %>
Line 3:  <script runat="server">
Line 4:  
 

Source File: C:\Webbsidor\dot.net\books\aspnet3veckor\dag6\ovning02_01_CustomControl.aspx    Line: 2 

Assembly Load Trace: The following information can be helpful to determine why the assembly 'CustomControls' could not be loaded.

=== Pre-bind state information ===
LOG: DisplayName = CustomControls
 (Partial)
LOG: Appbase = file:///C:/Webbsidor/dot.net
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===

LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Post-policy reference: CustomControls
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/dot.net/cac529e3/7a7bdeea/CustomControls.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/dot.net/cac529e3/7a7bdeea/CustomControls/CustomControls.DLL.
LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls.DLL.
LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls/CustomControls.DLL.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/dot.net/cac529e3/7a7bdeea/CustomControls.EXE.
LOG: Attempting download of new URL file:///C:/WINDOWS/Microsoft.NET/Framework/v1.0.3705/Temporary ASP.NET Files/dot.net/cac529e3/7a7bdeea/CustomControls/CustomControls.EXE.
LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls.EXE.
LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls/CustomControls.EXE.
```

Permalänk: https://www.webforum.nu/p/785955

## #5 — PatrikB, 2002-09-14T20:58Z

har du lagt in den i web.config?

**web.config**

```
<configuration>
  <system.web>
    <customErrors mode="Off"/>
    <compilation>
      [b]<assemblies>
		<add assembly="myCustomControl" />
      </assemblies>[/b]
    </compilation>
  </system.web>
</configuration>
```

cya,
PatrikB

Permalänk: https://www.webforum.nu/p/786025

## #6 — Dino, 2002-09-14T21:10Z

Gjorde som ovan, men den klagar hela tiden på sökvägen. Får kolla mera imorgon.

> Parser Error Message: File or assembly name CustomControls, or one of its dependencies, was not found.

Permalänk: https://www.webforum.nu/p/786032

## #7 — renholm, 2002-09-14T21:39Z

> LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls.DLL.
> LOG: Attempting download of new URL file:///C:/Webbsidor/dot.net/bin/CustomControls/CustomControls.DLL.

Du har inte lagt din .dll fil i rätt bin mapp. Enligt loggen ovan letar den i \\dot.net\\bin där den ska ligga, din ligger i en undermapp till \\dot.net testa att placera filen direkt i dot.net\\bin och inte i C:\\Webbsidor\\dot.net\\books\\aspnet3veckor\\bin\\ eftersom dot.net troligtvis är din root katalog för applikationen.

Permalänk: https://www.webforum.nu/p/786053

## #8 — Dino, 2002-09-15T10:07Z

Nu funkar det. Tack för hjälpen. Det var som du skrev renholm,  den låg i fel mapp. En fråga till, bin mappen kan endast ligga i rotmappen eller?

Permalänk: https://www.webforum.nu/p/786255

## #9 — renholm, 2002-09-15T14:11Z

Ja, om man inte på något sätt kan lägga in en alternativ bin mapp.

Permalänk: https://www.webforum.nu/p/786426

---

Tråden på webben: https://www.webforum.nu/amne/dotnet/53231-hittar-ej-assembly
