Форум программистов, компьютерный форум, киберфорум
C#: WPF, UWP и Silverlight
Войти
Регистрация
Восстановить пароль
Карта форума Темы раздела Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.54/13: Рейтинг темы: голосов - 13, средняя оценка - 4.54
10 / 10 / 3
Регистрация: 01.12.2009
Сообщений: 172
1

Не видит namespace List

08.07.2010, 15:33. Показов 2389. Ответов 4
Метки нет (Все метки)

Author24 — интернет-сервис помощи студентам
в статье
http://www.cyberguru.ru/dotnet... donet.html
в строчке
про List<Employee> подчеркивает и говорит мол Type cannot be found
wtf?
0
Programming
Эксперт
94731 / 64177 / 26122
Регистрация: 12.04.2006
Сообщений: 116,782
08.07.2010, 15:33
Ответы с готовыми решениями:

Using namespace не видит пользовательский класс
Добрый день. Я добавил в свой solution еще один проект. Назовем этот проект Configuration....

При подключении библиотеки к проекту не видит namespace
Доброго времени суток. Интересная возникла проблема... Есть solution. В нем есть проект...

Ошибка CS0234 The type or namespace name 'Office' does not exist in the namespace 'Microsoft'
Здравствуйте. Помогите разобраться. Сбилдил проект после переустановки винды и тут такая ошибка....

Головоломка с namespace в большом солюшине, проект подхватывает чужой namespace
Добрый вечер! Народ, подскажите, пожалуйста, что-то я никак понять не могу. Проблема в следующем:...

4
2096 / 1261 / 171
Регистрация: 01.02.2009
Сообщений: 2,842
08.07.2010, 15:43 2
ИМХО С Silverlight не общался, но может не хватает пространства имен System.Collection.Generic;
1
10 / 10 / 3
Регистрация: 01.12.2009
Сообщений: 172
08.07.2010, 16:13  [ТС] 3
хорошего программиста видно из далеко, спасибо в очередной раз)

Добавлено через 28 минут
там же
AdventureWorks_DataEntities ds =
new AdventureWorks.DataEntities();
опечатка? нижний пробел..должна быть точка я так поинмаю)
0
2096 / 1261 / 171
Регистрация: 01.02.2009
Сообщений: 2,842
08.07.2010, 16:18 4
Цитата Сообщение от kanana Посмотреть сообщение
опечатка? нижний пробел..должна быть точка я так поинмаю)
Думаю, что да. Потому как происходит создание экземпляра класса.
0
10 / 10 / 3
Регистрация: 01.12.2009
Сообщений: 172
09.07.2010, 16:11  [ТС] 5
в том же уроке подсоединение service reference .svc у меня вызывает ошибку
HTML5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
There was an error downloading 'http://localhost:1143/WebService.svc'.
The request failed with the error message:
--
<html>
    <head>
        <title>The type 'Qlider.Web.WebService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.</title>
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Lucida Console";font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        </style>
    </head>
 
    <body bgcolor="white">
 
            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
 
            <h2> <i>The type 'Qlider.Web.WebService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.</i> </h2></span>
 
            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">
 
            <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
            <br><br>
 
            <b> Exception Details: </b>System.InvalidOperationException: The type 'Qlider.Web.WebService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.<br><br>
 
            <b>Source Error:</b> <br><br>
 
            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code>
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>
 
                  </td>
               </tr>
            </table>
 
            <br>
 
            <b>Stack Trace:</b> <br><br>
 
            <table width=100% bgcolor="#ffffcc">
               <tr>
                  <td>
                      <code><pre>
 
[InvalidOperationException: The type 'Qlider.Web.WebService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.]
   System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses) +656
   System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath) +1442
   System.ServiceModel.HostingManager.ActivateService(String normalizedVirtualPath) +45
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath) +647
 
[ServiceActivationException: The service '/WebService.svc' cannot be activated due to an exception during compilation.  The exception message is: The type 'Qlider.Web.WebService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found..]
   System.Runtime.AsyncResult.End(IAsyncResult result) +437
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +188
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService) +230
   System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context) +25
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +478
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +76
</pre></code>
 
                  </td>
               </tr>
            </table>
 
            <br>
 
            <hr width=100% size=1 color=silver>
 
            <b>Version Information:</b>*Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
 
            </font>
 
    </body>
</html>
<!-- 
[InvalidOperationException]: The type 'Qlider.Web.WebService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found.
   at System.ServiceModel.Activation.ServiceHostFactory.CreateServiceHost(String constructorString, Uri[] baseAddresses)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.CreateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
   at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
[ServiceActivationException]: The service '/WebService.svc' cannot be activated due to an exception during compilation.  The exception message is: The type 'Qlider.Web.WebService', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could not be found..
   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result)
   at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, String routeServiceVirtualPath, Boolean flowContext, Boolean ensureWFService)
   at System.ServiceModel.Activation.HttpHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->
--.
Metadata contains a reference that cannot be resolved: 'http://localhost:1143/WebService.svc'.
The server did not provide a meaningful reply; this might be caused by a contract mismatch, a premature session shutdown or an internal server error.
If the service is defined in the current solution, try building the solution and adding the service reference again.
Плюс поясните плиз чем отличается service reference от обычного..почепму подобную ссылку не подключить просто через референсм?

Добавлено через 22 часа 42 минуты
Вопрос актуален)
0
09.07.2010, 16:11
IT_Exp
Эксперт
87844 / 49110 / 22898
Регистрация: 17.06.2006
Сообщений: 92,604
09.07.2010, 16:11
Помогаю со студенческими работами здесь

The type or namespace name 'DirectoryServices' does not exist in the namespace 'System'
Подскажите, пожалуйста! Только начинаю на C# писать!:scratch: Вот такой вроде небольшой кодик: ...

Какую ссылку добавить для решения проблемы "namespace name 'Drawing' does not exist in the namespace 'System'"
уже который раз сталкиваюсь с этой проблемой. Ошибка: The type or namespace name 'Drawing' does...

#include <list> - конфликт using namespace std с другими инклюдами
Всем привет. Появилась надобность использовать списки, однако #include &lt;list&gt; подключается только...

Почему xaml не видит namespace?
Имеется C# Для Windows Phone, VS2013 XAML &lt;Application x:Class=&quot;PivotApp3.App&quot; ...

Области видимости namespace .Ошибка No code may exist outside of namespace {}
&lt;?php namespace MyProject{ class ClassA { public $val = 'MyProject &quot;ClassA&quot;'; } } namespace...

Ошибка создания Device в DirectSound. Не видит namespace Device
хочу в примитивной игрушке (сделанной не на Direct3D) добавить звуковое оформление через...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
5
Ответ Создать тему
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2024, CyberForum.ru