Assembly with Web Service is created differently b/w compile methods
Hi,
I have an C# assembly that has a web reference for a webservice call. What is the main difference between compiling this in Team Build vs compile with the VS 2005 IDE.
I know that Team Build uses csc.exe to compile. How does the
VS2005 IDE compile this assembly? I thought it was MSBuild then calling csc.exe.
My issue is that the webservice calls, with the assembly generated with Team Build, throws an exception of
"Unknown Error: InvalidOperationException : There was an error generating the XML document."
However, if you compile the assembly with the VS IDE is runs fine. What is the big difference? It should be exactly the same.
Regards,
md
[869 byte] By [
MNDANG] at [2007-12-24]
What happens if you compile it on the commandline using msbuild.
Also have you compared the build logs of the team build build with the IDE / msbuild commandline build?
Could you build using detailed verbosity with the commandline, msbuild /v:detailed and also in TeamBuild as this would give you much more information than normal verbosity as to what the commandlines are and what references are being used.
The last messages in this thread shows how to set the team build verbosity to detailed:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=345696&SiteID=1
Hi Chris,
I set the verbosity on the IDE and team build. No errors, but very interesting stuff. I just don't know why its behaving so differently.
In the logs of both builds I see the WebReferenceUrl log line statement and it lists the correct web service URL.
I have a Properties\settings.settings & settings.designer.cs code behind that has the webservice urls in there and it is a valid cs file that gets compiled in the csc command. Do you think this has anything to do with it?
Any other things i can provide to help remedy this?
Hi Chris,
I compared the manifest with ildasm. There is a difference in the order of the assembly refs, but the versions are all the same. Sorry I had to stub out the company info for confidentiality.
Basically, the reference order is a little different. In the IDE compile System.Web.Services is listed 1st while in the Team Build compile the mscorlib is listed 1st. Plus a few other System.Web refs and a Microsoft.Web.Services3 ref are in a different order. The assemply data has attributes also listed in a different order. The MVID guid is different.
Both have the same # of Namespaces, Classes, Interfaces, Methods, and etc. (I didn't count all of them but they look the same. There quite a few.) Both have the same actual file size.
Does this help? Any thoughts?
VS2005 IDE Compile Manifest:
// Metadata version: v2.0.50727
.assembly extern System.Web.Services
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 2:0:0:0
}
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly extern System
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly extern Microsoft.Web.Services3
{
.publickeytoken = (31 BF 38 56 AD 36 4E 35 ) // 1.8V.6N5
.ver 3:0:0:0
}
.assembly extern System.Data
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly extern MYASSEMBLYNAME
{
.publickeytoken = (1F D8 42 32 6E 0A 7A 40 ) // ..B2n.z@
.ver 0:0:0:0
}
.assembly extern MYASSEMBLYNAME.ValueObjects
{
.publickeytoken = (1F D8 42 32 6E 0A 7A 40 ) // ..B2n.z@
.ver 0:0:0:0
}
.assembly extern MYASSEMBLYNAME.Enumerations
{
.publickeytoken = (1F D8 42 32 6E 0A 7A 40 ) // ..B2n.z@
.ver 0:0:0:0
}
.assembly extern System.Xml
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly extern MYASSEMBLYNAME.Common
{
.publickeytoken = (1F D8 42 32 6E 0A 7A 40 ) // ..B2n.z@
.ver 0:0:0:0
}
.assembly extern System.Web
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 2:0:0:0
}
.assembly MYASSEMBLYNAME
{
.custom instance void [mscorlib]System.Reflection.AssemblyTrademarkAttribute::.ctor(string) = ( 01 00 00 00 00 )
.custom instance void [mscorlib]System.Reflection.AssemblyProductAttribute::.ctor(string) = ( 01 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
.custom instance void [mscorlib]System.Reflection.AssemblyConfigurationAttribute::.ctor(string) = ( 01 00 00 00 00 )
.custom instance void [mscorlib]System.Reflection.AssemblyDescriptionAttribute::.ctor(string) = ( 01 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.publickey = (00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 // .$..............
00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 // .$..RSA1........
E1 F2 5D 6E C1 69 97 94 80 89 B4 AA E3 28 37 93 // ..]n.i.......(7.
6B 09 B2 39 03 9E C9 86 36 BD 97 D7 60 1A 9E 21 // k..9....6...`..!
E1 68 DF 6E 78 2E 70 8E 4C 9A BF D1 CF A9 67 40 // .h.nx.p.L.....g@
80 8D 09 EF BB 1C 81 84 75 0B 7E 47 0C 37 EA 53 // ........u.~G.7.S
56 7D EF 87 5C C9 6D 43 03 A0 EF D7 4F E8 5F 5C // V}..\.mC....O._\
CB 89 0D DB F2 F9 CD F6 04 65 FA 5C 33 F7 76 8C // .........e.\3.v.
3E FD 4C A3 2B C8 8F F0 B9 D7 B4 93 1F 66 B9 D0 // >.L.+........f..
A3 F6 E8 DE D5 DF 8E DB 86 68 DC 10 6E 69 A4 BC ) // .........h..ni..
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.mresource public MYASSEMBLYNAME.Resources.ResourceFiles.Base.DataAccess.resources
{
// Offset: 0x00000000 Length: 0x00005FFB
}
.mresource public MYASSEMBLYNAME.Security.HPPResource.resources
{
// Offset: 0x00006000 Length: 0x00001199
}
.module MYASSEMBLYNAME.dll
// MVID: {A700CF80-FDA1-4B2B-83B7-1C81A22AAC04}
.imagebase 0x11000000
.file alignment 0x00001000
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000009 // ILONLY
// Image base: 0x02F60000
TEAM BUILD Compile Manifest:
// Metadata version: v2.0.50727
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly extern System
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly extern System.Data
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly extern Microsoft.Web.Services3
{
.publickeytoken = (31 BF 38 56 AD 36 4E 35 ) // 1.8V.6N5
.ver 3:0:0:0
}
.assembly extern System.Web.Services
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 2:0:0:0
}
.assembly extern MYASSEMBLYNAME
{
.publickeytoken = (1F D8 42 32 6E 0A 7A 40 ) // ..B2n.z@
.ver 0:0:0:0
}
.assembly extern MYASSEMBLYNAME.ValueObjects
{
.publickeytoken = (1F D8 42 32 6E 0A 7A 40 ) // ..B2n.z@
.ver 0:0:0:0
}
.assembly extern MYASSEMBLYNAME.Enumerations
{
.publickeytoken = (1F D8 42 32 6E 0A 7A 40 ) // ..B2n.z@
.ver 0:0:0:0
}
.assembly extern System.Xml
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly extern MYASSEMBLYNAME.Common
{
.publickeytoken = (1F D8 42 32 6E 0A 7A 40 ) // ..B2n.z@
.ver 0:0:0:0
}
.assembly extern System.Web
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 2:0:0:0
}
.assembly MYASSEMBLYNAME
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
.custom instance void [mscorlib]System.Reflection.AssemblyTrademarkAttribute::.ctor(string) = ( 01 00 00 00 00 )
.custom instance void [mscorlib]System.Reflection.AssemblyProductAttribute::.ctor(string) = ( 01 00 00 00 00 )
.custom instance void [mscorlib]System.Reflection.AssemblyConfigurationAttribute::.ctor(string) = ( 01 00 00 00 00 )
.custom instance void [mscorlib]System.Reflection.AssemblyDescriptionAttribute::.ctor(string) = ( 01 00 00 00 00 )
.publickey = (00 24 00 00 04 80 00 00 94 00 00 00 06 02 00 00 // .$..............
00 24 00 00 52 53 41 31 00 04 00 00 01 00 01 00 // .$..RSA1........
E1 F2 5D 6E C1 69 97 94 80 89 B4 AA E3 28 37 93 // ..]n.i.......(7.
6B 09 B2 39 03 9E C9 86 36 BD 97 D7 60 1A 9E 21 // k..9....6...`..!
E1 68 DF 6E 78 2E 70 8E 4C 9A BF D1 CF A9 67 40 // .h.nx.p.L.....g@
80 8D 09 EF BB 1C 81 84 75 0B 7E 47 0C 37 EA 53 // ........u.~G.7.S
56 7D EF 87 5C C9 6D 43 03 A0 EF D7 4F E8 5F 5C // V}..\.mC....O._\
CB 89 0D DB F2 F9 CD F6 04 65 FA 5C 33 F7 76 8C // .........e.\3.v.
3E FD 4C A3 2B C8 8F F0 B9 D7 B4 93 1F 66 B9 D0 // >.L.+........f..
A3 F6 E8 DE D5 DF 8E DB 86 68 DC 10 6E 69 A4 BC ) // .........h..ni..
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.mresource public MYASSEMBLYNAME.Resources.ResourceFiles.Base.DataAccess.resources
{
// Offset: 0x00000000 Length: 0x00005FFB
}
.mresource public MYASSEMBLYNAME.Security.HPPResource.resources
{
// Offset: 0x00006000 Length: 0x00001199
}
.module MYASSEMBLYNAME.dll
// MVID: {33572689-AC04-4908-9650-6C7B3C8D10DC}
.imagebase 0x11000000
.file alignment 0x00001000
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000009 // ILONLY
// Image base: 0x02F60000