Ошибка компилятора cs0234

We’re working on a WPF project using Visual Studio 2015. We’ve got a folder in the project named Assets. It shows up fine in VS 2015. The files in it show up fine in the Solution Explorer. But when we build it, VS 2015 complains with the following error:

Error CS0234 The type or namespace name ‘Assets’ does not exist in
the namespace ‘CoreFramework’ (are you missing an assembly
reference?)

(CoreFramework is the name of our solution and the project that Assets is in.)

I don’t get how the folder is there in CoreFramework, but when building it, VS 2015 just doesn’t see it. I’ve tried cleaning both the project and the solution in VS 2015, but it doesn’t help at all. The same errors keep popping up. And they popup in our nightly builds as well.

So what is causing VS 2015 to simultaneously see a folder within a project and not see that same folder in the project?

StayOnTarget's user avatar

StayOnTarget

11.8k10 gold badges52 silver badges84 bronze badges

asked Feb 15, 2016 at 22:01

Rod's user avatar

17

In this case what I had to do was to delete everything in the obj folder beneath our project main folder. The solution’s name is CoreFramework and the main project’s name is also CoreFramework. So what I did was go to \CoreFramework\CoreFramework\obj and deleted everything there. Since at this point we’re only dealing with a debug version, the only thing there was the Debug folder and all temporary files and folders under that. Once I did that, then rebuilding the solution re-created all of the temporary files and folders, without the problem I was having with the Assets folder. It built fine.

YMMV

answered Feb 16, 2016 at 18:47

Rod's user avatar

RodRod

4,11512 gold badges57 silver badges82 bronze badges

Check the .Net-Framework Versions of both Projects. If the referenced project has a higher .Net-Framework Version than the referencing project this error might occur.

ProjectName -> Properties -> Application -> Target framework

answered Jun 25, 2021 at 12:44

Findas's user avatar

I had the same issue after I manually copied the referenced DLL file.
I solved it by displaying the reference properties in the Solution explorer then changing the Specific version setting from True to False and finally changing it back to True.
I rebuild and… it works just fine. Do not ask me why…

Note : I had to do the same for each project which had the CS0234 error message

PS : in my case Visual studio version is 16.1.6

answered Dec 30, 2019 at 13:25

leguminator's user avatar

We’re working on a WPF project using Visual Studio 2015. We’ve got a folder in the project named Assets. It shows up fine in VS 2015. The files in it show up fine in the Solution Explorer. But when we build it, VS 2015 complains with the following error:

Error CS0234 The type or namespace name ‘Assets’ does not exist in
the namespace ‘CoreFramework’ (are you missing an assembly
reference?)

(CoreFramework is the name of our solution and the project that Assets is in.)

I don’t get how the folder is there in CoreFramework, but when building it, VS 2015 just doesn’t see it. I’ve tried cleaning both the project and the solution in VS 2015, but it doesn’t help at all. The same errors keep popping up. And they popup in our nightly builds as well.

So what is causing VS 2015 to simultaneously see a folder within a project and not see that same folder in the project?

StayOnTarget's user avatar

StayOnTarget

11.8k10 gold badges52 silver badges84 bronze badges

asked Feb 15, 2016 at 22:01

Rod's user avatar

17

In this case what I had to do was to delete everything in the obj folder beneath our project main folder. The solution’s name is CoreFramework and the main project’s name is also CoreFramework. So what I did was go to \CoreFramework\CoreFramework\obj and deleted everything there. Since at this point we’re only dealing with a debug version, the only thing there was the Debug folder and all temporary files and folders under that. Once I did that, then rebuilding the solution re-created all of the temporary files and folders, without the problem I was having with the Assets folder. It built fine.

YMMV

answered Feb 16, 2016 at 18:47

Rod's user avatar

RodRod

4,11512 gold badges57 silver badges82 bronze badges

Check the .Net-Framework Versions of both Projects. If the referenced project has a higher .Net-Framework Version than the referencing project this error might occur.

ProjectName -> Properties -> Application -> Target framework

answered Jun 25, 2021 at 12:44

Findas's user avatar

I had the same issue after I manually copied the referenced DLL file.
I solved it by displaying the reference properties in the Solution explorer then changing the Specific version setting from True to False and finally changing it back to True.
I rebuild and… it works just fine. Do not ask me why…

Note : I had to do the same for each project which had the CS0234 error message

PS : in my case Visual studio version is 16.1.6

