Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

need help adding references to a VS2010 project

Posted on 2012-03-23
19
Medium Priority
?
285 Views
Last Modified: 2012-03-31
I have an Orchard CMS project that runs fine using web matrix, however when I open it in visual studio and try to build the solution, I get errors telling me the references are not correct. I have no idea where to even start troubleshooting this.

Please help point me in the right direction.
Issue-with-VS2010-Project-Build.docx
0
Comment
Question by:sqlagent007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 12
  • 7
19 Comments
 
LVL 1

Author Comment

by:sqlagent007
ID: 37759638
The project is MVC 3 and Razor
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 37760517
"Hayden" seems to be a part of your solution, so just check in your main project:

- go to Project properties, then References
- check the paths: missing references will have 0.0.0.0 as a version
- if that's the case, remove offending reference and add it afresh, selecting from Project tab
0
 
LVL 1

Author Comment

by:sqlagent007
ID: 37760667
At this point I have 2 projects under 1 solution. What I did was r click on the project "Orchard" located above "hayden.ContentAuthorization", then selected "property pages". The first screen was "references". So I clicked on "add", then browsed to the solution file of that project. Once that was done, I attempted a build. Now I am getting this error:

"Error      1      Object reference not set to an instance of an object."

The was I understand Orchard to work is that each module is its own solution. So all of these custom modules will need to be added as references, however I would like to get 1 working first. See screen shot
Obj-ref-not-set-err.jpg
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 1

Author Comment

by:sqlagent007
ID: 37760670
and...Thank you for the help!!
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 37760933
ok, then inspect hayden.ContentAuthorization project for its references to see that all is set and available
0
 
LVL 1

Author Comment

by:sqlagent007
ID: 37761211
I did a build on hayden.contentAuthorization and it built with 0 errors
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 37762592
you mentioned that you selected a solution for hayden project - is it correct ? I reckon it's just a terminology mistake because you should select a project, not the solution.

if you could post the sources it'd make the life much easier :)
0
 
LVL 1

Author Comment

by:sqlagent007
ID: 37762789
Yes, I made a mistake. (See attached screen shot) I added a reference to the project.

I am happy to post anything you need. Please clarify what you would like me to do.
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 37762841
Ideally, post the whole project so we can just get it compiled.

Alternatively, if I were you, I'd create simple project in the same solution where I'd reference that "hayden" project and create one of the objects from it. This should compile. Then you could compare any settings related to referenced component and see what's different.
0
 
LVL 1

Author Comment

by:sqlagent007
ID: 37762933
Please let me know as soon as you have pulled this down.

Source Code: ftp://68.14.213.228/Violet/OrchardProjectSln.zip
username=vsmith
password=CIS_123456 (CIS is all caps)

I know it will work with linking an empty project together, however the issue is that several people were developing custom modules for Orchard, and the control of adding them to 1 solution was not there. So I think what will need to happen is each individual project will need to be added as a reference. If you can just show me how to do 1, I can do the rest.
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 37763020
I've downloaded it, thanks. I'll let you know how it goes.
0
 
LVL 1

Author Comment

by:sqlagent007
ID: 37763142
Thank you so much for your help!
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 37764723
hmm, so far it compiles with 1-2 errors - working on it
0
 
LVL 1

Author Comment

by:sqlagent007
ID: 37765690
Wow, you are amazing! Thank you so much for your help. When I tried it had more than that.
0
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 37765993
I've just used exact sources you uploaded. What was/is the issue now is one of the modules (Contrib) which is not used in one of the cshtml files but then it generates temp cs file (a-la App_Web_kjhkjhkj.cs) the same namespace cannot be found.
0
 
LVL 1

Author Comment

by:sqlagent007
ID: 37766135
I don't think Contrib.DateTimeField is being used. You can just remove it.
0
 
LVL 1

Author Comment

by:sqlagent007
ID: 37766154
well, I see it in the app_data\dependencies\dependencies.compiled.xml, but I am not sure it is being used by the code.
0
 
LVL 1

Accepted Solution

by:
sqlagent007 earned 0 total points
ID: 37767918
I figured it out. What I needed to do was download the entire Orchard source code, then add each module to the Modules folder above Orchard.Web
0
 
LVL 1

Author Closing Comment

by:sqlagent007
ID: 37790391
solved
0

Featured Post

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The object model of .Net can be overwhelming at times – so overwhelming that quite trivial tasks often take hours of research. In this case, the task at hand was to populate the datagrid from SQL Server database in Visual Studio 2008 Windows applica…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question