When I deploy my project the help file with the mht extension does not get copied across to the drop folder with the rest of the project. Why is this, and how do I fix it? I am using tfs 2010.
Asked
Active
Viewed 171 times
1
-
1Is the help file a static file? In which case is it set to "Content" and "Copy Always" in the file properties in the Solution Explorer? If the file is generated from your code, how is the (custom) targets file defined? TFS overrides the output directory of standard projects, but if your (custom) targets use a different variable name to send the output to a location TFS doesn't expect, it will not work. – jessehouwing Jan 09 '13 at 20:32
-
Yes it is a static file and I changed the property to copy always. The good news is that it now gets copied across. However the folder is now copied to the wrong part of the directory tree. So I have to remember to copy it to the right place. – arame3333 Jan 10 '13 at 08:55
-
Where is it being copied to, and where would you want it to be copied to? – jessehouwing Jan 10 '13 at 12:25
-
I want it to be picked up in http://testweb.sherrygreengrp.com/stas_test/Help/Help.mht. However for it to be picked up in this virtual directory, the Help folder needs to be located in the same place relative to the other project folders. When it is deployed it is about 2 levels out. So it should be in C:\Files\STAS\Timesheet\Timesheet_20130110.1\_PublishedWebsites\Timesheet\Help, but instead it is in C:\Files\STAS\Timesheet\Timesheet_20130110.1\Help – arame3333 Jan 10 '13 at 14:05
-
Is the MHT file in you web project? Or is it in a referenced project? Add it to the web project in the right folder, and it should be packaged up. – jessehouwing Jan 11 '13 at 09:35
-
2Can you see if the MHT file is also in the _PublishedWebsites\Timesheet\bin\ folder? We had a problem once with a web application we migrated to TFS 2010 that the folder structure was flattened into the bin folder. This can be solved by using the Web Publishing Pipeline. See http://stackoverflow.com/questions/4752293/msbuild-determine-a-solutions-publishedwebsites and http://stackoverflow.com/questions/1983575/copywebapplication-with-web-config-transformations/2953376#2953376 for more details. – basvo Jan 11 '13 at 10:42
-
@jessehouwing - the file is in the web project. – arame3333 Jan 11 '13 at 11:08
-
@basvo - there is nothing unusual in the bin folder. – arame3333 Jan 11 '13 at 11:09
1 Answers
0
I do not know how the problem was caused in the first place, but I found the way to fix it is to edit the .prog file.
The <ItemGroup>
was corrected as follows;
<Content Include="Views\Leaver\ConfirmSubmission.cshtml" />
<Content Include="Help\Help.mht" />
<!--<None Include="Help\Help.mht">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>-->
So I replaced the commented out code with the line above, ie <Content Include="Help\Help.mht" />
and now it works.

arame3333
- 9,887
- 26
- 122
- 205