answered Dec 30, 2019 at 13:25

leguminator's user avatar

Search code, repositories, users, issues, pull requests…

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

I have some missing assemblies in my PC, and don’t have any idea how to fix it.

When I create a new ASP.NET MVC 4 internet application from template (using VS 2012) everything works fine. As soon as I try to integrate Web API controller I get a missing assembly reference error. For example, when I create application using ASP.NET 4 Web API default template and click «API» on the interface I get Compilation error:

Compiler Error Message: CS0234: The type or namespace name 'Description' does not exist in the namespace 'System.Web.Http' (are you missing an assembly reference?)

I have checked the assembly and everything seems to be fine. It’s in version 4.0. I have .NET framework 4.5 installed on my PC. Where should I look for the reason of the issue?

asked Nov 3, 2014 at 22:38

Bartosz's user avatar

BartoszBartosz

4,54211 gold badges44 silver badges69 bronze badges

4

I saw this same error code (different missing reference) when compiling a PCL using msbuild but not when building via Visual Studio:

error CS0234: The type or namespace name 'Storage' does not exist in the namespace 'Windows' (are you missing an assembly reference?)

In my case it was caused by a ‘using Windows.Storage;’ statement that was not actually referenced by any code in the file. I removed the line and the error was fixed.

answered Jul 23, 2015 at 22:40

Andy Joiner's user avatar

Andy JoinerAndy Joiner

5,9623 gold badges45 silver badges72 bronze badges

23 / 10 / 1

Регистрация: 08.10.2015

Сообщений: 384

1

07.08.2018, 10:44. Показов 4773. Ответов 6


Студворк — интернет-сервис помощи студентам

Здравствуйте!
При добавлении строки кода:»using System.Text.RegularExpressions;», в проект, возникает ошибка:
CS0234 Тип или имя пространства имен «RegularExpressions» не существует в пространстве имен «System.Text» (возможно, отсутствует ссылка на сборку).
Подскажите, пожалуйста, как это исправить?



0



910 / 795 / 329

Регистрация: 08.02.2014

Сообщений: 2,391

07.08.2018, 11:03

2

1) Версия .net какая у Вас стоит?
2) System.dll подключена в проекте?



0



23 / 10 / 1

Регистрация: 08.10.2015

Сообщений: 384

07.08.2018, 11:14

 [ТС]

3

SeIZVeIZ,
1) VS 2015 4.5.2
2) Как её подключить?



0



910 / 795 / 329

Регистрация: 08.02.2014

Сообщений: 2,391

07.08.2018, 11:19

4

Лучший ответ Сообщение было отмечено HitGirl как решение

Решение

В Solution Explorer(Обозреватель решений), есть папка Reference(ссылки), нажимаете правой кнопкой -> Добавить -> Там Assemblies (не знаю как в русской локализации будет там может Сборки) -> и в списке выбираете System



1



0 / 0 / 0

Регистрация: 17.07.2021

Сообщений: 9

20.07.2021, 19:02

5

Нужно, чтобы работала команда using Systeam.Windows.Froms
Но нужно, как я понял подключать какие-то ссылки или сборки, пишут как это сделать и в конце выбирайте нужны файл, а какой нужен то??? и где его искать



0



Эксперт по электронике

2413 / 1651 / 490

Регистрация: 04.09.2018

Сообщений: 5,747

Записей в блоге: 3

20.07.2021, 19:09

6

Код покажите свой. Ошибка CS0234 может возникать и в случае синтаксической ошибки.



0



0 / 0 / 0

Регистрация: 17.07.2021

Сообщений: 9

20.07.2021, 19:42

7

Ошибkа — CS0234, что-то попытался добавить , теперь ошибка еще эта — MSB3290
мне нужно , чтобы работало using System.Windows.Forms, но как я понял сначала нужна ссылка на сборку (Где эту ссылку искать я не знаю)



0



Понравилась статья? Поделить с друзьями:

Интересное по теме:

  • Ошибка компилятора cs0120
  • Ошибка компас не удалось открыть документ
  • Ошибка кода 5017 tp link
  • Ошибка компилятора cs0115
  • Ошибка компилятора cs0030

  • Добавить комментарий

    ;-) :| :x :twisted: :smile: :shock: :sad: :roll: :razz: :oops: :o :mrgreen: :lol: :idea: :grin: :evil: :cry: :cool: :arrow: :???: :?: :!: