Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

C# Visual Studio will not compile

Posted on 2014-03-22
13
Medium Priority
?
356 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 2000 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 2000 total points
ID: 39947949
In Task Manager, can you see the processes running?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 7

Assisted Solution

by:Camillia
Camillia earned 2000 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 2000 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 2000 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 2000 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 2000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

972 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