简体   繁体   中英

VS10 IDE cannot find referenced assemblies

I should preface this question by stating that I am (potentially) inheriting a project that is somewhere around 85% complete. After witnessing successful execution, the full solution was transferred to my machine where I have been struggling to get it running again.

Having made no changes prior, the IDE gives me the following error message:

The type or namespace name 'Infrastructure' does not exist in the namespace 'MyProject' (are you missing an assembly reference?)

This is in spite of clearly seeing the assembly referenced beneath the reference node. I've attempted unattaching, rebuilding, and reattaching the offending assemblies to no avail.

I have explored a variety of options as suggested by other users for similar issues without finding a solution.

What are some potential causes of this and what solutions can I explore?

Your IDE is probably not set Target Framework :

To change the targeted .NET Framework version in an existing project

  1. Open the project you want to change.
  2. In the Solution Explorer toolbar, choose the Properties button.
  3. You can also select the project node in Solution Explorer, open the context menu (by right-clicking the node), and select Properties.
  4. You should see the settings on the Application tab. If you do not, select it.
  5. In the Target Framework dropdown list, choose the .NET Framework version that you want. Then click the OK button.

The project unloads and then reloads. It now targets the framework version that you just selected.

要解决此问题,请在源文件中添加USING行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM