Why HIDE (Exclude From Project)?

This is an open forum for any mojoPortal topics that don't fall into the other categories.

This thread is closed to new posts. You must sign in to post in the forums.
12/10/2009 9:30:31 PM
Gravatar
Total Posts 39

Why HIDE (Exclude From Project)?

I know this may seem like a silly question, but, I notice in the Web/Setup/applications/(pick-a-folder) that they are "Excluded From the Project.  This may seem like a rookie question, but... Why? Why exclude some, but not all?  Why include some and not all?

Thank you,

~ D

12/11/2009 1:14:14 AM
Gravatar
Total Posts 550

Re: Why HIDE (Exclude From Project)?

Hi,

As you may know mojoPortal has a core that implements in the mojoPortal.Web project and other features are implement as separated projects and plug to core in by "xcopy" instruction when we build these projeccts.You can see build events of mojoPortal.Features.UI for example. You may toggle "Show All Files" icon of the "solution Explorer" in VS.NET ,if you click that icon("Show All Files") again you see only included files for core system.

Hope Helps,

Asad

12/11/2009 8:48:06 AM
Gravatar
Total Posts 39

Re: Why HIDE (Exclude From Project)?

Thanks you Asad. However, those "Excluded Files" still have an impact on the build. Whether they are excluded or not, DOES does take those files into consideration.  That's why I was wondering why to Exclude them or not.  If it was just a visual preference or if indeed they should not be included during Build time.  Because they ARE being included during the Build process in mojoPortal.Features.UI.

Thank you again for your response.

~D

12/11/2009 9:13:43 AM
Gravatar
Total Posts 18439

Re: Why HIDE (Exclude From Project)?

Hi,

There is no problem building the solution(s) with Visual Studio.

Maybe you are trying to use the Visual Studio Publish feature but this is not supported

Source code files are included in the projects they belong to. Files copied by post build events up to the Web folder do not belong to the mojoPortal.Web project therefore the publish features does not work with them.

Miscellaneous files like sql scripts and config files beneath mojoPortal.Features.UI do not get compiled and therefore do not need to be included in the project. They are copied where they need to go by post build events. Right click the mojoPortal.Features.UI project and go to Properties  > Build Events and you will see.

Hope it helps,

Joe

12/11/2009 9:33:43 AM
Gravatar
Total Posts 39

Re: Why HIDE (Exclude From Project)?

Thank you, Joe. I understand this.  But if you make a change to something under in the Web project in the setup/application, and you are NOT showing all files in the Features.UI project.  Those changes get overwritten. If you right click and Build the Features.UI project - regardless if you have files Excluded - those excluded files still overwrite the files in the Web project.

So, I was just wondering... why Exclude or hide them?

As a side note: I use Unleash It for deployment.

Thanks,

~D

12/11/2009 9:36:30 AM
Gravatar
Total Posts 39

Re: Why HIDE (Exclude From Project)?

And I now see your link goes to Unleash It as well...

12/11/2009 9:58:42 AM
Gravatar
Total Posts 18439

Re: Why HIDE (Exclude From Project)?

 

The change does get overwritten under Web/Seup/Applications/[featurename] because the post build event for mojoPortal.Features.UI copies them from mojoPortal.Features.UI/Setup/applications/[featurename] up to the corresponding folder under Web

So if I was editing a script for mojoPortal.Features I would edit the one under mojoPortal.Features.UI/Setup/applications/[featurename] and then build to move it up to Web.

However, you should not make changes to any of the scripts included in mojoPortal just as you should not modify the mojoPortal source code. Doing that creates a fork that will be difficult to maintain or upgrade. You should not add fields to existing tables nor modify existing stored procedures. Any custom features should live in your own projects and you should structure them similarly as mojoPortal.Features projects using post build events to copy your custom files up to Web. If you need a custom version of a feature you should clone it first, rather than modifying the included one.

Hope it helps,

Joe

12/11/2009 10:03:31 AM
Gravatar
Total Posts 39

Re: Why HIDE (Exclude From Project)?

I couldn't agree with you more, Joe! And it is a lesson learned.

It's funny though... For the longest time, I have been under the impression that, if you Exclude From Project, then that file is ignored, even during a Build process. I could have sworn that is how it has always worked. But I guess I am wrong and I learned that is not the case. I guess I learned something new.

Anyway... I was just throwing this out there.  No big deal.

Thanks for your time,

~D

12/11/2009 10:10:22 AM
Gravatar
Total Posts 39

Re: Why HIDE (Exclude From Project)?

I'd rather be in NC drinking a beer with you, but I guess buying you one is the LEAST I can do...

Cheers,

~D

12/11/2009 10:11:02 AM
Gravatar
Total Posts 18439

Re: Why HIDE (Exclude From Project)?

You are correct, it is ignored and that is fine since it neither needs to be compiled nor embedded. Any files that must be compiled or embedded must be included in the project.

It is the custom post build event script that manages moving the files where they need to go under Web. And then UnleashIt deploys a package based solely on file extensions not on project membership. So you point UnleashIt at the Web folder for its source and as long as you've built everything all the needed files exist under Web.

Best,

Joe

12/11/2009 10:14:29 AM
Gravatar
Total Posts 39

Re: Why HIDE (Exclude From Project)?

I see... So it is the xcopy that is moving and overwriting the setup code in the Web project? So, even if those Files are "Excluded" xcopy could care less and moves or takes them into consideration anyway and replaces everything in the Web project?

I think it's all coming together now...

You must sign in to post in the forums. This thread is closed to new posts.