I see the same issue you have described and want to add that in the output
there are two warnings:
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
Now, if I recompile, the warnings and errors go away.
I cannot tell you why this might happen. The only times I am building com
compatible libraries, I need to target 32 bit because of the client
architecture, so I have not noticed any issue like this before.
Mike
"Jacek Jurkowski" wrote:
> Machine Win Vista 64bit + VSNet2008 SP1
> Scenario:
> - Create a simple ClassLibrary project in VSNet.
> - Set "Make assembly COM-Visible" to true in project properties.
> - Set project Build platform to x64
> - Set "Register for COM interop" to true in project properties.
> - Add below code to the project.
> - Rebuild sollution.
>
> DOES ANYBODY KNOW WHY THAT PROJECT DOES
> NOT BUILD WITH "NOT A VALID ASSEMBLY" EXCEPTION?
>
> using System;
> using System.Runtime.InteropServices;
>
> namespace Test01
> {
> public class Class1
> {
> [Guid("a5a2aa7b-ebc6-44fe-9ab8-5c3d2cc0cd97")]
> public interface KomaxInterface
> {
> String Weryfikuj(String pPlikDefinicji, String pSerwer, String
> pBazaDanych, Boolean pZintegrowaneLogowanie,
> String pUzytkownik, String pHaslo, String pListaTabel,
> Boolean pCichyTryb, Boolean pBrakMozliwosciPrzerwania);
> }
>
> [Guid("a1a21642-2ec5-48d3-8f49-51dd700d13cd"),
> InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
> public interface KomaxEvents
> {
> }
>
> [Guid("aed66299-3912-40cb-94f1-512280ed16f4"),
> ClassInterface(ClassInterfaceType.None),
> ComSourceInterfaces(typeof(KomaxEvents))]
> public class Komax : KomaxInterface
> {
> public String Weryfikuj(String pPlikDefinicji, String pSerwer,
> String pBazaDanych, Boolean pZintegrowaneLogowanie,
> String pUzytkownik, String pHaslo, String pListaTabel,
> Boolean pCichyTryb, Boolean pBrakMozliwosciPrzerwania)
> {
> return String.Empty;
> }
> }
> }
> }
>
>
|