PC Review


Reply
Thread Tools Rate Thread

Compiling with the framework64 with Visual Studio 2005 (Warning CS1607)

 
 
Eric
Guest
Posts: n/a
 
      5th Jan 2007
Hi,

I want to generate a dll for x64. In the project, I specify the
platform target x64 but VS2005 use the win32 framework. Here is the
warnings that I get :

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig
/nowarn:1701,1702 /platform:x64 /errorreportrompt
/baseaddress:285212672 /define:TRACE;DEBUG
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll
/reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
/debug+ /debug:full /outbj\x64\Debug\CFGDistributeur.dll ...


warning CS1607: Assembly generation -- Referenced assembly
'System.Data.dll' targets a different processor
warning CS1607: Assembly generation -- Referenced assembly
'mscorlib.dll' targets a different processor

So I want to know how the specify in VS2005 the use the Framework64
(x64) and not use the Framework (win32).

Thanks,
Eric

 
Reply With Quote
 
 
 
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      5th Jan 2007
"Eric" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I want to generate a dll for x64. In the project, I specify the
> platform target x64 but VS2005 use the win32 framework. Here is the
> warnings that I get :
>
> C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig
> /nowarn:1701,1702 /platform:x64 /errorreportrompt
> /baseaddress:285212672 /define:TRACE;DEBUG
> /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
> /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll
> /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
> /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll
> /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
> /debug+ /debug:full /outbj\x64\Debug\CFGDistributeur.dll ...
>
>
> warning CS1607: Assembly generation -- Referenced assembly
> 'System.Data.dll' targets a different processor
> warning CS1607: Assembly generation -- Referenced assembly
> 'mscorlib.dll' targets a different processor
>
> So I want to know how the specify in VS2005 the use the Framework64
> (x64) and not use the Framework (win32).
>
> Thanks,
> Eric
>


Well there are two issues here, I hoped SP1 would have solved, but it's not:
1. VS is using csc from the 32bit framework.
2. VS references the assemblies from the 32 bit framework and some assemblies are built as
X86.
Now this is no big deal (unless these warnings get you nervous )) , at run-time the
program will correctly load the 64 bit CLR and the correct 64bit FCL assemblies.

Willy.


 
Reply With Quote
 
Eric
Guest
Posts: n/a
 
      5th Jan 2007

Willy Denoyette [MVP] wrote:
> "Eric" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> >
> > I want to generate a dll for x64. In the project, I specify the
> > platform target x64 but VS2005 use the win32 framework. Here is the
> > warnings that I get :
> >
> > C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig
> > /nowarn:1701,1702 /platform:x64 /errorreportrompt
> > /baseaddress:285212672 /define:TRACE;DEBUG
> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll
> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll
> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
> > /debug+ /debug:full /outbj\x64\Debug\CFGDistributeur.dll ...
> >
> >
> > warning CS1607: Assembly generation -- Referenced assembly
> > 'System.Data.dll' targets a different processor
> > warning CS1607: Assembly generation -- Referenced assembly
> > 'mscorlib.dll' targets a different processor
> >
> > So I want to know how the specify in VS2005 the use the Framework64
> > (x64) and not use the Framework (win32).
> >
> > Thanks,
> > Eric
> >

>
> Well there are two issues here, I hoped SP1 would have solved, but it's not:
> 1. VS is using csc from the 32bit framework.
> 2. VS references the assemblies from the 32 bit framework and some assemblies are built as
> X86.
> Now this is no big deal (unless these warnings get you nervous )) , at run-time the
> program will correctly load the 64 bit CLR and the correct 64bit FCL assemblies.
>
> Willy.


Is there possible to specify VS2005 to use csc from the 64bit
framework? How?

I have a C++ application (64-bits) that load C# applet (need to be
64-bits). My application wasn't able to load the applet. The solution
that I found, is the compile manually from the command line the applet
with the csc.exe and system dll from the 64-bits framework.

