类型或命名空间名称'的ProfileCommon'找不到 [英] The type or namespace name 'ProfileCommon' could not be found
问题描述
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屋!