Solved

C# Visual Studio will not compile

Posted on 2014-03-22
13
343 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
ID: 39947920
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
ID: 39947939
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
ID: 39947949
In Task Manager, can you see the processes running?
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 7

Assisted Solution

by:Camillia
Camillia earned 500 total points
ID: 39947955
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
ID: 39947969
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
ID: 39947992
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
 
LVL 7

Assisted Solution

by:Camillia
Camillia earned 500 total points
ID: 39947994
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
ID: 39948190
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
ID: 39948193
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
ID: 39948194
Did you try setting it to x86?
0
 

Author Comment

by:Saxitalis
ID: 39976481
Please close
0
 

Author Comment

by:Saxitalis
ID: 39976484
I am the question asker
0
 

Author Closing Comment

by:Saxitalis
ID: 39985523
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Set value of dynamically created checkboxlist 2 33
Why does my excel data start at B1 instead of A1. 9 83
SSRS subreport with parameter 3 32
Printing 1 51
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

770 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