Created
February 17, 2026 15:29
-
-
Save derekxmartin/98837d58e7e362b2c9a0a5a0ca29f3e7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <Target Name="TestTarget"> | |
| <TestTask /> | |
| </Target> | |
| <UsingTask | |
| TaskName="TestTask" | |
| TaskFactory="CodeTaskFactory" | |
| AssemblyFile="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Build.Tasks.v4.0.dll"> | |
| <Task> | |
| <Using Namespace="System.IO" /> | |
| <Code Type="Fragment" Language="cs"> | |
| <![CDATA[ | |
| string user = System.Security.Principal.WindowsIdentity.GetCurrent().Name; | |
| File.WriteAllText(@"C:\Temp\msbuild_test_output.txt", "Test executed by: " + user); | |
| ]]> | |
| </Code> | |
| </Task> | |
| </UsingTask> | |
| </Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment