Solved

C# Visual Studio will not compile

Posted on 2014-03-22
13
344 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
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

 
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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

821 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