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
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 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.
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 8 years ago.
Improve this question
So what I am needing to do is create a GUI for said code given, which is for this case, Test_01. I then import another project in this project, which is Test_02 that contains classes, methods, and everything that I should need to call upon in the web application.
To be able to access the contents of Test_02, do I need to create the specific controller(and if so, how can I tell which files I need(there are over 100 choices) in Test_01 or drag and drop the files into my Models folder and then call on them that way that I know I may need or not need.
You could add the assembly of Test_02 in Test_01 then you can access the classes from Test_02
Right click Test_01 project then choose Add Reference
Choose solution then select Test_02 from the list.
Don't forget to add using statements in your c# files.
using Solution.Test_02;
To be honest, its rather difficult to understand your question. It sounds incomplete.
It sounds like maybe you have a data model and want to know how to build an application using that model?
You can do this by creating a new project and adding the existing model classes to your project. You can right click the models folder and choose add>existing item.
Let me know if this makes sense or is off target.