• Web Profile Builder for Web Application Projects


    Web Profile Builder for Web Application Projects

    Files can be downloaded from the Web Profile Builder project page.

    If you use Web Application Projects, you have probably run into the issue of not being
    able to access the Profile at design time.

    Thankfully, some nice people created an Add-In for Visual Studio 2005 that will generate
    a wrapper class as a workaround.  That project can be found here.  I wanted to contribute
    to the Web Profile Generator project, but my emails went unanswered.  I decided to start
    a new project.

    This project picks up where that one left off and is based on their source code.  I started
    out rebuilding that project as it stood to add support for Visual Studio 2008.  I got it to
    work, but I wanted to do more. 

    I decided to go ahead and address the issues listed on the original project site.

    Here is a summary of the changes made.

    • First of all, this is no longer an Add-In.  Instead, it is a Build Task.
    • Works for Visual Studio 2005 and 2008.
    • Added ability to set the file name.
    • Added ability to set the directory the file gets created in.
    • Added ability to set the class name.
    • Added ability to set the name space.
    • Added an extra method as requested here.

    Usage:

    1. Run the installer.
    2. Add this Import statement to your project file.  (see special notes below)
      <Import Project="$(MSBuildExtensionsPath)\WebProfileBuilder\WebProfileBuilder.targets" />
    3. Done.

    The profile will get generated every time you build the project.

    Special Notes:

    After you modify the project file by adding the import statement, you will get this security
    warning when the project loads.  Choose the "Load project normally" option and press OK.
    image 

    Extended Usage:

    If you want to customize the web profile, you can add the following sections to your web.config.

    This section needs to be at the top of the file just under the opening configuration tag.
    <configSections>
       
    <sectionGroup name="robo.webProfile">
           
    <section name="webProfileSettings"
             
    type="WebProfileBuilder.WebProfileConfigurationSection, WebProfileBuilder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=01d50f1f82943b0c"
             
    allowLocation="true"
             
    allowDefinition="Everywhere"/>
       
    </sectionGroup>
    </configSections>

    This section can be anywhere under the configuration section.
    <robo.webProfile>
       
    <webProfileSettings className="MyWebProfile"
                           
    nameSpace="CustomNameSpace" 
                           
    directory="CodeFiles"
                           
    fileName="MyWebProfile" />
    </robo.webProfile>

    The directory name is not a virtual directory, but is in reference to the root of the Web Application.
    The fileName is just the name of the file and should not include an extension.
    The className and nameSpace are as you would expect.
    None of these settings are required.  You don't even need to define this section at all.

    If you would like to use Web Profile Builder, it can be downloaded here.
    Also available is the complete source code and examples in VB and C#.

    Thanks
    -Joe

    Published Feb 03 2008, 03:21 AM by robolize Filed under: ASP.NET, Profile, WAP, Web Application Project


    ref:
    http://www.codeplex.com/WebProfile/Release/ProjectReleases.aspx?ReleaseId=5460
    http://code.msdn.microsoft.com/WebProfileBuilder
    http://weblogs.asp.net/joewrobel/archive/2008/02/03/web-profile-builder-for-web-application-projects.aspx

  • 相关阅读:
    Python命名空间的本质
    Jetty架构解析及应用示例
    PRML读书会第一章 Introduction(机器学习基本概念、学习理论、模型选择、维灾等)
    PRML读书会第三章 Linear Models for Regression(线性基函数模型、正则化方法、贝叶斯线性回归等)
    PRML读书会第二章 Probability Distributions(贝塔二项式、狄利克雷多项式共轭、高斯分布、指数族等)
    PRML读书会第四章 Linear Models for Classification(贝叶斯marginalization、Fisher线性判别、感知机、概率生成和判别模型、逻辑回归)
    Mac技巧合集第二期
    Mac技巧合集第三期
    C/Java/Python/ObjectiveC在OS X上的性能实验
    程序猿崛起——Growth Hacker
  • 原文地址:https://www.cnblogs.com/emanlee/p/1193525.html
Copyright © 2020-2023  润新知