Regards,
Eric

 
Reply With Quote
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      5th Jan 2007
"Eric" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Willy Denoyette [MVP] wrote:
>> "Eric" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> > Hi,
>> >
>> > I want to generate a dll for x64. In the project, I specify the
>> > platform target x64 but VS2005 use the win32 framework. Here is the
>> > warnings that I get :
>> >
>> > C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig
>> > /nowarn:1701,1702 /platform:x64 /errorreportrompt
>> > /baseaddress:285212672 /define:TRACE;DEBUG
>> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
>> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll
>> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
>> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll
>> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
>> > /debug+ /debug:full /outbj\x64\Debug\CFGDistributeur.dll ...
>> >
>> >
>> > warning CS1607: Assembly generation -- Referenced assembly
>> > 'System.Data.dll' targets a different processor
>> > warning CS1607: Assembly generation -- Referenced assembly
>> > 'mscorlib.dll' targets a different processor
>> >
>> > So I want to know how the specify in VS2005 the use the Framework64
>> > (x64) and not use the Framework (win32).
>> >
>> > Thanks,
>> > Eric
>> >

>>
>> Well there are two issues here, I hoped SP1 would have solved, but it's not:
>> 1. VS is using csc from the 32bit framework.
>> 2. VS references the assemblies from the 32 bit framework and some assemblies are built
>> as
>> X86.
>> Now this is no big deal (unless these warnings get you nervous )) , at run-time the
>> program will correctly load the 64 bit CLR and the correct 64bit FCL assemblies.
>>
>> Willy.

>
> Is there possible to specify VS2005 to use csc from the 64bit
> framework? How?
>

No that I know.

> I have a C++ application (64-bits) that load C# applet (need to be
> 64-bits). My application wasn't able to load the applet. The solution
> that I found, is the compile manually from the command line the applet
> with the csc.exe and system dll from the 64-bits framework.
>


This shouldn't be a problem, if you did compile from VS with the "platform" set to "x64",
you can safely ignore the warnings, the resultant DLL should have the correct PE and CLR
header.
What error message did you get when loading the applet?

Willy.



 
Reply With Quote
 
Eric
Guest
Posts: n/a
 
      5th Jan 2007

Willy Denoyette [MVP] wrote:
> "Eric" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >
> > Willy Denoyette [MVP] wrote:
> >> "Eric" <(E-Mail Removed)> wrote in message
> >> news:(E-Mail Removed)...
> >> > Hi,
> >> >
> >> > I want to generate a dll for x64. In the project, I specify the
> >> > platform target x64 but VS2005 use the win32 framework. Here is the
> >> > warnings that I get :
> >> >
> >> > C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig
> >> > /nowarn:1701,1702 /platform:x64 /errorreportrompt
> >> > /baseaddress:285212672 /define:TRACE;DEBUG
> >> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
> >> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll
> >> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
> >> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll
> >> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
> >> > /debug+ /debug:full /outbj\x64\Debug\CFGDistributeur.dll ...
> >> >
> >> >
> >> > warning CS1607: Assembly generation -- Referenced assembly
> >> > 'System.Data.dll' targets a different processor
> >> > warning CS1607: Assembly generation -- Referenced assembly
> >> > 'mscorlib.dll' targets a different processor
> >> >
> >> > So I want to know how the specify in VS2005 the use the Framework64
> >> > (x64) and not use the Framework (win32).
> >> >
> >> > Thanks,
> >> > Eric
> >> >
> >>
> >> Well there are two issues here, I hoped SP1 would have solved, but it's not:
> >> 1. VS is using csc from the 32bit framework.
> >> 2. VS references the assemblies from the 32 bit framework and some assemblies are built
> >> as
> >> X86.
> >> Now this is no big deal (unless these warnings get you nervous )) , at run-time the
> >> program will correctly load the 64 bit CLR and the correct 64bit FCL assemblies.
> >>
> >> Willy.

> >
> > Is there possible to specify VS2005 to use csc from the 64bit
> > framework? How?
> >

> No that I know.
>
> > I have a C++ application (64-bits) that load C# applet (need to be
> > 64-bits). My application wasn't able to load the applet. The solution
> > that I found, is the compile manually from the command line the applet
> > with the csc.exe and system dll from the 64-bits framework.
> >

>
> This shouldn't be a problem, if you did compile from VS with the "platform" set to "x64",
> you can safely ignore the warnings, the resultant DLL should have the correct PE and CLR
> header.
> What error message did you get when loading the applet?
>
> Willy.


I did what you said. I didn't receive any error message. In run-time,
the applet just didn't load.

The first thing that I do, was use the application RegAsm.exe from the
framework64. After that, the applet didn't load again. So I recompile
with the csc.exe and system.dll, system.data.dll ... from the
framework64 (manually from the command line) and this time the applet
load.

