473,406 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

BuildEngine

Joe
Hi anyone use the BuildEngine Class

I cannot get code from MSDN to compile. I get the following error.
I am trying to us it to parse csproj file

thanks
at line
engine = new Microsoft.Build.BuildEngine.Engine(binPath);

get this error

Error 1 Invalid token '=' in class, struct, or interface member declaration
C:\Data\DotNet\CSharp\XML\ParseCSharpProjFile\Clas s1.cs 23 20
ParseCSharpProjFile

using System.Reflection;

using Microsoft.Build.BuildEngine;

using Microsoft.Build.Framework;

using Microsoft.Build.Utilities;

using Mono.XBuild.Framework;

using Mono.XBuild.Utilities;

namespace ParseCSharpProjFile

{

class Class1

{
// Instantiate a new Engine object

Microsoft.Build.BuildEngine.Engine engine;

// Point to the path that contains the .NET Framework 2.0 CLR and tools

string binPath = "C:\\WINNT\\Microsoft.NET\\framework\\v2.0.507 27";

engine = new Microsoft.Build.BuildEngine.Engine(binPath);
// Create a new empty project

Project project = new Project();
// Load a project

project.Load(@"c:\temp\validate.proj");

Console.WriteLine("Project Properties");

Console.WriteLine("----------------------------------");
Sep 25 '06 #1
1 3777
Hi Joe,
Error 1 Invalid token '=' in class, struct, or interface member
declaration C:\Data\DotNet\CSharp\XML\ParseCSharpProjFile\Clas s1.cs 23 20
ParseCSharpProjFile
Your code must reside inside a method. I can't see you having one!

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Sep 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Wayne | last post by:
This may not be the best group to ask in as the question is about the beta, if there is a better place please point me to it. I've had beta 1 installed, after a re-install of the OS this weekend...
4
by: Wayne | last post by:
This may not be the best group to ask in as the question is about the beta, if there is a better place please point me to it. I've had beta 1 installed, after a re-install of the OS this weekend...
0
by: Vlad# | last post by:
Hi, I wanted to try out some development for the Windows CE 5.0 platform so downloaded the SmartPhone SDK from Microsoft and started up a new project with a blank form. This is virtually a blank...
6
by: Russ | last post by:
This really is the worst Microsoft product I have ever had the misfortune to work with. After the excellent feattures and stability of VS.NET 2002 and 2003, I was confident enough to start a...
0
by: Doug Handler | last post by:
Error 1 The "GenerateApplicationManifest" task failed unexpectedly. System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less...
1
by: Daan | last post by:
We are using Visual Studio 2005 to create a .NET Compact Framework 2.0 application. In our solution, we have several projects. Sometimes, when trying to build the solution, we get the following...
5
by: sunyour | last post by:
I'm developing an application that takes a csproj file as input (and output). I've searched for a definition or schema file for the csproj xml-file to understand the possibilites and restrictions,...
1
by: Divided Sky | last post by:
Is there an msbuild-specific discussion group? Also, is there an msbee discussion group that is active? Is there a good resource for info about using Microsoft.Build.BuildEngine.Engine class? ...
3
by: =?Utf-8?B?TGV3aXMgTW90ZW4=?= | last post by:
Hello. We are having a problem here trying to compile C# applications. Only one developer has a problem where they attempt to compile the application and the compiler complains about being out of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.