473,666 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

After upgrade to 2.0, Error CS1595 System.TimeSpan is defined inmultiple places

I know I'm some years behind, but I just have the go-ahead to start
developing on .Net 2.0. While the development process goes ahead, I'm
to maintain the .Net 1.1 stuff on the same machine.

I downloaded and installed the 2.0 framework. As I understand it, 1.1
and 2.0 are supposed to play nice with each other. However, now when I
go about compiling a class using CSC.exe, I get this error (among
others):

---------------------
warning CS1595: 'System.TimeSpa n' is defined in multiple places; using
definition from c:\WINDOWS\Micr osoft.NET\Frame work
\v1.1.4322\msco rlib.dll
---------------------

Despite "only" being a warning, the compilation doesn't seem to take,
such that the DLL is not produced.

I've done an exhaustive search on the machine for multiple
mscorlib.dll files. There are four, in these locations:

1) c:\I386\netfx.c ab
2) c:\windows\serv icepackfiles\i3 86
3) c:\windows\Micr osoft.Net\frame work\v.1.1.4322
4) c:\windows\Micr osoft.Net\frame work\v.2.0.5071 7

If necessary, I will uninstall 2.0. That will probably fix it. Short
of that, however, is there any other solution?

Thanks for any pointers.

--Brent
Jun 27 '08 #1
5 1645
Are you intentionally referencing both 1.1 and 2.0? What csc command
are you using? Call me lazy, but I do like using tools like VS, which
will sort out this type of issue for us...

Marc
Jun 27 '08 #2
On May 10, 1:53 pm, Marc Gravell <marc.grav...@g mail.comwrote:
Are you intentionally referencing both 1.1 and 2.0? What csc command
are you using? Call me lazy, but I do like using tools like VS, which
will sort out this type of issue for us...

Marc
Thanks for the heads up, Marc. My CSC command looks like this (sans
line feeds):

C:\[PathToCSC]\csc.exe
/t:library
/out:C:\[PathToBin]\bin\toolbox.dl l
C:\[PathToCSFile]\toolbox.cs
/r:c:\windows\Mi crosoft.NET\Fra mework\v1.1.432 2\System.Web.dl l
/r:c:\windows\Mi crosoft.NET\Fra mework\v1.1.432 2\mscorlib.dll
/r:c:\windows\Mi crosoft.NET\Fra mework\v1.1.432 2\System.Data.d ll
/r:c:\windows\Mi crosoft.NET\Fra mework\v1.1.432 2\system.dll
/r:c:\windows\Mi crosoft.NET\Fra mework\v1.1.432 2\system.web.dl l
/r:c:\windows\Mi crosoft.NET\Fra mework\v1.1.432 2\system.xml.dl l

Weird stuff...
Jun 27 '08 #3
And just checking: are you using the 1.1 version of csc, or the 2.0
one?

Marc
Jun 27 '08 #4
On May 11, 12:49 am, Marc Gravell <marc.grav...@g mail.comwrote:
And just checking: are you using the 1.1 version of csc, or the 2.0
one?

Marc
This is a good question. Actually, I'm using a csc.exe located in the
same folder as the .CS file. When I pointed to the CSC.exe file
located in c:\windows\Micr osoft.NET\Frame work\v1.1.4322\ , the
compiling works fine! Could it be that the absence of a csc.exe.config
in the local folder causes the csc to look all over the place for the
referenced namespaces, and come up with conflicts?

Whatever the case, I'm back on track.

Thanks, Marc.

--Brent
Jun 27 '08 #5
On May 11, 9:28*pm, Brent <writebr...@gma il.comwrote:
This is a good question. Actually, I'm using a csc.exe located in the
same folder as the .CS file. When I pointed to the CSC.exe file
located in c:\windows\Micr osoft.NET\Frame work\v1.1.4322\ , the
compiling works fine! Could it be that the absence of a csc.exe.config
in the local folder causes the csc to look all over the place for the
referenced namespaces, and come up with conflicts?
Not really. It's just that csc always references some assemblies (in
particular, mscorlib) from the corresponding version of .NET
Framework, and then also those that you explicitly specify. In your
case, it would seem that this results in both mscorlib from 1.1 and
mscorlib from 2.0 being referenced, hence the clash.