Regards,
Eric

Eric

 
Reply With Quote
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      5th Jan 2007
"Eric" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Willy Denoyette [MVP] wrote:
>> "Eric" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>> >
>> > Willy Denoyette [MVP] wrote:
>> >> "Eric" <(E-Mail Removed)> wrote in message
>> >> news:(E-Mail Removed)...
>> >> > Hi,
>> >> >
>> >> > I want to generate a dll for x64. In the project, I specify the
>> >> > platform target x64 but VS2005 use the win32 framework. Here is the
>> >> > warnings that I get :
>> >> >
>> >> > C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Csc.exe /noconfig
>> >> > /nowarn:1701,1702 /platform:x64 /errorreportrompt
>> >> > /baseaddress:285212672 /define:TRACE;DEBUG
>> >> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Data.dll
>> >> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.dll
>> >> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll
>> >> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll
>> >> > /reference:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll
>> >> > /debug+ /debug:full /outbj\x64\Debug\CFGDistributeur.dll ...
>> >> >
>> >> >
>> >> > warning CS1607: Assembly generation -- Referenced assembly
>> >> > 'System.Data.dll' targets a different processor
>> >> > warning CS1607: Assembly generation -- Referenced assembly
>> >> > 'mscorlib.dll' targets a different processor
>> >> >
>> >> > So I want to know how the specify in VS2005 the use the Framework64
>> >> > (x64) and not use the Framework (win32).
>> >> >
>> >> > Thanks,
>> >> > Eric
>> >> >
>> >>
>> >> Well there are two issues here, I hoped SP1 would have solved, but it's not:
>> >> 1. VS is using csc from the 32bit framework.
>> >> 2. VS references the assemblies from the 32 bit framework and some assemblies are
>> >> built
>> >> as
>> >> X86.
>> >> Now this is no big deal (unless these warnings get you nervous )) , at run-time the
>> >> program will correctly load the 64 bit CLR and the correct 64bit FCL assemblies.
>> >>
>> >> Willy.
>> >
>> > Is there possible to specify VS2005 to use csc from the 64bit
>> > framework? How?
>> >

>> No that I know.
>>
>> > I have a C++ application (64-bits) that load C# applet (need to be
>> > 64-bits). My application wasn't able to load the applet. The solution
>> > that I found, is the compile manually from the command line the applet
>> > with the csc.exe and system dll from the 64-bits framework.
>> >

>>
>> This shouldn't be a problem, if you did compile from VS with the "platform" set to "x64",
>> you can safely ignore the warnings, the resultant DLL should have the correct PE and CLR
>> header.
>> What error message did you get when loading the applet?
>>
>> Willy.

>
> I did what you said. I didn't receive any error message. In run-time,
> the applet just didn't load.
>
> The first thing that I do, was use the application RegAsm.exe from the
> framework64. After that, the applet didn't load again. So I recompile
> with the csc.exe and system.dll, system.data.dll ... from the
> framework64 (manually from the command line) and this time the applet
> load.
>
> Regards,
> Eric
>
> Eric
>



Wait a minute now I get it, this applet is a COM object (at least for the native client),
you need to "regasm" this dll using the 64 bit version of regasm, this is the cullprit, not
the compiler. You can do this in VS by specifying a post build event that initiates
regasm.exe from ?:\Windows\Microsoft.NET\Framework64\v2.0.50727.


Willy.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to take an IE rendered screenshot of a website with visual studio .net 2002 or visual stuido .net 2003? I can't install visual studio .net 2005 on this computer. Daniel Microsoft Dot NET 4 17th May 2007 07:56 PM
Visual Studio 2005 SP1 warning John Kotuby Microsoft ASP .NET 1 1st Mar 2007 07:44 PM
LNK1104: 'LIBCD.lib' Error when compiling NVIDIA's SDK with Visual Studio 2005 Danno040 Microsoft VC .NET 1 17th Jun 2006 08:53 PM
Visual Studio 2005 - Warning in the Error List Window Tom McL. Microsoft VB .NET 6 21st Apr 2006 10:35 AM
Visual Studio 2005 Beta 1 Refresh vs Visual Studio 2005 CTP vs Visual C++ 2005 Express Beta1 Peter Nimmo Microsoft VC .NET 1 16th Dec 2004 03:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:02 PM.