Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I add to a new project existing project and I add the project reference too, but when I add a show of a class from the existing project- the project doesn't recognize it. For example-i open new project TripProject and I add to this project existing project TripCode containing class Person. I add the project reference to TripProject but when I try to make a show for Person it doesn't recognizes it.
Formalizing my comment as an answer:
Make sure that Person is a public class, and also that you specify the namespace in which Person is declared with a using-statement in the code where you want to use Person.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 4 years ago.
Improve this question
I wrote a simple two-class project in C# and as I would do in Java I split the classes into two separate source files. When I try to run the source file with main, the compiler does not find the other file. What should I include to make it work?
I have one file with the class main and another file with a class Foo.cs.
They are in the same namespace
A good start would be to use an IDE like Visual Studio (The community edition is free) and it can be downloaded from Microsoft.
Create a new solution and project
Import the files (for VS, right click --> Add --> Existing item.
Compile the solution with the IDE
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I want to store the assembly-version in one file for all projects in my solution.
This way it's easier to maintain the configuration.
In C# i can add links to the AssemblyInfo.cs in the project and Drag & Drop the file-link to the Properties.
This way the version is displayed correctly in Properties => Application => Assembly Information.
In VB.Net this is not possible. I can't Drop files into My Project. But this is the place where the AssemblyInfo.vb has to be placed. If it is stored in an other position, Visual Studio doesn't show it in My Project => Application => Assembly Information.
Create the link(file) in the project itself by right click Add existing item... and cut & paste the new link into the MyProject-Folder.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I am given a source control which comprises class libraries only.
How should I run the project?
You can't debug a class library directly. If you think about it, where would it start running, i.e. what method? You need to have an executable (console application, winforms, wpf, etc.) project to run, which would typically reference your class library.
If you have one of those in your solution, right-click on it in the solution explorer and select "Set as Startup Project". Then try again.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have two projects (1-Business: where I put the Linq Classes 2-View: wpf app, where i will show data) in the same solution (ProjectOne)
the problem is that I can't call the first project in the second one even when i add references (right click on the View project -->Property-->References Path-->Select the path of the Business Project Folder )
In fact i found the solution,
first of all change the output Type of the first project from "Window Application" to "Class Library" and build it, then go to th the references of the second project and add the First one as a reference to it
You need to add a 'using' statement to the top of the class.
using ProjectOne.1-Business;
namespace ...
{
public class ...
always a good practice is cleaning the solution and then rebuilding it
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to create a static class (IntNode, IntList) that I would be able to access through any project by using the class name.
I've saved the file name as the class name (IntNode.cs), and I added public before the class name, but still it is not recognized on other projects.
What else I'm missing?
The projects that want to use that class need to do one of the following two things:
Reference the assembly the classes have been defined in.
Directly add the *.cs files to the project. You can add them as a local copy or as a link.
Option 1 is preferred.