Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add apphost customization #2545

Merged
merged 28 commits into from
Oct 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dcacdc0
Add apphost customization
sbomer Sep 14, 2018
25bb0d6
Pass intermediate assembly to apphost
sbomer Sep 14, 2018
0bf8fa5
Change task order to make IntermediateAssembly available to app host
sbomer Sep 18, 2018
888026b
Make intermediate assembly optional and fix version check test
sbomer Sep 18, 2018
2e776e9
Factor out PE image check
sbomer Sep 18, 2018
6e40454
Check PE image and host to provide appropriate warning
sbomer Sep 18, 2018
f61feae
Clean up resource updater a bit
sbomer Sep 19, 2018
7a342b5
Clean up ResourceUpdater
sbomer Sep 20, 2018
0574dcc
Run the resource test on windows only
sbomer Sep 20, 2018
e8fcf28
Use resource strings for all error messages
sbomer Sep 24, 2018
156e0c3
Use a private sealed class for pinvokes
sbomer Sep 24, 2018
5833c67
Add comment about PE header
sbomer Sep 24, 2018
b029ce0
Document new parameters to AppHost.Create
sbomer Sep 24, 2018
c455384
Use more descriptive callback names
sbomer Sep 24, 2018
ecba305
Implement IDisposable using a SafeHandle for hUpdate
sbomer Sep 25, 2018
49ee502
Use custom exception type for LockResource failure
sbomer Sep 25, 2018
20f4c1e
Remove AppHostOptions
sbomer Sep 25, 2018
4199da9
Make IntermediateAssembly required in CreateAppHost task
sbomer Sep 25, 2018
3af93e1
Make ResourceUpdater internal
sbomer Sep 25, 2018
ea4f506
Don't throw managed exceptions from callbacks
sbomer Sep 25, 2018
982d4ab
Move language-neutral constant to Kernel32 class
sbomer Sep 25, 2018
38d485a
Separate _CreateAppHost from _ComputeNETCoreBuildOutputFiles
sbomer Sep 27, 2018
9e5b84b
Place customized apphost into IntermediateOutputPath
sbomer Oct 1, 2018
801cacd
Make UseWindowsGraphicalUserInterface property private
sbomer Oct 1, 2018
dce92c7
Add missing semicolon in CompileDependsOn
sbomer Oct 1, 2018
45eef49
Improve warning message
sbomer Oct 1, 2018
677fb26
Fix apphost incremental build
sbomer Oct 1, 2018
c3aba73
Remove overwriteExisting option from tests
sbomer Oct 1, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion src/Tasks/Common/Resources/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -413,4 +413,20 @@ The following are names of parameters or literal values and should not be transl
<value>NETSDK1073: The FrameworkReference '{0}' was not recognized</value>
<comment>{StrBegin="NETSDK1073: "}</comment>
</data>
</root>
<data name="AppHostCustomizationRequiresWindowsHostWarning" xml:space="preserve">
<value>NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</value>
<comment>{StrBegin="NETSDK1074: "}</comment>
</data>
<data name="InvalidResourceUpdate" xml:space="preserve">
<value>NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</value>
<comment>{StrBegin="NETSDK1075: "}</comment>
</data>
<data name="AddResourceWithNonIntegerResource" xml:space="preserve">
<value>NETSDK1076: AddResource can only be used with integer resource types.</value>
<comment>{StrBegin="NETSDK1076: "}</comment>
</data>
<data name="FailedToLockResource" xml:space="preserve">
<value>NETSDK1077: Failed to lock resource.</value>
<comment>{StrBegin="NETSDK1077: "}</comment>
</data>
</root>
22 changes: 21 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="cs" original="../Strings.resx">
<body>
<trans-unit id="FailedToLockResource">
<source>NETSDK1077: Failed to lock resource.</source>
<target state="new">NETSDK1077: Failed to lock resource.</target>
<note>{StrBegin="NETSDK1077: "}</note>
</trans-unit>
<trans-unit id="AddResourceWithNonIntegerResource">
<source>NETSDK1076: AddResource can only be used with integer resource types.</source>
<target state="new">NETSDK1076: AddResource can only be used with integer resource types.</target>
<note>{StrBegin="NETSDK1076: "}</note>
</trans-unit>
<trans-unit id="InvalidResourceUpdate">
<source>NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</source>
<target state="new">NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</target>
<note>{StrBegin="NETSDK1075: "}</note>
</trans-unit>
<trans-unit id="AppHostCustomizationRequiresWindowsHostWarning">
<source>NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</source>
<target state="new">NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</target>
<note>{StrBegin="NETSDK1074: "}</note>
</trans-unit>
<trans-unit id="AppHostNotWindows">
<source>NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</source>
<target state="new">NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</target>
Expand Down Expand Up @@ -373,4 +393,4 @@ The following are names of parameters or literal values and should not be transl
</trans-unit>
</body>
</file>
</xliff>
</xliff>
22 changes: 21 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../Strings.resx">
<body>
<trans-unit id="FailedToLockResource">
<source>NETSDK1077: Failed to lock resource.</source>
<target state="new">NETSDK1077: Failed to lock resource.</target>
<note>{StrBegin="NETSDK1077: "}</note>
</trans-unit>
<trans-unit id="AddResourceWithNonIntegerResource">
<source>NETSDK1076: AddResource can only be used with integer resource types.</source>
<target state="new">NETSDK1076: AddResource can only be used with integer resource types.</target>
<note>{StrBegin="NETSDK1076: "}</note>
</trans-unit>
<trans-unit id="InvalidResourceUpdate">
<source>NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</source>
<target state="new">NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</target>
<note>{StrBegin="NETSDK1075: "}</note>
</trans-unit>
<trans-unit id="AppHostCustomizationRequiresWindowsHostWarning">
<source>NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</source>
<target state="new">NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</target>
<note>{StrBegin="NETSDK1074: "}</note>
</trans-unit>
<trans-unit id="AppHostNotWindows">
<source>NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</source>
<target state="new">NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</target>
Expand Down Expand Up @@ -373,4 +393,4 @@ The following are names of parameters or literal values and should not be transl
</trans-unit>
</body>
</file>
</xliff>
</xliff>
22 changes: 21 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="es" original="../Strings.resx">
<body>
<trans-unit id="FailedToLockResource">
<source>NETSDK1077: Failed to lock resource.</source>
<target state="new">NETSDK1077: Failed to lock resource.</target>
<note>{StrBegin="NETSDK1077: "}</note>
</trans-unit>
<trans-unit id="AddResourceWithNonIntegerResource">
<source>NETSDK1076: AddResource can only be used with integer resource types.</source>
<target state="new">NETSDK1076: AddResource can only be used with integer resource types.</target>
<note>{StrBegin="NETSDK1076: "}</note>
</trans-unit>
<trans-unit id="InvalidResourceUpdate">
<source>NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</source>
<target state="new">NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</target>
<note>{StrBegin="NETSDK1075: "}</note>
</trans-unit>
<trans-unit id="AppHostCustomizationRequiresWindowsHostWarning">
<source>NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</source>
<target state="new">NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</target>
<note>{StrBegin="NETSDK1074: "}</note>
</trans-unit>
<trans-unit id="AppHostNotWindows">
<source>NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</source>
<target state="new">NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</target>
Expand Down Expand Up @@ -373,4 +393,4 @@ The following are names of parameters or literal values and should not be transl
</trans-unit>
</body>
</file>
</xliff>
</xliff>
22 changes: 21 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="fr" original="../Strings.resx">
<body>
<trans-unit id="FailedToLockResource">
<source>NETSDK1077: Failed to lock resource.</source>
<target state="new">NETSDK1077: Failed to lock resource.</target>
<note>{StrBegin="NETSDK1077: "}</note>
</trans-unit>
<trans-unit id="AddResourceWithNonIntegerResource">
<source>NETSDK1076: AddResource can only be used with integer resource types.</source>
<target state="new">NETSDK1076: AddResource can only be used with integer resource types.</target>
<note>{StrBegin="NETSDK1076: "}</note>
</trans-unit>
<trans-unit id="InvalidResourceUpdate">
<source>NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</source>
<target state="new">NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</target>
<note>{StrBegin="NETSDK1075: "}</note>
</trans-unit>
<trans-unit id="AppHostCustomizationRequiresWindowsHostWarning">
<source>NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</source>
<target state="new">NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</target>
<note>{StrBegin="NETSDK1074: "}</note>
</trans-unit>
<trans-unit id="AppHostNotWindows">
<source>NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</source>
<target state="new">NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</target>
Expand Down Expand Up @@ -373,4 +393,4 @@ The following are names of parameters or literal values and should not be transl
</trans-unit>
</body>
</file>
</xliff>
</xliff>
22 changes: 21 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="it" original="../Strings.resx">
<body>
<trans-unit id="FailedToLockResource">
<source>NETSDK1077: Failed to lock resource.</source>
<target state="new">NETSDK1077: Failed to lock resource.</target>
<note>{StrBegin="NETSDK1077: "}</note>
</trans-unit>
<trans-unit id="AddResourceWithNonIntegerResource">
<source>NETSDK1076: AddResource can only be used with integer resource types.</source>
<target state="new">NETSDK1076: AddResource can only be used with integer resource types.</target>
<note>{StrBegin="NETSDK1076: "}</note>
</trans-unit>
<trans-unit id="InvalidResourceUpdate">
<source>NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</source>
<target state="new">NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</target>
<note>{StrBegin="NETSDK1075: "}</note>
</trans-unit>
<trans-unit id="AppHostCustomizationRequiresWindowsHostWarning">
<source>NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</source>
<target state="new">NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</target>
<note>{StrBegin="NETSDK1074: "}</note>
</trans-unit>
<trans-unit id="AppHostNotWindows">
<source>NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</source>
<target state="new">NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</target>
Expand Down Expand Up @@ -373,4 +393,4 @@ The following are names of parameters or literal values and should not be transl
</trans-unit>
</body>
</file>
</xliff>
</xliff>
22 changes: 21 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ja" original="../Strings.resx">
<body>
<trans-unit id="FailedToLockResource">
<source>NETSDK1077: Failed to lock resource.</source>
<target state="new">NETSDK1077: Failed to lock resource.</target>
<note>{StrBegin="NETSDK1077: "}</note>
</trans-unit>
<trans-unit id="AddResourceWithNonIntegerResource">
<source>NETSDK1076: AddResource can only be used with integer resource types.</source>
<target state="new">NETSDK1076: AddResource can only be used with integer resource types.</target>
<note>{StrBegin="NETSDK1076: "}</note>
</trans-unit>
<trans-unit id="InvalidResourceUpdate">
<source>NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</source>
<target state="new">NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</target>
<note>{StrBegin="NETSDK1075: "}</note>
</trans-unit>
<trans-unit id="AppHostCustomizationRequiresWindowsHostWarning">
<source>NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</source>
<target state="new">NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</target>
<note>{StrBegin="NETSDK1074: "}</note>
</trans-unit>
<trans-unit id="AppHostNotWindows">
<source>NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</source>
<target state="new">NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</target>
Expand Down Expand Up @@ -373,4 +393,4 @@ The following are names of parameters or literal values and should not be transl
</trans-unit>
</body>
</file>
</xliff>
</xliff>
22 changes: 21 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="ko" original="../Strings.resx">
<body>
<trans-unit id="FailedToLockResource">
<source>NETSDK1077: Failed to lock resource.</source>
<target state="new">NETSDK1077: Failed to lock resource.</target>
<note>{StrBegin="NETSDK1077: "}</note>
</trans-unit>
<trans-unit id="AddResourceWithNonIntegerResource">
<source>NETSDK1076: AddResource can only be used with integer resource types.</source>
<target state="new">NETSDK1076: AddResource can only be used with integer resource types.</target>
<note>{StrBegin="NETSDK1076: "}</note>
</trans-unit>
<trans-unit id="InvalidResourceUpdate">
<source>NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</source>
<target state="new">NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</target>
<note>{StrBegin="NETSDK1075: "}</note>
</trans-unit>
<trans-unit id="AppHostCustomizationRequiresWindowsHostWarning">
<source>NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</source>
<target state="new">NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</target>
<note>{StrBegin="NETSDK1074: "}</note>
</trans-unit>
<trans-unit id="AppHostNotWindows">
<source>NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</source>
<target state="new">NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</target>
Expand Down Expand Up @@ -373,4 +393,4 @@ The following are names of parameters or literal values and should not be transl
</trans-unit>
</body>
</file>
</xliff>
</xliff>
22 changes: 21 additions & 1 deletion src/Tasks/Common/Resources/xlf/Strings.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pl" original="../Strings.resx">
<body>
<trans-unit id="FailedToLockResource">
<source>NETSDK1077: Failed to lock resource.</source>
<target state="new">NETSDK1077: Failed to lock resource.</target>
<note>{StrBegin="NETSDK1077: "}</note>
</trans-unit>
<trans-unit id="AddResourceWithNonIntegerResource">
<source>NETSDK1076: AddResource can only be used with integer resource types.</source>
<target state="new">NETSDK1076: AddResource can only be used with integer resource types.</target>
<note>{StrBegin="NETSDK1076: "}</note>
</trans-unit>
<trans-unit id="InvalidResourceUpdate">
<source>NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</source>
<target state="new">NETSDK1075: Update handle is invalid. This instance may not be used for further updates.</target>
<note>{StrBegin="NETSDK1075: "}</note>
</trans-unit>
<trans-unit id="AppHostCustomizationRequiresWindowsHostWarning">
<source>NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</source>
<target state="new">NETSDK1074: The application host executable will not be customized because adding resources requires that the build be performed on Windows.</target>
<note>{StrBegin="NETSDK1074: "}</note>
</trans-unit>
<trans-unit id="AppHostNotWindows">
<source>NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</source>
<target state="new">NETSDK1071: Unable to use '{0}' as application host executable because it's not a Windows PE file.</target>
Expand Down Expand Up @@ -373,4 +393,4 @@ The following are names of parameters or literal values and should not be transl
</trans-unit>
</body>
</file>
</xliff>
</xliff>
Loading