.NET 1.1 and 2.0 do play nice with each other in a sense that they can
be installed side by side, and programs will run using whatever
version of .NET they were built with. But if you're compiling with csc
2.0, you should really be referencing 2.0 assemblies, not 1.1 ones.
Jun 27 '08 #6

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

Similar topics

1
1418
by: Peter van der Goes | last post by:
This one has me stumped. I'm looking at support files for a C# textbook, including three ASP.NET applications that use Access databases. I create virtual directories for the applications in IIS (running Win XP SP1 and Win 2000 SP4 dual boot - error occurs under either OS), then load the app into the VS.NET 2003 IDE. When I attempt to run the application, I get the following error in my browser, instead of the startup page: Server Error...
6
2219
by: Joachim | last post by:
I made some project changes (which seems it doesn't help if I undo) which have created compilation error: " Server Error in '/PCSWebApp1' Application. -------------------------------------------------------------------------------- Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details
5
2101
by: Kim Nørby Andersen | last post by:
Hello there I am lost. i receive the output in the bottom, from a site that runs excellently on our development server, but dies on the customer. We have had a first version running at the customer, did some changes, recompiled, zipped and sent it back to them, but then it screwed up. As a part of the debugging process, the ASP.NET has been set to run as SYSTEM, and all folders described in...
9
2290
by: JTrigger | last post by:
When I compile my project using the IDE on a development machine it works just fine. When I compile it on the server using csc.exe, I get the following error when I try to bring it up in the web browser. What is the issue? Thanks, Jim Server Error in '/psnRequest' Application. ----------------------------------------------------------------------------
0
1071
by: Lauchlan M | last post by:
<< Compiler Error Message: CS1595: 'myWebInterface.X.Y.AddEditUsers' is defined in multiple places; using definition from 'e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\24513897\98a5084 2_0255c401\myWebInterface_NexusDB.DLL' >> It seems to be having an issue with every file in the project over this.
0
1066
by: Lauchlan M | last post by:
<< Compiler Error Message: CS1595: 'myWebInterface.X.Y.AddEditUsers' is defined in multiple places; using definition from 'e:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\mywebinterface_nexusdb\fe7356c1\5423ab61\assembly\dl2\24513897\98a5084 2_0255c401\myWebInterface_NexusDB.DLL' >> It seems to be having an issue with every file in the project over this.
1
3362
by: abh1508 | last post by:
Following a release of code the following problem occurs on certain asp ..net pages. This is not a problem on other testing/demo environments. IIS seems to be creating certain files twice in the temporary internet files directory. Any advice or suggestions appreciated. Server Error in '/ContactCentre/Global' Application. -------------------------------------------------------------------------------- Compilation Error
2
2103
by: SonicChen | last post by:
i have read the article http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q318274 and try those two solutions but message still come: CS1595: "Runchs_WebUI.Global" is defined in multiple places£»using definition from "c:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET Files\runchs_webui\37fe91d8\586e7567\assembly\dl2\9b334611\de283d9c_2bfac501 \Runchs.WebUI.DLL"
2
1619
by: CtrlAltDel | last post by:
I have an ASP.NET application that runs just fine on our servers (Win2003, in dev/staging/prod) when the debug attribute of <system.web><compilation /></system.webis set to true, thusly: <system.web> <compilation defaultLanguage="c#" debug="true" /> </system.web> However, set the attribute to false, so that pages are built as Release quality, and the page, which a moment ago was running just fine, falls flat
0
8445
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8356
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8551
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8640
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1776
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.