Forum


HomeHomePremiumPremiumDevelopmentDevelopmentExcluding files from a buildExcluding files from a build
Previous
 
Next
New Post
7/20/2017 10:58 AM
 
Hi Steve,

>>I got confused a bit, sorry. 
Well maybe I didn't explain it very well then :-)

>>What I'm suggesting is just to add or not add files to the install pack. 
Yes, that's what I was expecting too. But when I tested, I found that if a file at the top level (i.e.

directly in the 'images' directory) was missing or older than the file contained in the installation file it was written to the directory, if not it wasn't replaced.


All i want to do is to be able to overwrite all files except for those that I exclude. I haven't been able to achieve that completely. There are two things i don't like:
1) If older images don't replace newer images (at the top level), then if i reverted to an old version of a file for some reason, it wouldn't be copied.
2) I now have to remember to specify every type of image file. I suppose I could do an exhaustive list of all possible image files just in case i use them in the future.

1) and 2) mean there are issues waiting to happen which will waste a lot of time in the future when I've forgotten about all this and the installation isn't working.

 

So I'm glad you questioned this. I think in hindsight it would be better to find another solution and put everything back as it was.

Steve

 
New Post
7/20/2017 11:19 AM
 

Even with the line:
<InstallInclude Include="**\images\**" Exclude="packages\**" />

Not all images are replaced.

I thought I had some kind of  solution but actually I don't. So I'm going to give up and solve the issue with C#, it will be much easier :-)

 

One other thought though, do you happen to know where the code the reads and interprets the 'ModulePackage.targets' file resides?

Best Regards,

Steve

 

Steve

 
New Post
7/20/2017 12:59 PM
 

Hi Steve,

I think we went down the rabbit hole here and I want to get out :)

I would like to step back for a second and point a one thing I noticed that is beyond your question, but should make you think about the direction you are taking.

You are concerned about files (svg files) getting replaced from the module install folder because you seem to be allowing the user to upload new files into the module folder. Ideally files uploaded by the user should be stored within the /portals/[portalid]/ folder where a new installation would not overwrite them. So you should avoid storing user uploaded files inside the module folder. It is usually a best practice mainly because of what you are saying: New installs (or module upgrades) overwriting previously modified files.

If you do that, your problem seems to disappear. Of course that would take further development from you. 

I know this doesn't solve your immediate issue, but I'm just questioning your approach here, assuming I understood you well.

My 2 cents outside the rabbit hole ;)

Cheers,

Aderson

 
New Post
7/20/2017 1:44 PM
 

Hi Aderson,

Yes you are spot on.

I put the files there 'temporarily' a while ago for convenience. But have all the other content files in portals/[portalid]/desktopmodules/[mymodulename] and that's where these files should go.

For this exercise, it's a good example of trying to work with what you have and not seeing the bigger picture.

 

It will be a lot more work but it's better to keep things clean.

 

Thank you for your thoughts. Sorry, I should have thought of this myself.

 

I'm glad we're out of the rabbit hole :-)

 

Best Regards,

 

Steve

 
New Post
7/21/2017 6:58 AM
 

Hi Steve,

Sometimes, me included, we get so much deep into a certain problem or issue that we forget to ask ourselves if what we are chasing really makes sense.

It is good to have an outside perspective that can look into what we are doing with a fresh set of eyes. I enlist the help of friends and colleagues of mine when I go there, not just from a technical stand point, like this case, but business wise as well.

Glad to be of help, and you can count on me for that any time.

Cheers,

Aderson

 
Previous
 
Next
HomeHomePremiumPremiumDevelopmentDevelopmentExcluding files from a buildExcluding files from a build



Try FREE
30 days money back guaranteed