Today, I compiled the Telerik RadControls ASP.NET AJAX "Live Demos" project (which I compiled several times last week and worked) in Visual Studio 2008. I made some unique changes to the solution because our company doesn't use Visual Studio 2010, yet. See the link below for the changes I made.
Telerik "Live Demos" solution - connection strings & database setup
When I tried to compile it, I first got three errors that are shown below under compilation #1 errors. When I double click those errors, it doesn't take me to the source file. ??? I then purposely changed some code in a random file to cause a 4th compilation error so I could 开发者_运维问答see what columns are normally populated in a compilation error. That's my compilation #2 errors. Then I fixed that problem I purposely put in, and recompiled again, and got the compilation #3 errors. Notice the slight error visual differences even though they are the same line numbers. Again, in the #3 errors, when I double click them, it doesn't take me to the source files. I'll try getting out of Visual Studio 2008 and going back in... perhaps this is a memory issue with Visual Studio left open untouched for 3 days over the weekend. If that solves, I'll post that as the answer, and we'll call it a Microsoft fluke.
FYI: "recompiled" meaning "Rebuild Solution"
Compilation #1 errors:
Compilation #2 errors:
Compilation #3 errors:
I made some changes I shouldn't have. Found the answer.
http://www.telerik.com/community/forums/aspnet/grid/column-grouping-question.aspx
================
Another issue that can cause this is if you have temporary files stored for your ASP.NET web application project. Exit solution, delete the folder below, and go back into the project, and recompile/rebuild solution. That wasn't my issue, but I did see that temporary files can cause this. That's essentially where the paths are coming from in the "Compilation #3 errors" screen shot.
C:\Windws\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\solution_folder_to_delete
=================
My issue was that I removed the namespace from the code behind file (.aspx.cs file), and then removed the namespace from my "inherits" attribute on the source file (.aspx file). I did this when I tried to isolate the Editor control in a new stand alone web application project.
Broken code:
<%@ Page Theme="Default" Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
....
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Working code:
<%@ Page Theme="Default" Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="Telerik.Web.Examples.Editor.Default.DefaultCS" %>
...
namespace Telerik.Web.Examples.Editor.Default
{
public partial class DefaultCS : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
As suggested by MacGyver, you can go to the location [C:\Windws\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\solution_folder_to_delete]. You have to manually open each and every file with extension .out with any text editor. The .out files will show file name>col/row no. and error/warning: In my case it showed following:
D:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE> "C:\WINDOWS\Microsoft
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.1
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.
d:\Project2015\Nt.aspx.cs(122,26): warning CS0168: The variable 'ex' is declared but never used
d:\Project2015\Nt.aspx.cs(795,65): error CS1002: ; expected
精彩评论