473,545 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Compiler erro CS0006 during a dynamic compilation

Good morning everybody,

I have been dealing with this strange issue for almost two days: I got
stuck and I can't get out of it. I built up for the first time in my life
(I'm quite new in stuff like .NET, C#, Visual Studio, windows programming
and so on...) a Windows Service. Debugging it in Visual Studio (Express
Edition) everything worked fine, but debugging it "live" I found a strange
behaviour. My application must dynamically compile some C# code generated
at run-tim. In order to perform this compilation I use an object called
"compiler" implementing an ICodeCompiler interface. Compiling the code, I
have a CS0006 compiler error, with this error message:

Metadata file 'dll_name' could not be found

I imported the missinng library in the VisualStudio project, I added it in
the CompilerParamet ers.ReferencedA ssemblies collection and I set the
statement "using MyLibrary;" in the source code to be compiled. What am I
missing more?

Another question (something like a "best practice") about using
VisualStudio: which's the better way to add assembly references? Importing
the other projects in the solution and then add them from the "Projects"
tab, or adding them via the "Browse" one?

Thanks in advance.

--

Kind regards,
Giulio - Italia

p.s. sorry for my "bovine" english...
Jun 8 '06 #1
1 3051
Hi

We see the CS0006 problem quite a bit but are using .Net 1.1. We are able to
resolve this problem by removing the <identity impersonate="tr ue" />
line from Web.config (note that the problem doesn't seem to occur if the
<identity> line includes username and password attributes). Not sure if this
will help you in the Express edition though.
Hope this helps
Andy


"Giulio Petrucci" wrote:
Good morning everybody,

I have been dealing with this strange issue for almost two days: I got
stuck and I can't get out of it. I built up for the first time in my life
(I'm quite new in stuff like .NET, C#, Visual Studio, windows programming
and so on...) a Windows Service. Debugging it in Visual Studio (Express
Edition) everything worked fine, but debugging it "live" I found a strange
behaviour. My application must dynamically compile some C# code generated
at run-tim. In order to perform this compilation I use an object called
"compiler" implementing an ICodeCompiler interface. Compiling the code, I
have a CS0006 compiler error, with this error message:

Metadata file 'dll_name' could not be found

I imported the missinng library in the VisualStudio project, I added it in
the CompilerParamet ers.ReferencedA ssemblies collection and I set the
statement "using MyLibrary;" in the source code to be compiled. What am I
missing more?

Another question (something like a "best practice") about using
VisualStudio: which's the better way to add assembly references? Importing
the other projects in the solution and then add them from the "Projects"
tab, or adding them via the "Browse" one?

Thanks in advance.

--

Kind regards,
Giulio - Italia

p.s. sorry for my "bovine" english...

Jun 22 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
7214
by: K. Shier | last post by:
when attempting to edit code in a class file, i see the bug "Visual Basic ..NET compiler is unable to recover from the following error: System Error &Hc0000005&(Visual Basic internal compiler error) Save your work and restart Visual Studio .NET." has anyone seen this bug and can you confirm one way or the other whether or not it can corrupt...
1
472
by: Invalidlastname | last post by:
Hi, Our developer team recently started getting the compilation error, see below, once a while running the asp.net web application from Visual Studio 2003 (in debug mode), and we have to rebuild the solution or deleted the VsWebcache to get rid of this error I suspect this error is related to that we strong named several assemblies for using...
4
5405
by: james margey | last post by:
Hi to all, I have spent 3 days at this error and i have two days to go for a deadline, and i am about to go off my nut, the reason being: Microsoft dont seem to be able to provide a solution, I have trawled the web and the few that have the same error have not being provided a fix. This error occurs if i make the slightest change in my...
6
26010
by: John Doe | last post by:
Hi, I've got the following error when building my ASP.NET application called WebApplication1: Preparing resources... Updating references... Performing main compilation... error CS0006: Metadata file 'c:\inetpub\wwwroot\WebApplication1\bin\WebApplication1.dll' could not be
3
2009
by: Steven Berkovitz | last post by:
I have a common problem with just about every ASP.NET web app I've ever developed. Randomly after compiling a project, I will get a CS0006 compiler error with the following description: Compiler Error Message: CS0006: Metadata file 'c:\windows\microsoft.net\framework\v1.1.4322\temporary asp.net...
5
2217
by: Stuart Carnie | last post by:
I suspect it's unlikely, but you'll never know until you ask, but are there any attributes that would allow us to contribute to the compiled output? e.g. // this class exists in a separate, compiled assembly for the compiler to load during compilation class MyMethodCompiler : Attribute { // This is called during compilation public...
0
4574
by: gmsieling | last post by:
We're getting compiler error CS0006, with increasing frequency. It says that a randomly named DLL was not found. This happens at random intervals when you try to run the application. We're using the webserver that comes with VS to run our web app. VS 2005 SP1 didn't fix this, and the only way I know to get around it is to close VS and delete the...
3
2241
by: dancer | last post by:
I am using Framework 1.1.4322. Who can tell me why I'm getting this error? My code follows Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30456:...
2
10819
by: meskeleton | last post by:
Hello everyone... I am new to this community so m sorry if this is not the place for this post... I uploaded my site (built in 3.5 framework) to the server which does not have 3.5 but 2.0. I uploaded the System.Core.dll file in the bin folder of the wwwroot/ folder. but doesn't help either... Now when i access my home page, I get this...
0
7479
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7411
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7439
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7773
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5987
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5343
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
722
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.