类型或命名空间名称'的ProfileCommon'找不到 [英] The type or namespace name 'ProfileCommon' could not be found

查看:477
本文介绍了类型或命名空间名称'的ProfileCommon'找不到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Gooday,我创建在Visual Studio C#网站的ASP.NET。我用的ProfileCommon和偶然发现了这个错误:


  

类型或命名空间名称'的ProfileCommon'找不到(你
  缺少using指令或程序集引用?)


希望它有一个速战速决? 我应该包括哪些指令?多谢了。

编辑:有什么建议? - 安装后,我这个插件:
<一href=\"http://archive.msdn.microsoft.com/WebProfileBuilder/Release/ProjectReleases.aspx?ReleaseId=980\" rel=\"nofollow\">http://archive.msdn.microsoft.com/WebProfileBuilder/Release/ProjectReleases.aspx?ReleaseId=980


  

错误1BuildWebProfile任务意外失败。
  System.ArgumentNullException:String引用未设置为一个实例
  的字符串。参数名称:S在
  System.Text.Encoding.GetBytes(String s)将在
  WebProfileBuilder.Builder.IsProfileSame()在
  WebProfileBuilder.Builder.GenerateWebProfile(BuildWebProfile
  buildWebProfile)在WebProfileBuilder.BuildWebProfile.Execute()结果
  在
  Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy
  engineProxy,ItemBucket斗,TaskExecutionMode howToExecuteTask,
  ITask任务,布尔和放大器; taskResult)Cinemax在



解决方案

在我来说,我不得不轮廓元素添加到web.config文件。

 &LT;配置文件中启用=真正的defaultProvider =MyCustomProfileProvider&GT;
...
&LT; / profile文件&GT;

请参见 MSDN -profile元素(ASP.NET设置架构)

Gooday, I'm creating an ASP.NET with C# Website in Visual Studio. I used ProfileCommon and stumbled upon this error:

The type or namespace name 'ProfileCommon' could not be found (are you missing a using directive or an assembly reference?)

Hope it has a quick fix? What directive should I include? Thanks a lot.

EDIT: Any advice? - After I installed this add-in: http://archive.msdn.microsoft.com/WebProfileBuilder/Release/ProjectReleases.aspx?ReleaseId=980

Error 1 The "BuildWebProfile" task failed unexpectedly. System.ArgumentNullException: String reference not set to an instance of a String. Parameter name: s at System.Text.Encoding.GetBytes(String s) at WebProfileBuilder.Builder.IsProfileSame() at WebProfileBuilder.Builder.GenerateWebProfile(BuildWebProfile buildWebProfile) at WebProfileBuilder.BuildWebProfile.Execute()
at Microsoft.Build.BuildEngine.TaskEngine.ExecuteInstantiatedTask(EngineProxy engineProxy, ItemBucket bucket, TaskExecutionMode howToExecuteTask, ITask task, Boolean& taskResult) Cinemax

解决方案

In my case i had to add the profile Element to the web.config file.

<profile enabled="true" defaultProvider="MyCustomProfileProvider">
...
</profile>

see MSDN -profile Element (ASP.NET Settings Schema)

这篇关于类型或命名空间名称'的ProfileCommon'找不到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