Page view counter

Web Setup & precompiled project

Rate It (1)

Last post 12-18-2008 3:18 AM by Shaimaa Mohammad. 10 replies.

Sort Posts:

  • Web Setup & precompiled project

    06-17-2005, 7:18 PM
    • Loading...
    • dLowe
    • Joined on 07-12-2002, 1:18 PM
    • Posts 74
    • Points 370
    Is it possible to create a Web Setup project that installs a pre-compiled web site? Or do you have to call aspnet_compiler in a custom action?

    Thanks,

    --Doug
  • Re: Web Setup & precompiled project

    06-20-2005, 9:15 PM
    • Loading...
    • qingye
    • Joined on 07-10-2002, 4:12 PM
    • Posts 47
    • Points 200
    • AspNetTeam

    What's the custom action you're looking for? If the web site has already been precompiled, usually you could just simply xcopy all files to a new location. Does that answer your question?

    Thanks,
    Qing

  • Re: Web Setup & precompiled project

    06-21-2005, 12:28 PM
    • Loading...
    • dLowe
    • Joined on 07-12-2002, 1:18 PM
    • Posts 74
    • Points 370

    I want to create a Setup.exe I can distribute on CD to install the web app. But I haven't fiddled around with it much. I was looking for an option in the Web Setup project that would install the application precompiled so the source files aren't installed by Setup. I wonder if I need to precompile the app first with -u (not inplace), then open the precompiled site in VS 2005 and add a Web Setup project. Will the resulting Setup.exe & Setup.msi install a precompiled app with no source code?

    --Doug

  • Re: Web Setup & precompiled project

    06-21-2005, 6:29 PM
    • Loading...
    • qingye
    • Joined on 07-10-2002, 4:12 PM
    • Posts 47
    • Points 200
    • AspNetTeam
    There are 3 modes of precompilation: in-place, updatable and non-updatable. Since you're looking for distribution of your web project, site-deployment precompilation (updatable or non-updatable) will be suitable for you. Source files will be protected (compiled and removed) in both cases. The only difference is, for updatable precompilation (with -u option), we don't precompile the page. So people still can add new page or update existing ones. While for non-updatable (without -u), we precompile everything, so your customer will not see anything, not only code file, but also page layout.

    Below is the how you could do non-updatable precompilation:
       aspnet_compiler -v <sourceApp> <targetLocation>
    and updatable precompilation:
       aspnet_compiler -v <sourceApp> <targetLocation> -u

    So, I think you could precompile your web project using one of the above 2 modes to a temp location. Then create your Web Setup project to deploy the precompiled results, which could be as simple as xcopy.

    Thanks,
    Qing
  • Re: Web Setup & precompiled project

    07-14-2005, 9:28 AM
    • Loading...
    • RobC04
    • Joined on 07-11-2005, 4:50 PM
    • Posts 8
    • Points 40
    Hi,
    I have the same issue as mentioned in this post, but I don't believe Qing's post fully addresses it.
    If you precompile to a temporary directory and try to include those dlls, you have to do so manually. This means as a new web page (if batch compilation mode isn't used) or new folder (if batch compilation mode is used) is added to the project you must manually go back and edit the setup project. This is error prone and inconvenient. The web setup project should contain an option to include the build output (precompiled website) for a website, just like you can include the build output for a class library or windows application. If there a way to do this now or is it planned for a post beta 2 build?

    Thanks,
    Rob
  • Re: Web Setup & precompiled project

    07-14-2005, 4:33 PM
    • Loading...
    • qingye
    • Joined on 07-10-2002, 4:12 PM
    • Posts 47
    • Points 200
    • AspNetTeam
    I see. The "setup" project  I was talking about is more a general concept. It could be a simple batch file, which calls aspnet_compiler, xcopies the compiled result to the web server, configs the web site (using mdutil.exe for example), etc.

    While the "Web Setup Project" you referred to, is the project template offered by Visual Studio. There might be some disconnection between this project and aspnet's precompilation tool. I'm not sure if they integrate this new V2 feature into account or not. Every update to the original web site requires an update to the setup project is indeed very inconvenient. I would try to find someone who has the knowledge to give you a better answer.

    There is another tool, MSBuild.exe, which parses the solution file for a web project and calls into aspnet_compiler.exe. You might want to have a try to see if this tool could be leveraged in any way.

    Thanks!
    Qing
  • Re: Web Setup & precompiled project

    07-15-2005, 12:05 AM
    • Loading...
    • qingye
    • Joined on 07-10-2002, 4:12 PM
    • Posts 47
    • Points 200
    • AspNetTeam
    OK, I've got a quick answer. There is no integration between "Web Setup Project" and aspnet_compiler in this coming release. So, you could only add files from the precompiled location to your "web setup project". As you said, it's tedious and error prone. I was also told that you could import a web project to Web Setup project. If so, you could create a web over the precompiled location and import it to Web Setup Project. It might help a little bit for you to update the web setup project when there is any change made to the precompiled location.

    Thanks,
    Qing
  • Re: Web Setup & precompiled project

    07-15-2005, 9:25 AM
    • Loading...
    • RobC04
    • Joined on 07-11-2005, 4:50 PM
    • Posts 8
    • Points 40
    Thank you very much for your reply, although I wish the answer was different! I will see if MSBuild makes this any easier.
    Thanks again,
    Rob
  • Re: Web Setup & precompiled project

    02-02-2006, 9:04 PM
    • Loading...
    • MNF
    • Joined on 07-25-2005, 12:15 AM
    • Posts 71
    • Points 257
    The process you suggested is working, but you also need to ignore some Visual Studio warnings/errors. See my blog post "Using VS 2005 Web Setup Project - not user friendly process".
  • Re: Web Setup & precompiled project

    02-03-2006, 2:05 PM
    • Loading...
    • qingye
    • Joined on 07-10-2002, 4:12 PM
    • Posts 47
    • Points 200
    • AspNetTeam

    Good news. A newly added project "Web Deployment Project" will relief the pain:

    If you have a complex Visual Studio 2005 web project, require different web.config settings for development and production deployment or you'd like more control over the compilation process, check out Web Deployment Projects, a new tool for Visual Studio 2005.
    ยป Download Web Deployment Projects

    Please note this is only a preview. There will be continuously update available for bug fixing.

    Thanks,
    Qing

  • Re: Web Setup & precompiled project

    12-18-2008, 3:18 AM

    I have download the Web Deployment Projects  tool

    and made add web deployment project to my website

    and I set the following properities:

    Compilation --> generate debug information , allow precompiled site to be updated

    Out assembiles --> merge all output to a single assembly

    Deployment --> Create IIS Virtual Directory for output folder , replace existing virtual directory , remove App_Data folder from output location

    Then I have created a web setup project and add the apxs files in the file system of the web setup project and I also added project output of the web deployement project

    After I compile the solution and Install the website , and trying to browse the website from IIS the pages is displayed but there are data in database isn't retrieved and isn't displayed in the page while If I create the Virtual directory manually from IIS it works right and display the data from database

    Note:

    I added some tags in web.config file

    <appSettings>

    <add key="ConnectionString" value="Provider=sqloledb;Data Source=developer3;Initial Catalog=KSearchDatabase;Integrated Security=SSPI;" />

    <add key="Connection_Type" value="SQLServer" />

    <add key="Addressing_Type" value="Rel" />

    <add key="IndexPath" value="Indexes" />

    <add key="FilePathStr" value="Files" />

    </appSettings>

    Where is the problem ?!!! Confused

     

     

     

Page 1 of 1 (11 items)