1

Closed

Dynamic view compilation failed (CS1703) - mscorlib using v1.6.0.0

description

I had hoped this error would have gone away after downloading the latest build. Unfortunately, I am still getting this error using VS2010, ASP.NET MVC 3 and .NET 4. I am at a total loss and our project is dead in the water until this is resolved.
 
The stranger issue is that this does not happen on my development machine - only when pushed to our Test machine.
Closed Oct 22, 2011 at 9:29 AM by RobertGreyling
Excellent - glad to hear it. Closing

comments

RobertGreyling wrote Oct 20, 2011 at 7:08 PM

I'm afraid you're going to have to give a little more context than that. Does your test machine run in full trust or are you running full trust in dev and medium in test? The compilation is failing with CS1703 yes, but what conflicting Assembly is it mentioning? Without that kind of information, it's impossible to tell if it's Spark, or the .Net runtime or simply a case of you inadvertently referencing the same thing twice because of something in the GAC.

More info please, otherwise this one can't go anywhere...

Thanks,
Rob

mimeyers wrote Oct 20, 2011 at 7:19 PM

Rob,

Both machines are running in Full Trust mode. I had the error dumped to the EventLog:

Event Type: Information
Event Source: Application
Event Category: None
Event ID: 0
Date: 10/20/2011
Time: 2:15:40 PM
User: N/A
Computer: DEVELOPMENT04
Description:
The description for Event ID ( 0 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Compiler Exception: Dynamic view compilation failed.
(0,0): error CS1703: An assembly with the same identity 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has already been imported. Try removing one of the duplicate references.

1 using Ave.Extensions;
2 using Ave.Entities.EntityExtensions;
3
4 [global::Spark.SparkViewAttribute(
5 Templates = new string[] {
6 "current"
7 })]
8 public class Viewa96f517dc8b14255ba84de1d46a5884a : Ave.Services.TemplateEngine.TemplateBaseView
9 {
10
11 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
12 private static System.Guid _generatedViewId = new System.Guid("a96f517dc8b14255ba84de1d46a5884a");
13 public override System.Guid GeneratedViewId
14 { get { return _generatedViewId; } }
15 Ave.Entities.Campaigns.InventoryQuote quote
16
17 #line 1 "current"
18 {get {return (Ave.Entities.Campaigns.InventoryQuote)ViewData.Eval("quote");}}
19 #line default
20 Ave.Entities.Campaigns.InventoryQuoteVolley volley
21
22 #line 1 "current"
23 {get {return (Ave.Entities.Campaigns.InventoryQuoteVolley)ViewData.Eval("volley");}}
24 #line default
25 System.String refunds
26
27 #line 1 "current"
28 {get {return (System.String)ViewData.Eval("refunds");}}
29 #line default
30 System.String totalType
31
32 #line 1 "current"
33 {get {return (System.String)ViewData.Eval("totalType");}}
34 #line default
35 System.String net
36
37 #line 1 "current"
38 {get {return (System.String)ViewData.Eval("net");}}
39 #line default
40 System.String gross
41
42 #line 1 "current"
43 {get {return (System.String)ViewData.Eval("gross");}}
44 #line default
45 System.String netwithrefunds
46
47 #line 1 "current"
48 {get {return (System.String)ViewData.Eval("netwithrefunds");}}
49 #line default
50 System.String agencycommission
51
52 #line 1 "current"
53 {get {return (System.String)ViewData.Eval("agencycommission");}}
54 #line default
55
56 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
57 private void RenderViewLevel0()
58 {
59 }
60
61 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
62 public override void Render()
63 {
64 RenderViewLevel0();
65 }
66 }
.

mimeyers wrote Oct 20, 2011 at 7:20 PM

Event Type: Information
Event Source: Application
Event Category: None
Event ID: 0
Date: 10/20/2011
Time: 2:15:40 PM
User: N/A
Computer: DEVELOPMENT04
Description:
The description for Event ID ( 0 ) in Source ( Application ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Compiler Exception: Dynamic view compilation failed.
(0,0): error CS1703: An assembly with the same identity 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' has already been imported. Try removing one of the duplicate references.

1 using Ave.Extensions;
2 using Ave.Entities.EntityExtensions;
3
4 [global::Spark.SparkViewAttribute(
5 Templates = new string[] {
6 "current"
7 })]
8 public class Viewa96f517dc8b14255ba84de1d46a5884a : Ave.Services.TemplateEngine.TemplateBaseView
9 {
10
11 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
12 private static System.Guid _generatedViewId = new System.Guid("a96f517dc8b14255ba84de1d46a5884a");
13 public override System.Guid GeneratedViewId
14 { get { return _generatedViewId; } }
15 Ave.Entities.Campaigns.InventoryQuote quote
16
17 #line 1 "current"
18 {get {return (Ave.Entities.Campaigns.InventoryQuote)ViewData.Eval("quote");}}
19 #line default
20 Ave.Entities.Campaigns.InventoryQuoteVolley volley
21
22 #line 1 "current"
23 {get {return (Ave.Entities.Campaigns.InventoryQuoteVolley)ViewData.Eval("volley");}}
24 #line default
25 System.String refunds
26
27 #line 1 "current"
28 {get {return (System.String)ViewData.Eval("refunds");}}
29 #line default
30 System.String totalType
31
32 #line 1 "current"
33 {get {return (System.String)ViewData.Eval("totalType");}}
34 #line default
35 System.String net
36
37 #line 1 "current"
38 {get {return (System.String)ViewData.Eval("net");}}
39 #line default
40 System.String gross
41
42 #line 1 "current"
43 {get {return (System.String)ViewData.Eval("gross");}}
44 #line default
45 System.String netwithrefunds
46
47 #line 1 "current"
48 {get {return (System.String)ViewData.Eval("netwithrefunds");}}
49 #line default
50 System.String agencycommission
51
52 #line 1 "current"
53 {get {return (System.String)ViewData.Eval("agencycommission");}}
54 #line default
55
56 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
57 private void RenderViewLevel0()
58 {
59 }
60
61 [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
62 public override void Render()
63 {
64 RenderViewLevel0();
65 }
66 }
.

mimeyers wrote Oct 20, 2011 at 7:22 PM

I have also tried restarting the AppPool (it is not shared with any other sites) and have also tried physically restarting the server hardware. Still have the mscorlib issue.

mimeyers wrote Oct 20, 2011 at 7:58 PM

The error is thrown when calling Engine.CreateInstance(descriptor).

RobertGreyling wrote Oct 21, 2011 at 8:37 AM

Thanks for the info - I'll see if I can replicate the issue.

mimeyers wrote Oct 21, 2011 at 8:53 PM

Issue resolved. Found a rogue compilerOption setting in Web.config referencing 3.5 instead of 4.0.

wrote Oct 22, 2011 at 9:29 AM

wrote Feb 14, 2013 at 7:03 PM

wrote May 16, 2013 at 9:14 AM