Click here to Skip to main content
15,920,217 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I encounter this problem when i manually download a project sample source code from " http://code.google.com/p/nighthawk/source/browse/#svn%2Ftrunk%2FNighthawk[^]


[Click here fore screenshot ]

ASM
Error   2   'Data at the root level is invalid. Line 1, position 2.' XML is not valid.  

Error   4   The type or namespace name 'Application' could not be found (are you missing a using directive or an assembly reference?)  

Error   5   The type or namespace name 'StartupEventArgs' could not be found (are you missing a using directive or an assembly reference?) 

Error   6   The name 'NBug' does not exist in the current context  

Any idea whats wrong with all these? What shall i do to solve this?

Thanks
Posted
Updated 26-Jul-12 7:59am
v5
Comments
[no name] 26-Jul-12 12:48pm    
Did you add the using statement?
asdf9009 26-Jul-12 13:17pm    
how should i add?
this is the original raw file..i didnt edit anything...
lewax00 26-Jul-12 13:16pm    
Did you import the files into your own project or open it with their csproj/sln file?
asdf9009 26-Jul-12 13:17pm    
i import the file into my own project file..not theirs

You need to add a reference to the NBug.dll in your own project (right click References->Add Reference...->Browse and find it there).
 
Share this answer
 
Comments
asdf9009 26-Jul-12 13:22pm    
Hii tried to add the NBug.dll file, but VS stated that the file could not be added.
Screenshot:
https://lh6.googleusercontent.com/-XWeKEMZdzq8/UBF8YlAq0YI/AAAAAAAAAMM/OwnBdbVTrrg/s817/Fullscreen+capture+2772012+11842+AM.bmp.jpg[^]
lewax00 26-Jul-12 13:35pm    
What version of .Net are you targeting? (right click your project->Properties->Application tab, value in "Target framework:")
asdf9009 26-Jul-12 13:55pm    
i just change the solution name file to "Nighthawk "
and now i have even complicated issues..lol
im using .NET 4.0
lewax00 26-Jul-12 13:58pm    
Then I have no idea why this should fail, the DLL appears to be a .Net one. You may have better luck just importing their csproj into your solution and working from there.
asdf9009 26-Jul-12 13:59pm    
ok...i tried
In basic terms, it's to do with the namespace. I think the idea was that the NBug classes would be compiled into a single DLL and then referenced by your application.

Try this: put the edit point inside the word "NBug" and a small blue line will appera under the "N".
Hover the mouse over the blue line, and a drop down list will appear.
Open the drop down, and you will be presented with solutions to the problem.
Select the first one - it should add an appropriate using statement, and it should compile.
 
Share this answer
 
Comments
asdf9009 26-Jul-12 13:24pm    
it doesnt work
OriginalGriff 26-Jul-12 13:59pm    
That isn't a helpful problem report! :laugh:
It's like calling the garage, saying "my car broke" and hanging up - the mechanics don't know who you are,m whare you are, or what is wrong with your car, so you are going to be waiting a long time for help to come to you!
asdf9009 26-Jul-12 14:02pm    
anyway...now im looking deeper into the issues, attempt to solve it ,.
yea..it sounds like "my car broke" , because the driver just got his license or the car owner just got his new car not long ago =)
so have to spend some time to understand and learn how to solve the problem
OriginalGriff 26-Jul-12 14:06pm    
Sometimes the best thing you can do is scrap the car and get another!
Have you considered recreating your project from scratch and adding stuff until you are somewhere sensible?
If you create a backup directory, and copy the whole project in when it compiles and BEFORE you make changes, you can quickly and easily undo any problems.
asdf9009 26-Jul-12 15:11pm    
Hi
i download the source code file one by one...not download in a package..
Successfully run the solution by import the source file with the help of Source Control application
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900