0

I have a website solution that used to be managed using VS2008. Now since migrating to VS2010 I have noticed a long list of errors caused by auto generated WebReference code. The code generated is in C# and everything else on the solution is in VB.NET. All errors are syntax errors.

The website is not web project. I can compile successfully, but these errors showing in Error List window are starting to get on my nerves. It makes finding real errors a little tough among the piles of syntax errors from this webreference code. I cannot even find this auto generated file on my solution. It lives in this folder: C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\SolutionName\347ac797\7f99bbcc\Sources_App_WebReferences\

I have tried to delete the offending file, but when I recompile the file is generated back again in C#.

Any help to get rid of these errors is appreciated.

abatishchev
  • 98,240
  • 88
  • 296
  • 433
kurry
  • 159
  • 1
  • 3
  • 6
  • Delete the webreference will get rid of it's errors. However there reference was probably there for a reason. – Preet Sangha Dec 16 '11 at 12:15
  • how do I select which language the proxy class should be generated in? – kurry Dec 19 '11 at 11:36
  • I think you need to put it in an assembly of that language and and then reference the assembly. – Preet Sangha Dec 19 '11 at 18:52
  • Yes, looks like that's the only way. Unless I changed my website to web application project, which I do not want to go down that route. @PreetSangha Do you want to make that the answer so I can close this thread? – kurry Dec 21 '11 at 05:54

1 Answers1

1

I think you need to put it in an assembly of that language and and then reference the assembly.

Preet Sangha
  • 64,563
  • 18
  • 145
  • 216