Solved

C# Visual Studio will not compile

Posted on 2014-03-22
13
341 Views
Last Modified: 2014-04-08
Hello Experts,

I have a Visual Studio 2008 project (C#) that will  not compile.

I am getting the following error:

Warning      1      Referenced assembly 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\vjslib.dll' targets a different processor than the application.      

Does anyone know how to rectify this?

Thanks!
0
Comment
Question by:Saxitalis
  • 7
  • 6
13 Comments
 
LVL 7

Assisted Solution

by:Camillia
Camillia earned 500 total points
Comment Utility
Is that dll locked by another process?

Did you try closing VS, reopening and compiling again?
0
 

Assisted Solution

by:Saxitalis
Saxitalis earned 0 total points
Comment Utility
Hmm - how can I tell if another process is causing this?

I did try closing and re-opening VS but same thing.
0
 
LVL 7

Assisted Solution

by:Camillia
Camillia earned 500 total points
Comment Utility
In Task Manager, can you see the processes running?
0
 
LVL 7

Assisted Solution

by:Camillia
Camillia earned 500 total points
Comment Utility
Do you have other 2008 projects that compile or is this the only one that doesn't?
0
 

Assisted Solution

by:Saxitalis
Saxitalis earned 0 total points
Comment Utility
Yes  other C# VS studio ptojects compile just fine.

The one that won't compile is actually an exact copy of one that will (compile) with one change. It is an SQL server data driven application. I am connecting to the same database on a different SQL server instance via a different ODBC connection. I have done this quite a bit and never had problems.

Any ideas?
0
 
LVL 7

Assisted Solution

by:Camillia
Camillia earned 500 total points
Comment Utility
Can you change the ODBC to the same one that's working and see if it will compile? just as a test (I doubt it's related tho)
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 7

Assisted Solution

by:Camillia
Camillia earned 500 total points
Comment Utility
What is your target CPU?

This is how you get to it in VS2010 :  go to your Project Properties, go to Compile, Advanced Compile Option

Compare the one that works with the one that doesn't
0
 

Assisted Solution

by:Saxitalis
Saxitalis earned 0 total points
Comment Utility
Target CPU is any on both. I changed it to X64 only (my machine) but same thing..
0
 
LVL 7

Assisted Solution

by:Camillia
Camillia earned 500 total points
Comment Utility
I have to say I don't know and you can click "request attention" to see if others can help.

Since you copied and created another project...I'm guessing there's a conflict with that dll.
0
 
LVL 7

Accepted Solution

by:
Camillia earned 500 total points
Comment Utility
Did you try setting it to x86?
0
 

Author Comment

by:Saxitalis
Comment Utility
Please close
0
 

Author Comment

by:Saxitalis
Comment Utility
I am the question asker
0
 

Author Closing Comment

by:Saxitalis
Comment Utility
All good suggestions - Something was corrupted in this solution. I made a new copy of the same solution and it compiles fine.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

763 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now