how to edit .csproj file

lock picture lock · Feb 26, 2011 · Viewed 178k times · Source

When I am compiling my .csproj file using .NET framework 4.0 MSBUILD.EXE file I am getting an error "lable01" not found in the current context of "website01.csproj"

Actually I need to add every ASP.NET page with its Code Behind file's reference, I've done it, it's working fine but the above error is pending.

I hope it means that I need to add form name "LABLE01" in that .csproj file but I do not know the syntax. Anybody please do provide me with the syntax to add form name in .csproj file.

Answer

sgokhales picture sgokhales · Feb 26, 2011

The CSPROJ file, saved in XML format, stores all the references for your project including your compilation options. There is also an SLN file, which stores information about projects that make up your solution.

If you are using Visual Studio and you have the need to view or edit your CSPROJ file, while in Visual Studio, you can do so by following these simple steps:

  1. Right-click on your project in solution explorer and select Unload Project
  2. Right-click on the project (tagged as unavailable in solution explorer) and click "Edit yourproj.csproj". This will open up your CSPROJ file for editing.
  3. After making the changes you want, save, and close the file. Right-click again on the node and choose Reload Project when done.